ON_ComponentAttributes Class Reference

#include <opennurbs_topology.h>

Public Types

enum  EdgeFlags : unsigned int {
  Open = 1, Closed = 2, Wire = 4, Boundary = 8,
  Interior = 16, Nonmanifold = 32, Oriented = 64, NotOriented = 128,
  Smooth = 256, Crease = 512, Dart = 1024, Seam = 2048,
  Slit = 4096, Degenerate = 4096, Damaged = 32768, Mask = 0xFFFF
}
 

Static Public Member Functions

static bool HasBoundary (unsigned int aggregate_edge_component_attributes)
 Inspects aggregate edge demographics to determine if there is a boundary edge. More...
 
static bool IsManifold (unsigned int aggregate_edge_component_attributes)
 Inspects aggregate edge demographics to determine if the object is a manifold, possibly with boundary. Face orientation is ignored. More...
 
static bool IsNotManifold (unsigned int aggregate_edge_component_attributes)
 Inspects aggregate edge demographics to determine if the object is a not manifold. More...
 
static bool IsNotOriented (unsigned int aggregate_edge_component_attributes)
 Inspects aggregate edge demographics to determine if the faces have a compatible orientations. More...
 
static bool IsOriented (unsigned int aggregate_edge_component_attributes)
 Inspects aggregate edge demographics to determine if the faces have a compatible orientations. More...
 
static bool IsSolid (unsigned int aggregate_edge_component_attributes)
 Inspects aggregate edge demographics to determine if every edge has exactly two faces and all the faces have a compatible orientations. More...
 

Member Enumeration Documentation

◆ EdgeFlags

enum ON_ComponentAttributes::EdgeFlags : unsigned int

ON_EdgeAttributeFlags are used to report attributes of single edge objects, like ON_SubDEdge and ON_BrepEdge, and aggregate edge demographics in objects with topology like ON_SubD, ON_Mesh and ON_Brep.

See also
ON_BrepEdge::ComponentAttributes, ON_SubDEdge::ComponentAttributes, ON_Brep::AggregateEdgeComponentAttributes, ON_Mesh::AggregateEdgeComponentAttributes, ON_SubD::AggregateEdgeComponentAttributes
Enumerator
Open 

The Open bit is set when an edge has distinct start and end vertices.

Closed 

The Closed bit is set when an edge begins and ends at the same vertex.

Wire 

The Wire bit when an edge has no faces.

Boundary 

The Boundary bit is set when an edge has one face.

Interior 

The Interior bit is set when an edge has two distinct faces.

Nonmanifold 

The Nonmanifold bit is set when an edge has three or more faces.

Oriented 

The Oriented bit is set when an edge has two faces with compatible orientations.

NotOriented 

The NotOriented bit is set when an edge has two faces with opposited orientations.

Smooth 

The Smooth bit is set when an an edge has two faces with a guaranteed surface tangent continuity.

Crease 

The Crease bit is set when an edge has two faces with a possible surface tangent discontinuity

Dart 

The Dart bit is set when an edge has two faces with a possible surface tangent discontinuity at one end and guaranteed surface tangent space continuity at the other end.

Seam 

The Seam bit is set when an edge has two faces that are identical and the edge is on the parametric boundary of the face's surface.

Parametric surfaces that are cylinders are an example of a situation where seam edges occur.

Slit 

The Slit bit is set when edge has two faces that are identical and the edges is not a seam.

Degenerate 

The Slit bit is set when an edge has zero length.

Damaged 

The Damaged bit is set when an edge has a critical flaw like missing vertex information.

Mask 

Mask can be used to isolate EdgeFlags bits from an unsigned int bit field containing other information.

Determine if two unsigned ints have identical EdgeFlags settings.

unsigned int combined_flags1 = ...;
unsigned int combined_flags2 = ...;
unsigned int edge_flags1 = (ON_ComponentAttributes::EdgeFlags::Mask &amp; combined_flags1);
unsigned int edge_flags2 = (ON_ComponentAttributes::EdgeFlags::Mask &amp; combined_flags2);
if ( edge_flags1 == edge_flags1)
{
... edges flags are identical ...
}

Member Function Documentation

◆ HasBoundary()

static bool ON_ComponentAttributes::HasBoundary ( unsigned int  aggregate_edge_component_attributes)
static

Inspects aggregate edge demographics to determine if there is a boundary edge.

Parameters
aggregate_edge_component_attributesValue made by bitwise or of ON_ComponentAttributes::EdgeFlags values for every edge in the object.
Returns
True if there is at least one edge that has exactly one face. Otherwise, false is returned.

◆ IsManifold()

static bool ON_ComponentAttributes::IsManifold ( unsigned int  aggregate_edge_component_attributes)
static

Inspects aggregate edge demographics to determine if the object is a manifold, possibly with boundary. Face orientation is ignored.

Parameters
aggregate_edge_component_attributesValue made by bitwise or of ON_ComponentAttributes::EdgeFlags values for every edge in the object.
Returns
If every edge has one or two faces, then true is returned. If bAllowBoundaryEdges is true and every edge has one or two faces, then true is returned. Otherwise, false is returned.

◆ IsNotManifold()

static bool ON_ComponentAttributes::IsNotManifold ( unsigned int  aggregate_edge_component_attributes)
static

Inspects aggregate edge demographics to determine if the object is a not manifold.

Parameters
aggregate_edge_component_attributesValue made by bitwise or of ON_ComponentAttributes::EdgeFlags values for every edge in the object.
Returns
True if there is at least one edge with 3 or more faces or at least one wire edge.

◆ IsNotOriented()

static bool ON_ComponentAttributes::IsNotOriented ( unsigned int  aggregate_edge_component_attributes)
static

Inspects aggregate edge demographics to determine if the faces have a compatible orientations.

Parameters
aggregate_edge_component_attributesValue made by bitwise or of ON_ComponentAttributes::EdgeFlags values for every edge in the object.
Returns
If there is an edge edge with exactly two faces and those faces have incompatible orientations, then true is returned. Otherwise, false is returned.

◆ IsOriented()

static bool ON_ComponentAttributes::IsOriented ( unsigned int  aggregate_edge_component_attributes)
static

Inspects aggregate edge demographics to determine if the faces have a compatible orientations.

Parameters
aggregate_edge_demographicsValue made by bitwise or of ON_ComponentAttributes::EdgeFlags values for every edge in the object.
Returns
If for every edge edge with exactly two faces, those two faces have compatible orientations, then true is returned. Otherwise, false is returned.

◆ IsSolid()

static bool ON_ComponentAttributes::IsSolid ( unsigned int  aggregate_edge_component_attributes)
static

Inspects aggregate edge demographics to determine if every edge has exactly two faces and all the faces have a compatible orientations.

This sample shows how to determine if an ON_SubD is a solid.

ON_SubD subd = ...;
if (ON_ComponentAttributes::IsSolid(subd.AggregateEdgeComponentAttributes())
{
// subd is a solid
...
}
Parameters
aggregate_edge_component_attributesValue made by bitwise or of ON_ComponentAttributes::EdgeFlags values for every edge in the object.
Returns
True if every edge has exactly two faces.
See also
ON_Brep::EdgeDemographics, ON_SUbD::EdgeDemographics, ON_Mesh::EdgeDemographics, ON_ComponentAttributes::IsSolid, ON_ComponentAttributes::IsNotSolid, ON_ComponentAttributes::HasBoundary, ON_ComponentAttributes::IsOriented, ON_ComponentAttributes::IsNotOriented, ON_ComponentAttributes::IsManifold, ON_ComponentAttributes::IsNotManifold