DRAWEXE for OCC 7.3 on Linux
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
DRAWEXE for OCC 7.3 on Linux
Does anybody know how to use DRAWEXE for OCC 7.3 as installed via the daily ppa?
I can get DRAW to execute with
wandererfan@huxley ~ $ /usr/share/opencascade/bin/draw.sh
But I get an error message right after start up.
couldn't read file "/usr/src/DrawResources/DrawDefault": no such file or directory
I imagine my CASROOT environment variable is wrong, but I have no idea what it should be.
Do I need to download and build OCC 7.3 locally to get this to work? That's how I got DRAW to work with 7.0 and 7.1.
Thanks,
wf
I can get DRAW to execute with
wandererfan@huxley ~ $ /usr/share/opencascade/bin/draw.sh
But I get an error message right after start up.
couldn't read file "/usr/src/DrawResources/DrawDefault": no such file or directory
I imagine my CASROOT environment variable is wrong, but I have no idea what it should be.
Do I need to download and build OCC 7.3 locally to get this to work? That's how I got DRAW to work with 7.0 and 7.1.
Thanks,
wf
- tanderson69
- Veteran
- Posts: 1626
- Joined: Thu Feb 18, 2010 1:07 am
Re: DRAWEXE for OCC 7.3 on Linux
I ran into something like this trying to get cadrays to run. I had to set 2 environment variables with the appropriate paths to fix the problem. Maybe that will work for you?wandererfan wrote: ↑Tue Sep 10, 2019 12:03 pm Does anybody know how to use DRAWEXE for OCC 7.3 as installed via the daily ppa?
I can get DRAW to execute with
wandererfan@huxley ~ $ /usr/share/opencascade/bin/draw.sh
But I get an error message right after start up.
couldn't read file "/usr/src/DrawResources/DrawDefault": no such file or directory
I imagine my CASROOT environment variable is wrong, but I have no idea what it should be.
Do I need to download and build OCC 7.3 locally to get this to work? That's how I got DRAW to work with 7.0 and 7.1.
Thanks,
wf
Code: Select all
export DRAWDEFAULT=/usr/local/share/opencascade/resources/DrawResources/DrawDefault
export DRAWHOME=/usr/local/share/opencascade/resources/DrawResources
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: DRAWEXE for OCC 7.3 on Linux
Different error message ("couldn't open "": no such file or directory"), but still won't run.tanderson69 wrote: ↑Tue Sep 10, 2019 12:31 pm I ran into something like this trying to get cadrays to run. I had to set 2 environment variables with the appropriate paths to fix the problem. Maybe that will work for you?Code: Select all
export DRAWDEFAULT=/usr/local/share/opencascade/resources/DrawResources/DrawDefault export DRAWHOME=/usr/local/share/opencascade/resources/DrawResources
- tanderson69
- Veteran
- Posts: 1626
- Joined: Thu Feb 18, 2010 1:07 am
Re: DRAWEXE for OCC 7.3 on Linux
Did you find the path to the directory and file of your installation and put them into the variables?wandererfan wrote: ↑Tue Sep 10, 2019 12:56 pm Different error message ("couldn't open "": no such file or directory"), but still won't run.
- kkremitzki
- Veteran
- Posts: 2518
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: DRAWEXE for OCC 7.3 on Linux
Unfortunately the DRAWEXE setup is a little busted, I've been looking into it lately trying to get autopkgtests set up. What I did to get it working was:
Code: Select all
sudo ln -s /usr/share/opencascade/resources /usr/share/opencascade/src
export CASROOT=/usr/share/opencascade
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: DRAWEXE for OCC 7.3 on Linux
I've just built OCC7.3.0 from source and installed in my home directory and set CASROOT to "home/wandererfan/OCC730-install". Now I can run DRAWEXE from home dir.tanderson69 wrote: ↑Tue Sep 10, 2019 1:25 pm Did you find the path to the directory and file of your installation and put them into the variables?
Would be nice to have instructions on how to do it with the PPA version for those that don't compile, though.
Thanks for helping.
Re: DRAWEXE for OCC 7.3 on Linux
I don't think this is possible at the moment. It seems that OCCT needs to be packaged differently.wandererfan wrote: ↑Tue Sep 10, 2019 8:20 pm ...
Would be nice to have instructions on how to do it with the PPA version for those that don't compile, though.
I'm reading about this here https://www.opencascade.com/doc/occt-7. ... index.html
As you see, they assume a bunch of files. I presume this is how you see OCCT compiled from their official sources.
Code: Select all
opencascade/
adm/ This folder contains administration files, which allow rebuilding OCCT;
cmake/ This folder contains files of CMake building procedure;
msvc/ This folder contains Visual Studio projects for Visual C++ 2010, 2012, 2013, 2015 and 2017 which allow rebuilding OCCT
data/ This folder contains CAD files in different formats, which can be used to test the OCCT functionality;
doc/ This folder contains OCCT documentation in HTML and PDF format;
dox/ This folder contains sources of OCCT documentation in plain text (MarkDown) format;
inc/ This folder contains copies of all OCCT header files;
samples/ This folder contains sample applications.
src/ This folder contains OCCT source files. They are organized in folders, one per development unit;
tests/ This folder contains scripts for OCCT testing.
tools/ This folder contains sources of Inspector tool.
win64/
vc10/ This folder contains executable and library files built in optimize mode for Windows platform by Visual C++ 2010;
Code: Select all
/usr/share/opencascade/
bin/
resources/
DrawResources/
TObj/
Code: Select all
sudo ln -s /usr/share/opencascade/resources /usr/share/opencascade/src
Then you can run the executable /usr/bin/occt-draw by setting the CASROOT variable.
Code: Select all
CASROOT=/usr/share/opencascade occt-draw
Code: Select all
Draw[1]> Draw[2]> An exception was caught 0x55ab0292d450 : Draw_Failure: Could not open: TKTopTest; reason: libTKTopTest.so: cannot open shared object file: No such file or directory
bgerror failed to handle background error.
Original error: ** Exception ** 0x55ab0292d450 : Draw_Failure: Could not open: TKTopTest; reason: libTKTopTest.so: cannot open shared object file: No such file or directory
Error in bgerror:
Code: Select all
/usr/lib/x86_64-linux-gnu/libTKTopTest.so.7
/usr/lib/x86_64-linux-gnu/libTKTopTest.so.7.3.0
Code: Select all
export CASROOT=/usr/share/opencascade
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
/usr/bin/occt-draw
The documentation say this
I was confused by DRAWEXE as it doesn't seem to be present in Ubuntu. I guess in Linux the executable is /usr/bin/occt-draw.The DRAWEXE executable is delivered with the installation procedure on Windows platform only.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
- wandererfan
- Veteran
- Posts: 6326
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: DRAWEXE for OCC 7.3 on Linux
that looks more like my source directory.
build looks like this
Code: Select all
CMakeFiles
3.10.2
CMakeTmp
Export
doc
overview
dox
CMakeFiles
include
opencascade
lin64
gcc
src
DRAWEXE
TKBin
...
TKXSBase
TKXSDRAW
Code: Select all
bin
include
opencascade
lib
cmake
opencascade
share
doc
opencascade
opencascade
data
resources
samples