建立方向盘项目初始版本

This commit is contained in:
2026-10-29 22:04:55 +08:00
commit 9962cbfbce
834 changed files with 1519203 additions and 0 deletions

View 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)