建立方向盘项目初始版本

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,10 @@
import FreeCAD as A, Part, json, os
p=r'C:\projects\wheel\models\fan_direct_motor_side_140\Assembly.FCStd'
d=A.openDocument(p);d.recompute()
out={}
fan=d.getObject('DirectFan')
for name in ('Rail0','Rail1'):
a=d.getObject(name);out[name]={'fan_distance':a.Shape.distToShape(fan.Shape)[0],'fan_overlap':a.Shape.common(fan.Shape).Volume,'length':a.Shape.BoundBox.YLength}
assert all(abs(v['length']-140)<1e-6 and v['fan_distance']<1e-6 and abs(v['fan_overlap'])<1e-6 for v in out.values())
open(r'C:\projects\wheel\models\fan_direct_motor_side_140\contact_validation.json','w').write(json.dumps(out,indent=2))
A.closeDocument(d.Name);os._exit(0)