Create a surface body from Faces

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

Comments

  • Gabriel Messager
    Gabriel Messager Member, Employee Posts: 54
    5 Likes Name Dropper First Anniversary Ansys Employee
    Options
    # 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)