NamedSelection#
- class ansys.geometry.core.designer.selection.NamedSelection(name: str, design: ansys.geometry.core.designer.design.Design, grpc_client: ansys.geometry.core.connection.client.GrpcClient, bodies: list[ansys.geometry.core.designer.body.Body] | None = None, faces: list[ansys.geometry.core.designer.face.Face] | None = None, edges: list[ansys.geometry.core.designer.edge.Edge] | None = None, beams: list[ansys.geometry.core.designer.beam.Beam] | None = None, design_points: list[ansys.geometry.core.designer.designpoint.DesignPoint] | None = None, components: list[ansys.geometry.core.designer.component.Component] | None = None, vertices: list[ansys.geometry.core.designer.vertex.Vertex] | None = None, preexisting_id: str | None = None)#
Represents a single named selection within the design assembly.
This class synchronizes to a design within a supporting Geometry service instance.
A named selection organizes one or more design entities together for common actions against the entire group.
- Parameters:
- name
str User-defined name for the named selection.
- design
Design Design instance to which the named selection belongs.
- grpc_client
GrpcClient Active supporting Geometry service instance for design modeling.
- bodies
list[Body], default:None All bodies to include in the named selection.
- faces
list[Face], default:None All faces to include in the named selection.
- edges
list[Edge], default:None All edges to include in the named selection.
- beams
list[Beam], default:None All beams to include in the named selection.
- design_points
list[DesignPoints], default:None All design points to include in the named selection.
- components: list[Component], default: None
All components to include in the named selection.
- vertices: list[Vertex], default: None
All vertices to include in the named selection.
- name
Overview#
Add members to the named selection. |
|
Remove members from the named selection. |
ID of the named selection. |
|
Name of the named selection. |
|
All bodies in the named selection. |
|
All faces in the named selection. |
|
All edges in the named selection. |
|
All beams in the named selection. |
|
All design points in the named selection. |
|
All components in the named selection. |
|
All vertices in the named selection. |
Represent the |
Import detail#
from ansys.geometry.core.designer.selection import NamedSelection
Property detail#
- property NamedSelection.bodies: list[ansys.geometry.core.designer.body.Body]#
All bodies in the named selection.
- property NamedSelection.faces: list[ansys.geometry.core.designer.face.Face]#
All faces in the named selection.
- property NamedSelection.edges: list[ansys.geometry.core.designer.edge.Edge]#
All edges in the named selection.
- property NamedSelection.beams: list[ansys.geometry.core.designer.beam.Beam]#
All beams in the named selection.
- property NamedSelection.design_points: list[ansys.geometry.core.designer.designpoint.DesignPoint]#
All design points in the named selection.
- property NamedSelection.components: list[ansys.geometry.core.designer.component.Component]#
All components in the named selection.
- property NamedSelection.vertices: list[ansys.geometry.core.designer.vertex.Vertex]#
All vertices in the named selection.
Method detail#
- NamedSelection.add_members(bodies: list[ansys.geometry.core.designer.body.Body] | None = None, faces: list[ansys.geometry.core.designer.face.Face] | None = None, edges: list[ansys.geometry.core.designer.edge.Edge] | None = None, beams: list[ansys.geometry.core.designer.beam.Beam] | None = None, design_points: list[ansys.geometry.core.designer.designpoint.DesignPoint] | None = None, components: list[ansys.geometry.core.designer.component.Component] | None = None, vertices: list[ansys.geometry.core.designer.vertex.Vertex] | None = None) NamedSelection#
Add members to the named selection.
- Parameters:
- bodies
list[Body], default:None - All bodies to add to the named selection.
- faces
list[Face], default:None - All faces to add to the named selection.
- edges
list[Edge], default:None - All edges to add to the named selection.
- beams
list[Beam], default:None - All beams to add to the named selection.
- design_points
list[DesignPoints], default:None - All design points to add to the named selection.
- components: list[Component], default: None
- All components to add to the named selection.
- vertices: list[Vertex], default: None
- All vertices to add to the named selection.
- bodies
- Returns:
NamedSelectionThe new named selection with the added members. Changes are also reflected on the same named selection upon which the method is called.
Notes
Named selections are immutable. This method creates a new named selection with the added members.
- NamedSelection.remove_members(members: list[ansys.geometry.core.designer.body.Body | ansys.geometry.core.designer.face.Face | ansys.geometry.core.designer.edge.Edge | ansys.geometry.core.designer.beam.Beam | ansys.geometry.core.designer.designpoint.DesignPoint | ansys.geometry.core.designer.component.Component | ansys.geometry.core.designer.vertex.Vertex]) NamedSelection#
Remove members from the named selection.
- Parameters:
- members
listofBody,Face,Edge,Beam,DesignPoint,Component,orVertex The members to remove from the named selection.
- members
- Returns:
NamedSelectionThe new named selection with the members removed. Changes are also reflected on the same named selection upon which the method is called.