Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以使用 Python 脚本在 FreeCAD 中创建和显示零件,如下所示:
Part.show(myPart)
但是,如果我再次运行该脚本,它会在原始文件的顶部覆盖 myPart 的第二个副本。Python 脚本如何在开始绘图之前清除查看器?我可以手动使用 FreeCAD 菜单“全选”,然后“删除”,但我怎样才能自动化它以加快我的工作流程?
这是我想出的解决方案:
def clearAll(): doc = FreeCAD.ActiveDocument for obj in doc.Objects: doc.removeObject(obj.Label)