def render_scad(self, filename = 'test.scad'):
"""Automatically renders an openscad file to an STL.
Still slightly WIP,
as we're not completely sure on how to make shell-esque commands
safe.
TODO: Sanitize inputs, remove waiting (find a better solution)
Inputs:
filename: the file to open
"""
output_name = filename.split('.')[0] + '.stl'
proc = subprocess32.Popen(['openscad','-o',output_name,filename])
print "Rendering..."
proc.wait()
proc.terminate()
Geometry.py 文件源码
python
阅读 29
收藏 0
点赞 0
评论 0
评论列表
文章目录