Create a polygon in Spaceclaim / Discovery
Gabriel Messager
Member, Employee Posts: 54
✭✭✭✭
Comments
-
ClearAll() # Define the parameters innerRadius = MM(1) numSides = 6 extrusionHeight = MM(3) # Create the frame for the polygon frame = Frame.World # Create the polygon face poly = Polygon.Create(frame, innerRadius, numSides) segments = CurveSegment.Create(poly) design_curve = DesignCurve.Create(GetRootPart(),segments) result = Fill.Execute(Selection.Create(design_curve)) surface = Selection.Create(result.CreatedFaces[0]) options = ExtrudeFaceOptions() options.ExtrudeType = ExtrudeType.Add ExtrudeFaces.Execute(surface, extrusionHeight,options) design_curve.Delete() Selection.Empty().SetActive()
0