SolidCode / SolidPython

A python frontend for solid modelling that compiles to OpenSCAD
1.11k stars 173 forks source link

Use OpenSCAD libraries in SolidPython? #89

Closed nerdfever closed 6 years ago

nerdfever commented 6 years ago

The fillet library for OpenSCAD at https://www.thingiverse.com/thing:2461392 looks really useful. Is there a way to use this directly in SolidPython, or must the library be hand-ported to Python?

etjones commented 6 years ago

This is exactly what use() is for! Most of the complex code in SolidPython has to do with taking care of importing OpenScad code.

Basically, all you should have to do is:

use(‘path/to/scad_file.scad’)

And then call any functions from the SCAD code as if they were imported in Python. See SolidPython/examples/basic_scad_include.py for an example.

Let me know if you run into any problems; with luck it’ll just work. Cheers