使用Python将.STL文件转换为.step文件
我正在尝试找到一种将.Step文件转换为.stl的方法,因此任何头部都会有很大帮助。谁能从哪里开始?我必须寻找什么?
I am trying to find a way to convert a .step file to .stl, so any headsup will be a lot helpful. And can anyone tell from where to start? what do i have to look for?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要一个库才能具有弦误/偏差的镶嵌台阶几何形状。一旦您从BREP/表面有三角形后,它们就可以轻松地以
步骤文件格式也可以包括汇编树/场景图,这使事情变得有些复杂。
You need a library to tessellate STEP geometry with a chordal error/deviation. Once you have triangles from BRep/Surfaces they can be easily exported in STL file format.
STEP file format could include assembly tree/scene graph as well, this complicates things a little bit.
如果您使用的是GUI,则将转到零件工作台,选择网格,然后使用菜单项“ part->从网格中创建形状”。这会产生形状,但不会产生固体,这可能是您想要的。因此,您将选择新形状,然后进行“ part->转换为固体”。
您说您想和Python一起执行此操作,因此,如果您在Python控制台中查看,您会发现Freecad做了以下类似的事情。那应该足以让您入门。
If you were using the GUI, you'd go to the Part workbench, select your mesh and then use the menu item "Part->Create Shape from Mesh...". This creates the shape but does not make a solid which is probably what you want. So you'd select then new shape, and do "Part->Convert to Solid".
You said you wanted to do this with python so if you look in the python console you'll see that FreeCAD did something like below. That should be enough to get you started.