spaceclaim脚本(线生成面体)
#新建一个列表,用来保存修剪曲线(PS:修建曲线的意思是开始点和结束点不在一起,圆就不属于修建曲线)
#注意和Line,Circle类型等的区别
curves = List[ITrimmedCurve]()
curveSegment =CurveSegment.Create(Point.Create(0,0,0), Point.Create(0.01,0,0)) #通过(0,0,0),(0.01,0,0)新建一条线
curves.Add(curveSegment) #将生成的线添加入修剪曲线的列表当中
curveSegment =CurveSegment.Create(Point.Create(0.01,0,0), Point.Create(0.01,0.01,0)) #通过(0.01,0,0),(0.01,0.01,0)新建一条线
curves.Add(curveSegment) #将生成的线添加入修剪曲线的列表当中
curveSegment =CurveSegment.Create(Point.Create(0.01,0.01,0), Point.Create(0,0.01,0)) #通过(0.01,0.01,0),(0,0.01,0)新建一条线
curves.Add(curveSegment) #将生成的线添加入修剪曲线的列表当中
curveSegment =CurveSegment.Create(Point.Create(0,0.01,0), Point.Create(0,0,0)) #通过(0,0.01,0),(0,0,0)新建一条线
curves.Add(curveSegment) #将生成的线添加入修剪曲线的列表当中
designBody = DesignBody.CreatePlanarBody(Plane.PlaneXY,curves) #通过线的列表生成面体