建立方向盘项目初始版本
This commit is contained in:
8
scripts/inspect_mount.FCmacro
Normal file
8
scripts/inspect_mount.FCmacro
Normal file
@@ -0,0 +1,8 @@
|
||||
import FreeCAD as A, FreeCADGui as G, json, os
|
||||
p=r'C:\projects\wheel\models\fan_direct_motor_side_140\Assembly.FCStd'
|
||||
d=A.openDocument(p);d.recompute();o=[]
|
||||
for a in d.Objects:
|
||||
if hasattr(a,'Shape') and not a.Shape.isNull():
|
||||
b=a.Shape.BoundBox; o.append({'name':a.Name,'label':a.Label,'visible':a.ViewObject.Visibility,'bounds':[b.XMin,b.XMax,b.YMin,b.YMax,b.ZMin,b.ZMax]})
|
||||
open(r'C:\projects\wheel\models\objects_dump.json','w',encoding='utf8').write(json.dumps(o,ensure_ascii=False,indent=2))
|
||||
A.closeDocument(d.Name);os._exit(0)
|
||||
Reference in New Issue
Block a user