建立方向盘项目初始版本

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,17 @@
from pathlib import Path
import FreeCAD as A, FreeCADGui as G
import os,traceback
p=Path(r'C:\projects\wheel\models\washer_two_panels')
try:
for name in ['一体垫片板_0.5mm.FCStd','一体垫片板_1mm.FCStd']:
d=A.openDocument(str(p/name));d.recompute()
for o in d.Objects:
if hasattr(o,'ViewObject') and o.ViewObject:o.ViewObject.Visibility=False
d.getObject('Panel').ViewObject.Visibility=True
G.activeDocument().activeView().viewAxonometric();G.activeDocument().activeView().fitAll()
d.recompute();d.save();A.closeDocument(d.Name)
(p/'gui_ready.txt').write_text('ok',encoding='utf8')
os._exit(0)
except Exception:
(p/'gui_error.txt').write_text(traceback.format_exc(),encoding='utf8')
os._exit(1)