ComponentIndex
References[StructLayout(LayoutKind.Sequential, Pack = 4, Size = 8)]
[Serializable]
public struct ComponentIndex : IEquatable<ComponentIndex>, IComparable<ComponentIndex>
Represents an index of an element contained in another object.
Constructors
Construct component index with a specific type/index combination
Parameters:
| type (ComponentIndexType) | |
| index (int) |
Properties
The interpretation of Index depends on the Type value. Type m_index interpretation (0 based indices) no_type used when context makes it clear what array is being index brep_vertex Brep.m_V[] array index brep_edge Brep.m_E[] array index brep_face Brep.m_F[] array index brep_trim Brep.m_T[] array index brep_loop Brep.m_L[] array index mesh_vertex Mesh.m_V[] array index meshtop_vertex MeshTopology.m_topv[] array index meshtop_edge MeshTopology.m_tope[] array index mesh_face Mesh.m_F[] array index idef_part InstanceDefinition.m_object_uuid[] array index polycurve_segment PolyCurve::m_segment[] array index dim_linear_point LinearDimension2::POINT_INDEX dim_radial_point RadialDimension2::POINT_INDEX dim_angular_point AngularDimension2::POINT_INDEX dim_ordinate_point OrdinateDimension2::POINT_INDEX dim_text_point TextEntity2 origin point.
The interpretation of m_index depends on the m_type value. m_type m_index interpretation (0 based indices) no_type used when context makes it clear what array is being index brep_vertex Brep.m_V[] array index brep_edge Brep.m_E[] array index brep_face Brep.m_F[] array index brep_trim Brep.m_T[] array index brep_loop Brep.m_L[] array index mesh_vertex Mesh.m_V[] array index meshtop_vertex MeshTopology.m_topv[] array index meshtop_edge MeshTopology.m_tope[] array index mesh_face Mesh.m_F[] array index idef_part InstanceDefinition.m_object_uuid[] array index polycurve_segment PolyCurve::m_segment[] array index dim_linear_point LinearDimension2::POINT_INDEX dim_radial_point RadialDimension2::POINT_INDEX dim_angular_point AngularDimension2::POINT_INDEX dim_ordinate_point OrdinateDimension2::POINT_INDEX dim_text_point TextEntity2 origin point.
True if ComponentIndexType is set to a value between ComponentIndexType.BrepVertex and ComponentIndexType.DimLeaderPoint.
Methods
Compares this ComponentIndex with another ComponentIndex.
Parameters:
| other (ComponentIndex) | The other ComponentIndex to use in comparison |
Returns:
0: if this is identical to other
-1: if this.ComponentIndexType < other.ComponentIndexType
-1: if this.ComponentIndexType == other.ComponentIndexType and this.Index < other.Index
+1: otherwise.
Determines whether the specified ComponentIndex is equal to the current ComponentIndex, comparing by value.
Parameters:
| other (ComponentIndex) | The other ComponentIndex to compare with. |
Returns: true if other has the same ComponentIndexType and Index as this; otherwise, false.
Determines whether the specified object is equal to the current ComponentIndex, comparing by value.
Parameters:
| obj (object) | The other object to compare with. |
Returns: true if obj is a ComponentIndex and ComponentIndexType and Index is the same; false otherwise.
Overrides: ValueType.Equals
Computes the hash code for this ComponentIndex object.
Returns: A hash value that might be equal for two different ComponentIndex values.
Overrides: ValueType.GetHashCode
Operators
| Operation | Result | Description | ||
|---|---|---|---|---|
| ComponentIndex | == | ComponentIndex | bool | Determines whether two ComponentIndexes have equal values. |
| ComponentIndex | > | ComponentIndex | bool | Determines whether the first ComponentIndex comes after the second. |
| ComponentIndex | >= | ComponentIndex | bool | Determines whether the first ComponentIndex comes after the second, or it is equal to it. |
| ComponentIndex | != | ComponentIndex | bool | Determines whether two ComponentIndexes have different values. |
| ComponentIndex | < | ComponentIndex | bool | Determines whether the first ComponentIndex comes before the second. |
| ComponentIndex | <= | ComponentIndex | bool | Determines whether the first ComponentIndex comes before the second, or it is equal to it. |