User:Schindler97/GSoC18/Project
Contents
Wrapping BRLCAD primitives in python
Abstract
BRL-CAD is an open source solid modeling system that includes interactive geometry editing, ray-tracing for rendering and geometric analysis, geometry libraries for application developers and a lot more. BRL-CAD has various geometric primitive objects it uses for modelling complicated solids. This project aims to wrap BRL-CAD functionality in python.
Introduction
Python BRLCAD is an ongoing project that aims to enable using BRLCAD APIs in python. It mainly focuses on wrapping BRLCADs primitives in python. These bindings parse the header files of the primitives from the installed version of BRLCAD, and uses them to construct a standard library of abstractions around the bindings. These python-bindings warrant simple and non-complicated access to the BRLCAD primitives for geometry construction and manipulation. This project uses ctypes to wrap the BRLCAD libraries. The main motivation behind python wrappers was to enable faster iterations and avoid the pain of with pointers and data-type casting
By loose coupling these bindings, we enable these bindings to interact with the bleeding edge version (and most other versions) of BRLCAD. We do this by using a dynamic wrapper generator ctypesgen which parses BRLCAD’s primitive header files (*.h) and generates the ctypes wrapper code and then writes it into a python file.
Past Work
Python BRL-CAD was last worked upon in the summer of 2014 as a GSoC project. During this project, more primitives were added to the repository. Some test cases were written and close to no documentation was done.
"Issues in the current project"
- Fixing the current project. There are certain issues in the current version of python BRL-CAD, they are :
- Outdated and non-maintained codebase (4 Years old)
- Incomplete installation scripts
- Support for only python2.7
- No support for OS-X
- Non-exhaustive tests for primitives
- Unwrapped primitives
- Close to no documentation
"Goals"
- Extending support to python3.x
- Create robust installation scripts for Windows, Linux and OS-X
- Introduce bindings for 16 new primitives
- annot
- brep
- datum
- dsp
- ehy
- eto
- extrude
- hf
- hrt
- joint
- nmg
- pnts
- poly
- rec
- revolve
- rhc