How to create a surface cylinder in Spaceclaim?

Gabriel Messager
Gabriel Messager Member, Employee Posts: 45
First Anniversary Ansys Employee First Comment Photogenic
edited June 2023 in 3D Design

Comments

  • Gabriel Messager
    Gabriel Messager Member, Employee Posts: 45
    First Anniversary Ansys Employee First Comment Photogenic
    import math
    
    ClearAll()
    
    r=Parameters.Parameter1
    h=Parameters.Parameter2
    th=Parameters.Parameter3
    z_offset = M(0)
    
    origin_point = Point.Create(M(0), M(0), M(z_offset))
    frame = Frame.Create(origin_point, Direction.DirX, Direction.DirY)
    cylinder = Cylinder.Create(frame, M(r))
    int1 = Interval.Create(0,2*math.pi)
    int2 = Interval.Create(M(0),M(h))
    bbox = BoxUV.Create(int1,int2)
    cylinder_body = SurfaceBody.Create(cylinder, bbox, GetRootPart(), "my_body")