This repo is a fork of mikedh/occmodel which itself is a fork of tenko/occmodel. This project's primary purpose is for upgrading occmodel to the most recent version of OpenCASCADE Community Edition (OCE). In addition it is going be used to explore using cython to wrap the VTK interface package in the 0.17.1 release of OCE. VTK provides a superior rendering engine option for OCE topological shapes.
The easiest way to install occmodel and it's dependancies into a conda environment is via the conda packages located on my Anaconda.org channel . There you will find packages for occmodel, VTK 7.0 and OCE 0.17.1 all built against Python 3.5 and Qt4. If you are absolutely bent on building occmodel, VTK and OCE from source check out the conda package recipes in this repo for more information.
Note, VTK and OCE both need the following packages installed at the system level in order to work correctly. Installation via dnf|yum|apt-get is necessary because there are currently not conda equivalent packages.
fedora|redhat|centos: mesa-libGLU libXmu tbbubuntu|debian: libglu1-mesa libxmu libtbb
The examples directory contains several Jupyter notebooks showing the occmodel
API in action. The OCCT_Bottle_Example.ipynb
notebook recreates the OpenCASCADE bottle tutorial using occmodel
and displays the result in a VTK rendering window. The Step_File_import.ipynb
notebook demonstrates importing and displaying a STEP file.
The examples directory includes a simple Qt-based VTK viewer that can be launched from a Jupyter Notebook. Eventually this will be replaced with a VTK widget but for the time being this will have to suffice.
See the tenko/occmodel Sphinx docs for API documentation.
Currently, the only deviation of this fork from tenko/occmodel
is the addition of toVtkActor
on OCCBase
and the addition of the OCCVtk
package. The OCCVtk
package only defines one function, shapeToActor(Ba
5830
se occShape)
.