Convert STEP file type to STL

喜欢而已 提交于 2019-12-06 05:45:38

Here's a quick bit of code to start out:

import FreeCAD
import Part
import Mesh
shape = Part.Shape()
shape.read('my_shape.step')
doc = App.newDocument('Doc')
pf = doc.addObject("Part::Feature","MyShape")
pf.Shape = shape
Mesh.export([pf], 'my_shape.stl')

FreeCAD uses python extensively for user-facing functions. Basically, anything you do through the UI is done with python.

So it's useful to open up the UI, open up the Python console, and then do a function manually. You can often just copy the python directly from the console and edited it to serve your needs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!