Rhino C++ API
8.12
|
#include <opennurbs_defines.h>
Public Types | |
enum | TYPE { invalid_type = 0, brep_vertex = 1, brep_edge = 2, brep_face = 3, brep_trim = 4, brep_loop = 5, mesh_vertex = 11, meshtop_vertex = 12, meshtop_edge = 13, mesh_face = 14, mesh_ngon = 15, idef_part = 21, polycurve_segment = 31, pointcloud_point = 41, group_member = 51, extrusion_bottom_profile = 61, extrusion_top_profile = 62, extrusion_wall_edge = 63, extrusion_wall_surface = 64, extrusion_cap_surface = 65, extrusion_path = 66, subd_vertex = 71, subd_edge = 72, subd_face = 73, hatch_loop = 81, dim_linear_point = 100, dim_radial_point = 101, dim_angular_point = 102, dim_ordinate_point = 103, dim_text_point = 104, dim_centermark_point = 105, dim_leader_point = 106, no_type = 0xFFFFFFFF } |
Static Public Member Functions | |
static int | Compare (const ON_COMPONENT_INDEX *a, const ON_COMPONENT_INDEX *b) |
static int | CompareType (const ON_COMPONENT_INDEX *lhs, const ON_COMPONENT_INDEX *rhs) |
static ON_COMPONENT_INDEX::TYPE | Type (int i) |
Public Attributes | |
int | m_index |
TYPE | m_type |
Static Public Attributes | |
static const ON_COMPONENT_INDEX | UnsetComponentIndex |
static const ON_COMPONENT_INDEX | WholeObject |
Description: Component indices are used to provide a persistent way to identify portions of complex objects.
Do not change these values; they are stored in 3dm archives and provide a persistent way to identify components of complex objects.
Enumerator | |
---|---|
invalid_type | |
brep_vertex | |
brep_edge | |
brep_face | |
brep_trim | |
brep_loop | |
mesh_vertex | |
meshtop_vertex | |
meshtop_edge | |
mesh_face | |
mesh_ngon | |
idef_part | |
polycurve_segment | |
pointcloud_point | |
group_member | |
extrusion_bottom_profile | 3d bottom profile curves index identifies profile component |
extrusion_top_profile | 3d top profile curves index identifies profile component |
extrusion_wall_edge | 3d wall edge curve index/2: identifies profile component index%2: 0 = start, 1 = end |
extrusion_wall_surface | side wall surfaces index: identifies profile component |
extrusion_cap_surface | bottom and top cap surfaces index: 0 = bottom, 1 = top |
extrusion_path | extrusion path (axis line) index -1 = entire path, 0 = start point, 1 = endpoint |
subd_vertex | m_index = ON_SubDVertex.m_id, use ON_SubD.ComponentPtrFromComponentIndex() ON_SubD component index Use ON_SubD.ComponentPtrFromComponentIndex() to convert an ON_COMPONENT_INDEX into a component pointer. See also ON_SubD.VertexFromId() ON_SubD.EdgeFromId() ON_SubD.FaceFromId() |
subd_edge | m_index = ON_SubDEdge.m_id |
subd_face | m_index = ON_SubDFace.m_id |
hatch_loop | m_index = ON_Hatch::m_loops[] array index |
dim_linear_point | |
dim_radial_point | |
dim_angular_point | |
dim_ordinate_point | |
dim_text_point | |
dim_centermark_point | |
dim_leader_point | |
no_type |
ON_COMPONENT_INDEX::ON_COMPONENT_INDEX | ( | ) |
Description: Default constructor has value ON_COMPONENT_INDEX UnsetComponentIndex.
ON_COMPONENT_INDEX::ON_COMPONENT_INDEX | ( | ON_COMPONENT_INDEX::TYPE | type, |
int | index | ||
) |
Description: Sets m_type = type and m_index = index.
void ON_COMPONENT_INDEX::AppendToString | ( | class ON_String & | s | ) | const |
void ON_COMPONENT_INDEX::AppendToString | ( | class ON_wString & | s | ) | const |
|
static |
Description: Dictionary compare on m_type, m_index as ints. Returns: < 0: a < b = 0: a = b
0: a > b
|
static |
Description: Compare on m_type (as an int).
void ON_COMPONENT_INDEX::Dump | ( | class ON_TextLog & | text_log | ) | const |
bool ON_COMPONENT_INDEX::IsAnnotationComponentIndex | ( | ) | const |
Returns: True if m_type = dim_... and m_index >= 0.
bool ON_COMPONENT_INDEX::IsBrepComponentIndex | ( | ) | const |
Returns: True if m_type is set to one of the brep TYPE enum values and m_index >= 0.
bool ON_COMPONENT_INDEX::IsExtrusionComponentIndex | ( | ) | const |
Returns: True if m_type = extrusion_bottom_profile, extrusion_top_profile, extrusion_wall_edge, extrusion_wall_surface, extrusion_cap_surface or extrusion_path and m_index is reasonable.
bool ON_COMPONENT_INDEX::IsExtrusionPathComponentIndex | ( | ) | const |
Returns: True if m_type = extrusion_path and -1 <= m_index <= 1.
bool ON_COMPONENT_INDEX::IsExtrusionProfileComponentIndex | ( | ) | const |
Returns: True if m_type = extrusion_bottom_profile or extrusion_top_profile and m_index >= 0.
bool ON_COMPONENT_INDEX::IsExtrusionWallComponentIndex | ( | ) | const |
Returns: True if m_type = extrusion_wall_surface or extrusion_wall_edge and m_index >= 0.
bool ON_COMPONENT_INDEX::IsExtrusionWallEdgeComponentIndex | ( | ) | const |
Returns: True if m_type = extrusion_wall_edge and m_index >= 0.
bool ON_COMPONENT_INDEX::IsExtrusionWallSurfaceComponentIndex | ( | ) | const |
Returns: True if m_type = extrusion_wall_surface and m_index >= 0.
bool ON_COMPONENT_INDEX::IsGroupMemberComponentIndex | ( | ) | const |
Returns: True if m_type = group_member and m_index >= 0.
bool ON_COMPONENT_INDEX::IsHatchLoopComponentIndex | ( | ) | const |
Returns: True if m_type = hatch_loop and m_index >= 0.
bool ON_COMPONENT_INDEX::IsIDefComponentIndex | ( | ) | const |
Returns: True if m_type = idef_part and m_index >= 0.
bool ON_COMPONENT_INDEX::IsMeshComponentIndex | ( | ) | const |
Returns: True if m_type is set to one of the mesh or meshtop TYPE enum values and m_index >= 0.
bool ON_COMPONENT_INDEX::IsNotSet | ( | ) | const |
bool ON_COMPONENT_INDEX::IsPointCloudComponentIndex | ( | ) | const |
Returns: True if m_type = pointcloud_point and m_index >= 0.
bool ON_COMPONENT_INDEX::IsPolyCurveComponentIndex | ( | ) | const |
Returns: True if m_type = polycurve_segment and m_index >= 0.
bool ON_COMPONENT_INDEX::IsSet | ( | ) | const |
Returns: True if m_type is set to a TYPE enum value between brep_vertex and dim_leader_point.
bool ON_COMPONENT_INDEX::IsSubDComponentIndex | ( | ) | const |
Returns: True if m_type is set to one of the subd TYPE enum values and m_index >= 0.
bool ON_COMPONENT_INDEX::operator!= | ( | const ON_COMPONENT_INDEX & | other | ) | const |
bool ON_COMPONENT_INDEX::operator< | ( | const ON_COMPONENT_INDEX & | other | ) | const |
bool ON_COMPONENT_INDEX::operator<= | ( | const ON_COMPONENT_INDEX & | other | ) | const |
bool ON_COMPONENT_INDEX::operator== | ( | const ON_COMPONENT_INDEX & | other | ) | const |
bool ON_COMPONENT_INDEX::operator> | ( | const ON_COMPONENT_INDEX & | other | ) | const |
bool ON_COMPONENT_INDEX::operator>= | ( | const ON_COMPONENT_INDEX & | other | ) | const |
void ON_COMPONENT_INDEX::Set | ( | ON_COMPONENT_INDEX::TYPE | type, |
int | index | ||
) |
void ON_COMPONENT_INDEX::Set | ( | ON_COMPONENT_INDEX::TYPE | type, |
unsigned int | index | ||
) |
|
static |
Description: Safe conversion of integer value to TYPE enum. Parameters: i - [in] integer with value equal to one of the TYPE enums. Returns: The TYPE enum with the same numeric value or ON_COMPONENT_INDEX::invalid_type if no corresponding enum exists.
void ON_COMPONENT_INDEX::UnSet | ( | ) |
Description: Sets m_type = invalid_type and m_index = -1.
|
inline |
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 ON_Brep.m_V[] array index brep_edge ON_Brep.m_E[] array index brep_face ON_Brep.m_F[] array index brep_trim ON_Brep.m_T[] array index brep_loop ON_Brep.m_L[] array index mesh_vertex ON_Mesh.m_V[] array index meshtop_vertex ON_MeshTopology.m_topv[] array index meshtop_edge ON_MeshTopology.m_tope[] array index mesh_face ON_Mesh.m_F[] array index mesh_ngon ON_Mesh.Ngon() array index idef_part ON_InstanceDefinition.m_object_uuid[] array index polycurve_segment ON_PolyCurve::m_segment[] array index
extrusion_bottom_profile Use ON_Extrusion::Profile3d() to get 3d profile curve extrusion_top_profile Use ON_Extrusion::Profile3d() to get 3d profile curve extrusion_wall_edge Use ON_Extrusion::WallEdge() to get 3d line curve extrusion_wall_surface Use ON_Extrusion::WallSurface() to get 3d wall surface extrusion_cap_surface 0 = bottom cap, 1 = top cap extrusion_path -1 = entire path, 0 = start of path, 1 = end of path
hatch_loop ON_Hatch::m_loops[] array index
dim_linear_point linear dimension point index dim_radial_point radial dimension point index dim_angular_point angular dimension point index dim_ordinate_point ordinate dimension point index dim_text_point annotation text object point
int ON_COMPONENT_INDEX::m_index |
TYPE ON_COMPONENT_INDEX::m_type |
|
static |
Description: UnsetComponentIndex.m_type = invalid_type UnsetComponentIndex.m_index = -1 as int = ON_UNSET_UINT_INDEX as unsigned int
|
static |