Selection class is used to select parts or elements for condition settings.
The class can be called from Model class, CalculationDefinition class, Condition class, MeshGroup class, and Set class.
.
More...
Public Member Functions | |
| void | Add (Selection *selection) |
| Adds a second selection to this selection. Both selections must share the same model. | |
| void | Attach () |
| Turns on the highlight function for the selected area. | |
| void | Clear () |
| Clears the selection. | |
| void | Detach () |
| Turns off the highlight function for the selected area. | |
| int | EdgeID (int index) |
| Returns the selected edge ID. More... | |
| int | ElementEdgeElementID (int index) |
| Returns the element ID of the selected element edge. More... | |
| int | ElementEdgeIndex (int index) |
| Returns the edge index of the selected element edge. More... | |
| int | ElementFaceElementID (int index) |
| Returns the element ID of the selected element face. More... | |
| int | ElementFaceIndex (int index) |
| Returns the face index of the selected element face. More... | |
| int | ElementID (int index) |
| Returns the selected element ID. More... | |
| int | FaceID (int index) |
| Returns the selected face ID. More... | |
| Part * | GetPart (int index) |
| Returns the selected part object. More... | |
| bool | IsAttached () |
| Returns the ON / OFF state of the highlight feature for the selected area. More... | |
| bool | IsValid () |
| Returns True if an object is valid. More... | |
| int | NodeID (int index) |
| Returns the selected node ID. More... | |
| int | NumEdges () |
| Returns the number of selected edges as an integer. More... | |
| int | NumElementEdges () |
| Returns the number of selected element edges as an integer. More... | |
| int | NumElementFaces () |
| Returns the number of selected element faces as an integer. More... | |
| int | NumElements () |
| Returns the number of selected elements as an integer. More... | |
| int | NumFaces () |
| Returns the numbers of selected faces as an integer. More... | |
| int | NumNodes () |
| Returns the number of selected nodes as an integer. More... | |
| int | NumParts () |
| Returns the number of selected parts as an integer. More... | |
| int | NumVertices () |
| Returns the number of selected nodes as an integer. More... | |
| int | PartID (int index) |
| Returns the identifier of the the part with specified index from among the selected parts. Returns -1 when an unused index is specified. More... | |
| void | SelectEdge (int edgeId) |
| Selects an edge by specifying ID. More... | |
| void | SelectEdgeByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects edges included in a region by specifying a round or cylindrical region. More... | |
| void | SelectEdgeByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects edges included in a region by specifying a round or cylindrical region. More... | |
| void | SelectEdgeByPosition (double x, double y, double z) |
| Selects an edge that includes the point, by specifying coordinates. More... | |
| void | SelectEdgeByRange (Point *lower, Point *upper, bool visible) |
| Selects edges by a rectangle from two specified points. More... | |
| void | SelectElement (int elementId) |
| Selects elements by specifying Id. More... | |
| void | SelectElementByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects elements included in a region by specifying a round or cylindrical region. More... | |
| void | SelectElementByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects elements included in a region by specifying a round or cylindrical region. More... | |
| void | SelectElementByPosition (double x, double y, double z) |
| Selects an element including the position by specifying coordinates. More... | |
| void | SelectElementByRange (Point *lower, Point *upper, bool visible) |
| Selects elements by a rectangle from two specified points. More... | |
| void | SelectElementEdge (int elementId, int index) |
| Selects element edge by specifying element ID and edge number. More... | |
| void | SelectElementEdgeByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects element edges included in a region by specifying a round or cylindrical region. More... | |
| void | SelectElementEdgeByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects element edges included in a region by specifying a round or cylindrical region. More... | |
| void | SelectElementEdgeByPosition (double x, double y, double z) |
| Selects an element edge that passes the point by specifying coordinates. More... | |
| void | SelectElementEdgeByRange (Point *lower, Point *upper, bool visible) |
| Selects element edges by a rectangle from two specified points. More... | |
| void | SelectElementFace (int elementId, int index) |
| Selects element face by specifying element ID and face number. More... | |
| void | SelectElementFaceByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects element faces included in a region by specifying a round or cylindrical region. More... | |
| void | SelectElementFaceByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects element faces included in a region by specifying a round or cylindrical region. More... | |
| void | SelectElementFaceByPosition (double x, double y, double z) |
| Selects an element face including the position by specifying coordinates. More... | |
| void | SelectElementFaceByRange (Point *lower, Point *upper, bool visible) |
| Selects element faces by a rectangle from two specified points. More... | |
| void | SelectFace (int faceId) |
| Selects a face by specifying ID. More... | |
| void | SelectFaceByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects faces included in a region by specifying a round or cylindrical range. More... | |
| void | SelectFaceByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects faces included in a region by specifying a round or cylindrical region. More... | |
| void | SelectFaceByPosition (double x, double y, double z) |
| Selects a face that includes the the point by specifying coordinates. More... | |
| void | SelectFaceByRange (Point *lower, Point *upper, bool visible) |
| Selects faces by a rectangle from two specified points. More... | |
| void | SelectNode (int nodeId) |
| Selects node by specifying ID. More... | |
| void | SelectNodeByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects nodes included in a region by specifying a round or cylindrical region. More... | |
| void | SelectNodeByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects vertices included in a region by specifying a round or cylindrical region. More... | |
| void | SelectNodeByPosition (double x, double y, double z) |
| Selects a node by specifying coordinates. More... | |
| void | SelectNodeByRange (Point *lower, Point *upper, bool visible) |
| Selects nodes by a rectangle from two specified points. More... | |
| void | SelectPart (Variant &val) |
| Selects a part by specifying a name or ID. More... | |
| void | SelectPartByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects parts included within a region by specifying a round or cylindrical area. More... | |
| void | SelectPartByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects parts included in a region by specifying a round or cylindrical region. More... | |
| void | SelectPartByPosition (double x, double y, double z) |
| Selects a part that includes the point by specifying coordinates. More... | |
| void | SelectPartByRange (Point *lower, Point *upper, bool visible) |
| Selects parts by a rectangle from two specified points. More... | |
| void | SelectVertex (int vertexId) |
| Selects a vertex by specifying ID. More... | |
| void | SelectVertexByCylinder (Point *center, Point *center_axis, Point *x_axis, double inner, double outer, double startAngle, double endAngle, bool is_useheight, double top, double bottom, bool visible) |
| Selects vertices included in a region by specifying a round or cylindrical region. More... | |
| void | SelectVertexByCylinderObject (Cylinder *cylinder, bool visible) |
| Selects vertices included in a region by specifying a round or cylindrical region. More... | |
| void | SelectVertexByPosition (double x, double y, double z) |
| Selects the vertex by specifying coordinates. More... | |
| void | SelectVertexByRange (Point *lower, Point *upper, bool visible) |
| Selects vertices by a rectangle from two specified points. More... | |
| void | SetBlockUpdateView (bool block) |
| Specifies whether to redraw the graphics window or not. The default is False. More... | |
| int | VertexID (int index) |
| Returns the selected vertex ID. More... | |
Selection class is used to select parts or elements for condition settings.
The class can be called from Model class, CalculationDefinition class, Condition class, MeshGroup class, and Set class.
.
Example of calling a class object:
Example of using the function of this class:
This class has some functions that needs to execute Attach() beforehand.
See the description of the Application class for CreatePoint() .
ID of parts, elements, and nodes can be confirmed in the main window by selecting [View] > [ID] from JMAG-Designer menu.
| int Selection::EdgeID | ( | int | index | ) |
Returns the selected edge ID.
| index | The index of the selected edge. 0 <= index < NumEdges() |
| int Selection::ElementEdgeElementID | ( | int | index | ) |
Returns the element ID of the selected element edge.
| index | The index of the selected element edge. 0 <= index < NumElementEdges() |
| int Selection::ElementEdgeIndex | ( | int | index | ) |
Returns the edge index of the selected element edge.
| index | The index of the selected element edge. 0 <= index < NumElementEdges() |
| int Selection::ElementFaceElementID | ( | int | index | ) |
Returns the element ID of the selected element face.
| index | The index of the selected element face. 0 <= index < NumElementFaces() |
| int Selection::ElementFaceIndex | ( | int | index | ) |
Returns the face index of the selected element face.
| index | The index of the selected element face. 0 <= index < NumElementFaces() |
| int Selection::ElementID | ( | int | index | ) |
Returns the selected element ID.
| index | The index of the selected element. 0 <= index < NumElements() |
| int Selection::FaceID | ( | int | index | ) |
Returns the selected face ID.
| index | The index of the selected face. 0 <= index < NumFaces() |
| Part * Selection::GetPart | ( | int | index | ) |
Returns the selected part object.
| index | The index of the selected part. 0 <= index < NumParts() |
| bool Selection::IsAttached | ( | ) |
Returns the ON / OFF state of the highlight feature for the selected area.
| bool Selection::IsValid | ( | ) |
Returns True if an object is valid.
| int Selection::NodeID | ( | int | index | ) |
Returns the selected node ID.
| index | The index of the selected node. 0 <= index < NumNodes() |
| int Selection::NumEdges | ( | ) |
Returns the number of selected edges as an integer.
| int Selection::NumElementEdges | ( | ) |
Returns the number of selected element edges as an integer.
| int Selection::NumElementFaces | ( | ) |
Returns the number of selected element faces as an integer.
| int Selection::NumElements | ( | ) |
Returns the number of selected elements as an integer.
| int Selection::NumFaces | ( | ) |
Returns the numbers of selected faces as an integer.
| int Selection::NumNodes | ( | ) |
Returns the number of selected nodes as an integer.
| int Selection::NumParts | ( | ) |
Returns the number of selected parts as an integer.
| int Selection::NumVertices | ( | ) |
Returns the number of selected nodes as an integer.
| int Selection::PartID | ( | int | index | ) |
Returns the identifier of the the part with specified index from among the selected parts. Returns -1 when an unused index is specified.
| index | The index of the selected part. 0 <= index < NumParts() |
| void Selection::SelectEdge | ( | int | edgeId | ) |
Selects an edge by specifying ID.
| edgeId | Edge ID |
| void Selection::SelectEdgeByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects edges included in a region by specifying a round or cylindrical region.
| center | Center position |
| center_axis | Center position of an axis |
| x_axis | X-axis position |
| inner | Internal radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether to use the height |
| top | The top of the height |
| bottom | The bottom of the height |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectEdgeByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectEdgeByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects an edge that includes the point, by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects edges by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) is specified with Point type. |
| upper | Coordinates of second point (x, y, z) is specified with Point type. |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectElement | ( | int | elementId | ) |
Selects elements by specifying Id.
| elementId | Element ID |
| void Selection::SelectElementByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects elements included in a region by specifying a round or cylindrical region.
| center | Center position |
| center_axis | The center position of the axis |
| x_axis | X-axis position |
| inner | Internal radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether or not to use height |
| top | Top of height |
| bottom | Bottom of height |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectElementByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectElementByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects an element including the position by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects elements by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) |
| upper | Coordinates of second point (x, y, z) |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectElementEdge | ( | int | elementId, |
| int | index | ||
| ) |
Selects element edge by specifying element ID and edge number.
| elementId | Element ID |
| index | Edge number |
| void Selection::SelectElementEdgeByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects element edges included in a region by specifying a round or cylindrical region.
| center | Center position |
| center_axis | Center position of axis |
| x_axis | X-axis position |
| inner | Inner radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether or not to use height |
| top | Top of height |
| bottom | Bottom of height |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectElementEdgeByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectElementEdgeByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects an element edge that passes the point by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects element edges by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) |
| upper | Coordinates of second point (x, y, z) |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectElementFace | ( | int | elementId, |
| int | index | ||
| ) |
Selects element face by specifying element ID and face number.
| elementId | Element ID |
| index | Face number |
| void Selection::SelectElementFaceByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects element faces included in a region by specifying a round or cylindrical region.
| center | Center position |
| center_axis | Center position of an axis |
| x_axis | X-axis position |
| inner | Inner radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether or not to use height |
| top | Top of height |
| bottom | Bottom of height |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectElementFaceByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectElementFaceByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects an element face including the position by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects element faces by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) |
| upper | Coordinates of second point (x, y, z) |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectFace | ( | int | faceId | ) |
Selects a face by specifying ID.
| faceId | Face ID |
| void Selection::SelectFaceByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects faces included in a region by specifying a round or cylindrical range.
| center | Center position |
| center_axis | Center position of an axis |
| x_axis | X-axis position |
| inner | Inner radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether or now to use height |
| top | Top of height |
| bottom | Bottom of height |
| visible | 0: Selects hidden targets
1: Do now select hidden targets
|
| void Selection::SelectFaceByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectFaceByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects a face that includes the the point by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects faces by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) |
| upper | Coordinates of second point (x, y, z) |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectNode | ( | int | nodeId | ) |
Selects node by specifying ID.
| nodeId | Node ID |
| void Selection::SelectNodeByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects nodes included in a region by specifying a round or cylindrical region.
| center | Center position |
| center_axis | Center position of axis |
| x_axis | X-axis position |
| inner | Inner radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether or not to use height |
| top | Top of height |
| bottom | Bottom of height |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectNodeByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectNodeByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects a node by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects nodes by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) |
| upper | Coordinates of second point (x, y, z) |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectPart | ( | Variant & | val | ) |
Selects a part by specifying a name or ID.
| val | Part name or ID |
| void Selection::SelectPartByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects parts included within a region by specifying a round or cylindrical area.
| center | Center position |
| center_axis | The center position of an axis |
| x_axis | X-axis position |
| inner | Inner radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether or not to use height |
| top | Top of height |
| bottom | Bottom of height |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectPartByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectPartByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects a part that includes the point by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects parts by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) |
| upper | Coordinates of second point (x, y, z) |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectVertex | ( | int | vertexId | ) |
Selects a vertex by specifying ID.
| vertexId | Vertex ID |
| void Selection::SelectVertexByCylinder | ( | Point * | center, |
| Point * | center_axis, | ||
| Point * | x_axis, | ||
| double | inner, | ||
| double | outer, | ||
| double | startAngle, | ||
| double | endAngle, | ||
| bool | is_useheight, | ||
| double | top, | ||
| double | bottom, | ||
| bool | visible | ||
| ) |
Selects vertices included in a region by specifying a round or cylindrical region.
| center | Center position |
| center_axis | Center position of an axis |
| x_axis | X-axis position |
| inner | Inner radius |
| outer | Outer radius |
| startAngle | Start angle |
| endAngle | End angle |
| is_useheight | Whether or not to use height |
| top | Top of height |
| bottom | Bottom of height |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SelectVertexByCylinderObject | ( | Cylinder * | cylinder, |
| bool | visible | ||
| ) |
| void Selection::SelectVertexByPosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
Selects the vertex by specifying coordinates.
| x | X-coordinate |
| y | Y-coordinate |
| z | Z-coordinate |
Selects vertices by a rectangle from two specified points.
| lower | Coordinates of first point (x, y, z) is specified with Point type. |
| upper | Coordinates of second point (x, y, z) is specified with Point type. |
| visible | 0: Selects hidden targets
1: Do not select hidden targets
|
| void Selection::SetBlockUpdateView | ( | bool | block | ) |
Specifies whether to redraw the graphics window or not. The default is False.
| block | If block is True the graphics window is not redrawn after each method execution. |
| int Selection::VertexID | ( | int | index | ) |
Returns the selected vertex ID.
| index | The index of the selected vertex. 0 <= index < NumVertices() |