Create a surface body from Faces

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

Comments

  • Gabriel Messager
    Gabriel Messager Member, Employee Posts: 54
    Ansys Employee First Anniversary Name Dropper 5 Likes
    ✭✭✭✭
    # Python Script, API Version = V23
    from SpaceClaim.Api.V23.Modeler import Face
    list_faces = List[Face]()
    sel = Selection.GetActive()
    body_ref = sel.ConvertToBodies().Items[0]
    for item in sel.Items:
        list_faces.Add(item.Shape)
    new_body = body_ref.Shape.CopyFaces(list_faces)
    DesignBody.Create(GetRootPart(),"new_body",new_body)