import FreeCAD as App
import Part
1、创建点
V1 = App.Vector(0, 10, 0)
2、创建线段
L1 = Part.LineSegment(V1, V2)
3、创建圆弧
C1 = Part.Arc(V1, VC1, V4)
4、创建Shape
S1 = Part.Shape([C1, L1, C2, L2])
5、创建基本形状
makeBox(l, w, h, [p, d])
makeCircle(radius)
makeCone(radius1, radius2, height)
makeCylinder(radius, height)
makeLine((x1, y1, z1), (x2, y2, z2))
makePlane(length, width)
makePolygon(list)
makeSphere(radius)
makeTorus(radius1, radius2)
6、Face
face = Part.Face(wire3)
7、Wire
wire2 = Part.Wire([edge3, edge4])
wire3 = Part.Wire([wire1, wire2])
8、Edge
edge = Part.makeLine((0, 0, 0), (10, 0, 0))
edge = line.toShape()
9、保存文件
exportBrep()
exportIges()
exportStep()
exportStl()