C'est un mémorandum pour moi.
Sphere.py
import FreeCAD as APP
import Part
freecad = APP.newDocument("model")
comp_1 = Part.Sphere()
comp_1.Radius=10
myPart = freecad.addObject("Part::Feature","comp_1")
myPart.Shape= comp_1.toShape()
myPart.Placement = App.Placement(App.Vector(100,0,0),App.Rotation(App.Vector(0,0,1),0))
freecad.recompute()
myPart.Shape.MatrixOfInertia
freecad.saveAs("comp_1.FCStd")
Part.export([freecad.Objects[0]],"comp_1.iges")
Recommended Posts