# 设置草绘平面 sectionPlane = Plane.PlaneXY result = ViewHelper.SetSketchPlane(sectionPlane) # EndBlock
ClearAll() points = List[Point2D]() # r为半径 r =1 for i in range(0,360,5): points.Add(Point2D.Create(MM(r*(2*math.cos(i*math.pi/180)-math.cos(2*i*math.pi/180))),MM(r*(2*math.sin(i*math.pi/180)-math.sin(2*i*math.pi/180))))) # 与第一个点相连构成封闭几何 points.Add(Point2D.Create(MM(1),MM(0))) # 利用多段线将点连接起来 result = SketchNurbs.CreateFrom2DPoints(False, points)