nmz787 / python-brlcad-tcl

A small (but hopefully growing) subset of the brl-cad primitives, being emitted as tcl scripts that mged can directly process into database (.g) files.
GNU Lesser General Public License v3.0
10 stars 2 forks source link

python-brlcad-tcl

So far this is a small subset of the brl-cad primitives with some notion of object-oriented design, being emitted as tcl scripts that mged can directly process into database (.g) files. Requirements are Python and brl-cad.

An example of a 28BYJ-48 stepper motor, run with:

Multi-part example

The multi-part example shows how to use two python-brlcad-tcl objects (including motor_28BYJ_48__example.py). In addition to emitting the tcl script, it runs mged to create a new geometry database, and then converts that to an STL.

To view the resulting (.g) file in mged:

Example of slicing a model and exporting to individual STL files:

Looking at the stack of STL files emitted:

Alt text

Looking at the raster output, with greyscale output option:

Alt text

Looking at the raster output:

Alt text

Developers section

Adding support to python-brlcad-tcl for new operations or shapes/primitives

If it is an mged command

Conventions