Create a cone in Spaceclaim/Discovery

Gabriel Messager
Gabriel Messager Member, Employee Posts: 54
10 Comments 5 Likes Name Dropper First Anniversary
✭✭✭✭
edited June 2023 in 3D Design

Comments

  • Gabriel Messager
    Gabriel Messager Member, Employee Posts: 54
    10 Comments 5 Likes Name Dropper First Anniversary
    ✭✭✭✭
    import math
    ClearAll()
    
    # Create the cone
    radius = MM(5)
    halfAngle = DEG(20)
    cone = Cone.Create(Frame.World, radius, halfAngle)
    int1 = Interval.Create(0,2*math.pi)
    int2 = Interval.Create(MM(-10),MM(10))
    bbox = BoxUV.Create(int1,int2)
    my_cone = Body.CreateSurfaceBody(cone, bbox)
    my_body = DesignBody.Create(GetRootPart(), "my_cone", my_cone)
    for edge in my_body.Edges:
        Fill.Execute(Selection.Create(edge))