Very basic OpenCASCADE examples. The purpose of these tiny example programs is to show the most basic usage of the Open CASCADE 3D library possible, thus flattening the learning curve for a beginner (like me).
|
7 éve | |
---|---|---|
docs | 7 éve | |
src | 7 éve | |
LICENSE | 7 éve | |
README.md | 7 éve | |
TODO.md | 7 éve |
Very basic OpenCASCADE examples that compile on Linux on the commandline with g++. A .stl, .wrl and .stp file is written into a file which can be imported and viewed by a program like blender, MeshLab, FreeCAD or view3dscene for example. The purpose of these tiny example programs is to show the most basic usage of the Open CASCADE 3D library possible, thus flattening the learning curve for a beginner (like me).
Debian 8.9 (jessie) was used as operating system.
root> apt-get install g++ cmake cmake-curses-gui
root> apt-get install tcllib tklib tcl-dev tk-dev libfreetype-dev libxt-dev libxmu-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libfreeimage-dev libtbb-dev libgl2ps-dev
root> apt-get install doxygen graphviz
root> apt-get install libqt4-dev libvtk6-dev libvtk6-qt-dev
user> mkdir opencascade
user> cd opencascade/
user> cp ~/Downloads/opencascade-7.1.0.tgz .
user> tar -xvzf opencascade-7.1.0.tgz
user> mkdir install
user> mkdir build
user> fgrep -irns vtkRenderingFreeTypeOpenGL ../opencascade-7.1.0/src/
../opencascade-7.1.0/src/TKIVtk/EXTERNLIB:17:vtkRenderingFreeTypeOpenGL
../opencascade-7.1.0/src/TKIVtkDraw/EXTERNLIB:23:vtkRenderingFreeTypeOpenGL
user> cd build && ccmake ../opencascade-7.1.0/
user> make
root> ln -s /usr/lib/x86_64-linux-gnu/tcl8.6/ /usr/lib/x86_64-linux-gnu/tcl8
user> make install
root> cd /etc/ld.so.conf.d/
root> echo '/path_to/opencascade/install/lib' > opencascade.conf
root> ldconfig
user> git clone https://github.com/quirxi/occBasicSamples.git
user> cd occBasicSamples/src
user> rm include lib path_to_OpenCascade_*
user> ln -s ../../opencascade/install/lib/ lib
user> ln -s ../../opencascade/install/include/ include
user> cd Box
user> make
g++ -c -pipe -O3 -std=c++11 -Wall -W -g -D_REENTRANT -I../include/opencascade -o main.o main.cpp
g++ -o aBox.exe main.o -L../lib -lTKernel -lTKPrim -lTKTopAlgo -lTKSTL -lTKVRML -lTKBRep -lTKG3d -lTKMesh
user> ./aBox.exe
user> ls -a
. .. aBox.exe aBox.stl aBox.wrl main.cpp main.o Makefile
Up to now there are examples for following basic shapes available:
Distributed under the MIT License.