You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
use() & include() fail if solidpython isn't imported with 'from solid import *' #20
The following code fails, but adding from solid import * to get all of solidpython.py into the current namespace fixes things. :
#! /usr/bin/python
# -*- coding: UTF-8 -*-
import solid
# from solid import * # *** When this line is commented out, solid.use() fails.
# *** Import all of solid into this module's namespace, and success
def test_scad_include():
a = solid.cube(10)
solid.use( "examples/scad_to_include.scad") # Path relative to solidpython.py
a += steps( 3)
return a
if __name__ == '__main__':
a = test_scad_include()
solid.scad_render_to_file( a)
Activity
Fixes #20, so that OpenSCAD’s use() and include() functions still wor…