Properties |
Methods |
The collection of geometrical entities that you want to work with.
The ShapeRange is a collection of Shape objects that contains the Shape objects you want to work with. You construct a ShapeRange collections at any time you using range construction properties provided by the Shapes collection or by another ShapeRange.
When you use an AddEdge method for creating a new edge in the model, you already get the ShapeRange collection containing all the edges you have created, even if there is only one edge. That is because when the newly edge created intersects other edges or vertices, it will be split into parts by each intersection point.
Another way to get a ShapeRange is by using one of the properties listed in the table below.
Property |
Provided by |
Description |
Choosing shapes by type | ||
Blocks property |
Shapes,
|
Selects all the blocks from the parent collection |
Edges property |
Shapes,
|
Selects all the edges from the parent collection |
Vertices property |
Shapes,
|
Selects all the vertices from the parent collection |
Choosing by relative position | ||
Shapes,
|
Returns a ShapeRange collection containing the nearest block to the given point, the nearest edge, and the nearest vertex (if any). | |
Boundary(Edges As QfBoundaryEdges)
|
Shapes,
|
Returns an unordered collection of block's boundary edges.
|
ShapeRange,
|
Applicable to the ShapeRange collection consisting only of edges (usually constructed by the AddEdge method).
| |
Choosing by location | ||
InRectangle
|
Shapes,
|
Selects the shapes that are situated completely inside of the given rectangle. |
Shapes,
|
Selects the shapes that are situated inside of the given circle. | |
Choosing by non-geometric properties | ||
LabeledAs
|
Shapes,
|
Returns all the shapes that are labeled by the given label. |
Selection property |
Model |
Return all shapes that are currently selected by an interactive user. |
Flagged
|
Shapes,
|
You can assign an integer value to the each shape by the UserData property.
|
With a ShapeRange collection you can do almost the same thing as with selection on the model editor window: delete all the shapes (Delete method), build and remove the finite element mesh (BuildMesh and RemoveMesh methods), set properties like mesh Spacing and Label. You can also move the shapes to another location (Move method), or create a copy of it in the given position (Duplicate method). The Select method highlights the shapes in the model editor window.
Being a regular collection, the ShapeRange provides common standard methods for navigation and iteration through its members.