Rhino C++ API  8.13
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ON_SubDEdgeChain Class Reference

#include <opennurbs_subd.h>

Public Member Functions

 ON_SubDEdgeChain ()=default
 
 ON_SubDEdgeChain (const ON_SubDEdgeChain &)=default
 
 ~ON_SubDEdgeChain ()=default
 
unsigned int AddAllNeighbors (ON_ChainDirection direction, ON_SubD::ChainType chain_type)
 
unsigned int AddEdge (const ON_SubDEdge *edge)
 
unsigned int AddOneNeighbor (ON_ChainDirection direction, ON_SubD::ChainType chain_type)
 
unsigned int BeginEdgeChain (ON_UUID persistent_subd_id, ON_SubDRef subd_ref, const ON_SimpleArray< const ON_SubDEdge * > &initial_edge_chain)
 
unsigned int BeginEdgeChain (ON_UUID persistent_subd_id, ON_SubDRef subd_ref, const ON_SimpleArray< ON_SubDEdgePtr > &initial_edge_chain)
 
unsigned int BeginEdgeChain (ON_UUID persistent_subd_id, ON_SubDRef subd_ref, const ON_SubDEdge *const *initial_edge_chain, size_t edge_count)
 
unsigned int BeginEdgeChain (ON_UUID persistent_subd_id, ON_SubDRef subd_ref, const ON_SubDEdge *initial_edge)
 
unsigned int BeginEdgeChain (ON_UUID persistent_subd_id, ON_SubDRef subd_ref, const ON_SubDEdgePtr *initial_edge_chain, size_t edge_count)
 
unsigned int BeginEdgeChain (ON_UUID persistent_subd_id, ON_SubDRef subd_ref, ON_SubDEdgePtr initial_edge)
 
void ClearEdgeChain ()
 
const ON_3dPoint ControlNetPoint (int vertex_index) const
 
void Dump (class ON_TextLog &text_log) const
 
const ON_SubDEdgeEdge (int edge_index) const
 
const ON_SimpleArray< ON_SubDEdgePtr > & EdgeChain () const
 
unsigned int EdgeCount () const
 
const ON_SubDEdgePtr EdgePtr (int edge_index) const
 
ON_NurbsCurveEdgeSurfaceCurve (ON_NurbsCurve *destination) const
 
const ON_3dPoint FirstControlNetPoint () const
 
const ON_SubDEdgeFirstEdge () const
 
const ON_SubDEdgePtr FirstEdgePtr () const
 
const ON_SubDVertexFirstVertex () const
 
bool GetSideComponents (unsigned relative_side, ON_SimpleArray< ON_SubDComponentPtr > &side_components) const
 
const ON_SHA1_Hash Hash () const
 
bool HasPersistentEdgeIds () const
 
bool HasRuntimeEdgePtrs () const
 
bool InChain (const ON_SubDEdge *edge) const
 
bool InChain (const ON_SubDEdgePtr edge_ptr) const
 
bool InChain (const ON_SubDVertex *vertex) const
 
bool IsClosedLoop () const
 
bool IsConvexLoop (bool bStrictlyConvex) const
 
const ON_3dPoint LastControlNetPoint () const
 
const ON_SubDEdgeLastEdge () const
 
const ON_SubDEdgePtr LastEdgePtr () const
 
const ON_SubDVertexLastVertex () const
 
ON_NurbsCurveLoftCurve (ON_NurbsCurve *destination) const
 
ON_SubDEdgeChainoperator= (const ON_SubDEdgeChain &)=default
 
const ON_UUID PersistentSubDId () const
 
bool Read (class ON_BinaryArchive &archive)
 
unsigned int RemoveEdges (const ON_SubDEdge *first_edge, const ON_SubDEdge *last_edge)
 
void Reverse ()
 
bool SetPersistentEdgeIdsFromRuntimeEdgePtrs () const
 
bool SetRuntimeEdgePtrsFromPersistentSubD (ON_UUID persistent_subd_id, ON_SubDRef persistent_subd_ref)
 
void SetStatusCheck (bool bEnableStatusCheck, ON_ComponentStatus status_check_pass, ON_ComponentStatus status_check_fail)
 
bool StatusCheck (const ON_SubDEdge *edge) const
 
bool StatusCheckEnabled () const
 
const ON_ComponentStatus StatusCheckFail () const
 
const ON_ComponentStatus StatusCheckPass () const
 
const ON_SubDSubD () const
 
const ON_SubDRef SubDRef () const
 
const ON_SubDVertexVertex (int vertex_index) const
 
bool Write (class ON_BinaryArchive &archive) const
 

Static Public Member Functions

static bool ContinueChainDefaultCallback (ON__UINT_PTR continue_condition, ON_SubDEdgePtr left_eptr, ON_SubDEdgePtr right_eptr)
 ON_SubDEdgeChain::ContinueChainDefaultCallback() can be used as a callback function for ON_SubDEdgeChain::RefineEdgeChains() and ON_SubDEdgeChain::MergeCrossingEdgeChains(). More...
 
static const ON_SubDEdgePtr EdgeChainNeighbor (ON_SubDEdgePtr starting_edge, ON_ChainDirection search_direction, ON_SubD::ChainType chain_type)
 
static const ON_SubDEdgePtr EdgeChainNeighbor (ON_SubDEdgePtr starting_edge, ON_ChainDirection search_direction, ON_SubD::ChainType chain_type, bool bEnableStatusCheck, ON_ComponentStatus status_pass, ON_ComponentStatus status_fail)
 
static ON_NurbsCurveGetEdgeSurfaceCurve (const ON_SimpleArray< ON_SubDEdgePtr > &edge_chain, unsigned int *converted_count, ON_NurbsCurve *destination)
 
static ON_NurbsCurveGetEdgeSurfaceCurve (const ON_SubDEdgePtr *edge_chain, size_t edge_count, unsigned int *converted_count, ON_NurbsCurve *destination)
 
static ON_NurbsCurveGetLoftCurve (const ON_SimpleArray< ON_SubDEdgePtr > &edge_chain, bool bRequireCreases, ON_NurbsCurve *destination)
 
static ON_NurbsCurveGetLoftCurve (const ON_SimpleArray< ON_SubDEdgePtr > &edge_chain, ON_NurbsCurve *destination)
 
static ON_NurbsCurveGetLoftCurve (const ON_SubDEdgePtr *edge_chain, size_t edge_count, bool bReequireCreases, ON_NurbsCurve *destination)
 
static ON_NurbsCurveGetLoftCurve (const ON_SubDEdgePtr *edge_chain, size_t edge_count, ON_NurbsCurve *destination)
 
static bool GetSideComponents (const ON_SimpleArray< ON_SubDEdgePtr > &edge_chain, unsigned relative_side, ON_SimpleArray< ON_SubDComponentPtr > &side_components)
 
static bool IsClosed (const ON_SimpleArray< ON_SubDEdgePtr > &edges)
 Returns true if edges[] has 3 or more edges, the edges form a single chain, and the chain begins and ends at the same vertex. More...
 
static bool IsClosed (size_t edge_count, const ON_SubDEdgePtr *edges)
 Returns true if edges[] has 3 or more edges, the edges form a single chain, and the chain begins and ends at the same vertex. More...
 
static bool IsSingleEdgeChain (const ON_SimpleArray< ON_SubDEdgePtr > &edges)
 
static bool IsSingleEdgeChain (const ON_SimpleArray< ON_SubDEdgePtr > &edges, bool &bIsClosed, bool &bIsSorted)
 
static bool IsValidEdgeChain (const ON_SimpleArray< ON_SubDEdgePtr > &edge_chain, bool bCheckForDuplicateEdges)
 
static bool IsValidEdgeChain (const ON_SubDEdgePtr *edge_chain, size_t edge_count, bool bCheckForDuplicateEdges)
 
static unsigned MergeCrossingEdgeChains (const ON_SimpleArray< ON_SubDEdgePtr > &edge_chains, ON__UINT_PTR callback_context, bool(*continue_chain_callback_function)(ON__UINT_PTR, ON_SubDEdgePtr, ON_SubDEdgePtr), ON_SimpleArray< ON_SubDEdgePtr > &merged_edge_chains)
 Merge crossing edge chains returned by the ON_SubDEdgeChain::SortEdgesIntoEdgeChains() or ON_SubDEdgeChain::RefineEdgeChains() functions. ON_SubDEdgeChain::SortEdgesIntoEdgeChains() unconditionally sorts breaks edge chains at vertices where 3 or more edges meet. More...
 
static unsigned int OrientEdgesIntoEdgeChains (const ON_SimpleArray< const ON_SubDEdge * > &edges, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains)
 
static unsigned int OrientEdgesIntoEdgeChains (const ON_SimpleArray< ON_SubDComponentPtr > &edges, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains)
 
static unsigned int OrientEdgesIntoEdgeChains (const ON_SubD &subd, const ON_SimpleArray< ON_COMPONENT_INDEX > &edges, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains)
 
static unsigned RefineEdgeChains (const ON_SimpleArray< ON_SubDEdgePtr > &unconditional_edge_chains, bool bOrdinarySmoothChains, bool bOrdinaryCreaseChains, ON_SimpleArray< ON_SubDEdgePtr > &refined_edge_chains)
 Refine unconditional edge chains returned by the ON_SubDEdgeChain::SortEdgesIntoEdgeChains() functions. ON_SubDEdgeChain::SortEdgesIntoEdgeChains() unconditionally sorts the input edges into edge chains; ending at where vertices where there the number of candidates for the next edge is zero or two or more. More...
 
static unsigned RefineEdgeChains (const ON_SimpleArray< ON_SubDEdgePtr > &unconditional_edge_chains, ON__UINT_PTR callback_context, bool(*continue_chain_callback_function)(ON__UINT_PTR, ON_SubDEdgePtr, ON_SubDEdgePtr), ON_SimpleArray< ON_SubDEdgePtr > &refined_edge_chains)
 Refine unconditional edge chains returned by the ON_SubDEdgeChain::SortEdgesIntoEdgeChains() functions. ON_SubDEdgeChain::SortEdgesIntoEdgeChains() unconditionally sorts the input edges into edge chains ending at where vertices where there the number of candidates for the next edge is zero or two or more. In particular, the unconditionally sorted chains may contain mixed edge tags and have extraordinary vertices as interior vertices. More...
 
static void ReverseEdgeChain (ON_SimpleArray< ON_SubDEdgePtr > &edge_chain)
 
static void ReverseEdgeChain (ON_SubDEdgePtr *edge_chain, size_t edge_count)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< const ON_SubDEdge * > &unsorted_edges, ON_SimpleArray< ON_SubDEdgePtr > &sorted_edges)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< const ON_SubDEdge * > &unsorted_edges, unsigned int minimum_chain_length, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains)
 7.x SDK prservation - calls above with bIgnoreCorners = false More...
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< const ON_SubDEdge * > &unsorted_edges, unsigned int minimum_chain_length, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains, const bool bIgnoreCorners)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< ON_SubDComponentPtr > &unsorted_edges, ON_SimpleArray< ON_SubDEdgePtr > &sorted_edges)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< ON_SubDComponentPtr > &unsorted_edges, unsigned int minimum_chain_length, ON_SimpleArray< ON_SubDEdgePtr > &sorted_edges)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< ON_SubDEdgePtr > &unsorted_edges, ON_SimpleArray< ON_SubDEdgePtr > &sorted_edges)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< ON_SubDEdgePtr > &unsorted_edges, unsigned int minimum_chain_length, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains)
 7.x SDK prservation - calls above with bIgnoreCorners = false More...
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SimpleArray< ON_SubDEdgePtr > &unsorted_edges, unsigned int minimum_chain_length, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains, const bool bIgnoreCorners)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SubD &subd, const ON_SimpleArray< ON_COMPONENT_INDEX > &unsorted_edges, ON_SimpleArray< ON_SubDEdgePtr > &sorted_edges)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SubD &subd, const ON_SimpleArray< ON_COMPONENT_INDEX > &unsorted_edges, unsigned int minimum_chain_length, ON_SimpleArray< ON_SubDEdgePtr > &edge_chains)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SubDEdge *const *unsorted_edges, unsigned unsorted_edge_count, ON_SimpleArray< ON_SubDEdgePtr > &sorted_edges)
 
static unsigned int SortEdgesIntoEdgeChains (const ON_SubDEdgePtr *unsorted_edges, unsigned unsorted_edge_count, ON_SimpleArray< ON_SubDEdgePtr > &sorted_edges)
 

Static Public Attributes

static const ON_SubDEdgeChain Empty
 

Constructor & Destructor Documentation

◆ ON_SubDEdgeChain() [1/2]

ON_SubDEdgeChain::ON_SubDEdgeChain ( )
default

◆ ~ON_SubDEdgeChain()

ON_SubDEdgeChain::~ON_SubDEdgeChain ( )
default

◆ ON_SubDEdgeChain() [2/2]

ON_SubDEdgeChain::ON_SubDEdgeChain ( const ON_SubDEdgeChain )
default

Member Function Documentation

◆ AddAllNeighbors()

unsigned int ON_SubDEdgeChain::AddAllNeighbors ( ON_ChainDirection  direction,
ON_SubD::ChainType  chain_type 
)

◆ AddEdge()

unsigned int ON_SubDEdgeChain::AddEdge ( const ON_SubDEdge edge)

◆ AddOneNeighbor()

unsigned int ON_SubDEdgeChain::AddOneNeighbor ( ON_ChainDirection  direction,
ON_SubD::ChainType  chain_type 
)

◆ BeginEdgeChain() [1/6]

unsigned int ON_SubDEdgeChain::BeginEdgeChain ( ON_UUID  persistent_subd_id,
ON_SubDRef  subd_ref,
const ON_SimpleArray< const ON_SubDEdge * > &  initial_edge_chain 
)

Parameters: persistent_subd_id - [in] If this edge chain needs to persist in a 3dm archive, then persistent_subd_id should identify the subd in its current context. If that context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If that context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId(). If the edge chain is being used in a runtime context and will not be saved in a 3dm archive or otherwise serialized, then persistent_subd_id can be ON_nil_uuid.

◆ BeginEdgeChain() [2/6]

unsigned int ON_SubDEdgeChain::BeginEdgeChain ( ON_UUID  persistent_subd_id,
ON_SubDRef  subd_ref,
const ON_SimpleArray< ON_SubDEdgePtr > &  initial_edge_chain 
)

Parameters: persistent_subd_id - [in] If this edge chain needs to persist in a 3dm archive, then persistent_subd_id should identify the subd in its current context. If that context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If that context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId(). If the edge chain is being used in a runtime context and will not be saved in a 3dm archive or otherwise serialized, then persistent_subd_id can be ON_nil_uuid.

◆ BeginEdgeChain() [3/6]

unsigned int ON_SubDEdgeChain::BeginEdgeChain ( ON_UUID  persistent_subd_id,
ON_SubDRef  subd_ref,
const ON_SubDEdge *const *  initial_edge_chain,
size_t  edge_count 
)

Parameters: persistent_subd_id - [in] If this edge chain needs to persist in a 3dm archive, then persistent_subd_id should identify the subd in its current context. If that context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If that context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId(). If the edge chain is being used in a runtime context and will not be saved in a 3dm archive or otherwise serialized, then persistent_subd_id can be ON_nil_uuid.

◆ BeginEdgeChain() [4/6]

unsigned int ON_SubDEdgeChain::BeginEdgeChain ( ON_UUID  persistent_subd_id,
ON_SubDRef  subd_ref,
const ON_SubDEdge initial_edge 
)

Parameters: persistent_subd_id - [in] If this edge chain needs to persist in a 3dm archive, then persistent_subd_id should identify the subd in its current context. If that context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If that context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId(). If the edge chain is being used in a runtime context and will not be saved in a 3dm archive or otherwise serialized, then persistent_subd_id can be ON_nil_uuid.

◆ BeginEdgeChain() [5/6]

unsigned int ON_SubDEdgeChain::BeginEdgeChain ( ON_UUID  persistent_subd_id,
ON_SubDRef  subd_ref,
const ON_SubDEdgePtr initial_edge_chain,
size_t  edge_count 
)

Parameters: persistent_subd_id - [in] If this edge chain needs to persist in a 3dm archive, then persistent_subd_id should identify the subd in its current context. If that context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If that context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId(). If the edge chain is being used in a runtime context and will not be saved in a 3dm archive or otherwise serialized, then persistent_subd_id can be ON_nil_uuid.

◆ BeginEdgeChain() [6/6]

unsigned int ON_SubDEdgeChain::BeginEdgeChain ( ON_UUID  persistent_subd_id,
ON_SubDRef  subd_ref,
ON_SubDEdgePtr  initial_edge 
)

Parameters: persistent_subd_id - [in] If this edge chain needs to persist in a 3dm archive, then persistent_subd_id should identify the subd in its current context. If that context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If that context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId(). If the edge chain is being used in a runtime context and will not be saved in a 3dm archive or otherwise serialized, then persistent_subd_id can be ON_nil_uuid.

◆ ClearEdgeChain()

void ON_SubDEdgeChain::ClearEdgeChain ( )

◆ ContinueChainDefaultCallback()

static bool ON_SubDEdgeChain::ContinueChainDefaultCallback ( ON__UINT_PTR  continue_condition,
ON_SubDEdgePtr  left_eptr,
ON_SubDEdgePtr  right_eptr 
)
static

ON_SubDEdgeChain::ContinueChainDefaultCallback() can be used as a callback function for ON_SubDEdgeChain::RefineEdgeChains() and ON_SubDEdgeChain::MergeCrossingEdgeChains().

Edge chain topology check This check is alsways performed. If all edge and vertex pointers are not nullptr, and left_eptr.RelativeVertex(1) == right_eptr.RelativeVertex(0), and left_eptr.RelativeVertex(0), left_eptr.RelativeVertex(1, right_eptr.RelativeVertex(1) are distinct, then the edge chain topology check passes. If the chain topology check fails, then no further checks are performed.

If the valid topology check passes, the continue_condition is treated as a bitfield. Set bits cause additional checks to be performed.

bit 1: Same face count check: Passes when both edges have the same number of faces.

bit 2: Same EdgeIsSmooth() check: Passes when left_ptr.EdgeIsSmooth() == right_eptr.EdgeIsSmooth().

bit 4: Same EdgeIsSharp() check: Passes when left_ptr.EdgeIsSharp() == right_eptr.EdgeIsSharp().

bit 8: EqualEndSharpness() check: Passes when ON_SubDEdgeSharpness::EqualEndSharpness(left_eptr,right_eptr) is true.

bits 16, 32, 64, 128: Vertex tag filter check. If none of these bits are set, this check is not performed. If any of these bits are set, they specify a filter for a vertex tag check. If bit 16 is set and the common vertex tag is ON_SubDVertexTag::Smooth, the check passes. If bit 32 is set and the common vertex tag is ON_SubDVertexTag::Crease, the check passes. If bit 64 is set and the common vertex tag is ON_SubDVertexTag::Dart, the check passes. If bit 128 is set and the common vertex tag is ON_SubDVertexTag::Corner, the check passes. Otherwise the vertex tag filter check fails.

bit 256: opposite edge check If the common vertex has 4 faces and 4 edges and left_ept and right_eptr are opposite edges, the opposited edge check passes.

If the chain topology check passes and all tests specified by set bits pass, then true is returned.

Make no modifications including Mark() and MarkBits() modifications in the callback.

Parameters
continue_condition
left_eptr
right_eptr
Returns
If the chain topology check passes and all tests specified by set bits pass, then true is returned. Otherwise false is returned.

◆ ControlNetPoint()

const ON_3dPoint ON_SubDEdgeChain::ControlNetPoint ( int  vertex_index) const

◆ Dump()

void ON_SubDEdgeChain::Dump ( class ON_TextLog text_log) const

◆ Edge()

const ON_SubDEdge* ON_SubDEdgeChain::Edge ( int  edge_index) const

◆ EdgeChain()

const ON_SimpleArray<ON_SubDEdgePtr>& ON_SubDEdgeChain::EdgeChain ( ) const

Returns: Current EdgeChain

◆ EdgeChainNeighbor() [1/2]

static const ON_SubDEdgePtr ON_SubDEdgeChain::EdgeChainNeighbor ( ON_SubDEdgePtr  starting_edge,
ON_ChainDirection  search_direction,
ON_SubD::ChainType  chain_type 
)
static

Edge chain tools Description: Get the neighboring link in an edge chain. Parameters: starting_edge - [in] search_direction - [in] ON_ChainDirection::Previous or ON_ChainDirection::Next. The search direction is relative to this->EdgeDirection(). chain_type - [in] Determines what edge/vertex tag conditions must be satisfied by the neighbor. Returns: The next or previous edge in the chain if it exists. Otherwise, nullptr is returned. Remarks: When multiple edges are candidates, there is a bias to preserve smooth/crease and a bias to preserve face count. If the biases don't reduce the list of candidates to one or bStopAtBreak is true and a creaase/smooth break is encountered, then ON_SubDEdgePtr::Null is returned.

◆ EdgeChainNeighbor() [2/2]

static const ON_SubDEdgePtr ON_SubDEdgeChain::EdgeChainNeighbor ( ON_SubDEdgePtr  starting_edge,
ON_ChainDirection  search_direction,
ON_SubD::ChainType  chain_type,
bool  bEnableStatusCheck,
ON_ComponentStatus  status_pass,
ON_ComponentStatus  status_fail 
)
static

Description: Get the neighboring link in an edge chain. Parameters: starting_edge - [in] search_direction - [in] ON_ChainDirection::Previous or ON_ChainDirection::Next. The search direction is relative to this->EdgeDirection(). chain_type - [in] Determines what edge/vertex tag conditions must be satisfied by the neighbor. bEnableStatusCheck - [in] status_pass - [in] status_fail - [in] If bEnableStatusFilter is false, then no status checks are performed. If bEnableStatusFilter is true, ON_ComponentStatus::StatusCheck(candidate_edge->m_status,status_pass,status_fail) must be true for candidate_edge to be returned. Returns: The next or previous edge in the chain if it exists. Otherwise, nullptr is returned. Remarks: When multiple edges are candidates, there is a bias to preserve smooth/crease and a bias to preserve face count. If the biases don't reduce the list of candidates to one or bStopAtBreak is true and a creaase/smooth break is encountered, then ON_SubDEdgePtr::Null is returned.

◆ EdgeCount()

unsigned int ON_SubDEdgeChain::EdgeCount ( ) const

◆ EdgePtr()

const ON_SubDEdgePtr ON_SubDEdgeChain::EdgePtr ( int  edge_index) const

◆ EdgeSurfaceCurve()

ON_NurbsCurve* ON_SubDEdgeChain::EdgeSurfaceCurve ( ON_NurbsCurve destination) const

◆ FirstControlNetPoint()

const ON_3dPoint ON_SubDEdgeChain::FirstControlNetPoint ( ) const

◆ FirstEdge()

const ON_SubDEdge* ON_SubDEdgeChain::FirstEdge ( ) const

◆ FirstEdgePtr()

const ON_SubDEdgePtr ON_SubDEdgeChain::FirstEdgePtr ( ) const

◆ FirstVertex()

const ON_SubDVertex* ON_SubDEdgeChain::FirstVertex ( ) const

◆ GetEdgeSurfaceCurve() [1/2]

static ON_NurbsCurve* ON_SubDEdgeChain::GetEdgeSurfaceCurve ( const ON_SimpleArray< ON_SubDEdgePtr > &  edge_chain,
unsigned int *  converted_count,
ON_NurbsCurve destination 
)
static

Parameters: edge_count - [in] edge_chain[] - [in] A chain of contiguous edges. The conversion into a NURBS curve will stop if a link is not contiguous with the previous link. converted_count = [in] If not nullptr, the number of edges converted into the returned curve is returned. ON_NurbsCurve* destination - [in] If not nullptr, the limit curve is created in this instance. Returns: A NURBS curve that lies on the limit surface edges. The domain is (0,edge_count+1) and the subdomain for the i-th edge is (i,i+1).

◆ GetEdgeSurfaceCurve() [2/2]

static ON_NurbsCurve* ON_SubDEdgeChain::GetEdgeSurfaceCurve ( const ON_SubDEdgePtr edge_chain,
size_t  edge_count,
unsigned int *  converted_count,
ON_NurbsCurve destination 
)
static

◆ GetLoftCurve() [1/4]

static ON_NurbsCurve* ON_SubDEdgeChain::GetLoftCurve ( const ON_SimpleArray< ON_SubDEdgePtr > &  edge_chain,
bool  bRequireCreases,
ON_NurbsCurve destination 
)
static

◆ GetLoftCurve() [2/4]

static ON_NurbsCurve* ON_SubDEdgeChain::GetLoftCurve ( const ON_SimpleArray< ON_SubDEdgePtr > &  edge_chain,
ON_NurbsCurve destination 
)
static

◆ GetLoftCurve() [3/4]

static ON_NurbsCurve* ON_SubDEdgeChain::GetLoftCurve ( const ON_SubDEdgePtr edge_chain,
size_t  edge_count,
bool  bReequireCreases,
ON_NurbsCurve destination 
)
static

◆ GetLoftCurve() [4/4]

static ON_NurbsCurve* ON_SubDEdgeChain::GetLoftCurve ( const ON_SubDEdgePtr edge_chain,
size_t  edge_count,
ON_NurbsCurve destination 
)
static

◆ GetSideComponents() [1/2]

static bool ON_SubDEdgeChain::GetSideComponents ( const ON_SimpleArray< ON_SubDEdgePtr > &  edge_chain,
unsigned  relative_side,
ON_SimpleArray< ON_SubDComponentPtr > &  side_components 
)
static

See above.

◆ GetSideComponents() [2/2]

bool ON_SubDEdgeChain::GetSideComponents ( unsigned  relative_side,
ON_SimpleArray< ON_SubDComponentPtr > &  side_components 
) const

Description: Get the edges and faces on a specified side of the edge chain. Parameters: relative_side - [in] 0: Get edges and faces on the ON_SubDEdgePtr::RelativeFace(0) side (left). 1: Get edges and faces on the ON_SubDEdgePtr::RelativeFace(1) side (right).

side_components - [out] side_components[] is a sequence of made of vertices, edges, and faces that record the edges and faces that are on the specified side of the edge chain.

When a vertex is in side_components[], ON_SubDComponentPtr.Vertex() is not nullptr and the vertex is between two conscutive edges in the edge chain.

When an edge is in side_components[], ON_SubDComponentPtr.EdgePtr() is not nullptr, the edge is on the specified side of the edge chain (not in the edge chain), and ON_SubDComponentPtr.EdgePtr().RelativeVertex(0) is a vertex on the edge chain.

When a face is in side_components[], ON_SubDComponentPtr.Face() is not nullptr, then at least one vertex of f is part of the edge chain and f is on the specified side of the edge chain.

If a vertex v is in side_components[], then it is preceded and followed by the same face (...f,v,f,...), there are consecutive edges in the edge chain (...e0,e1,...), and e0 and e1 are consecutive edges in f's boundary.

If ...eptr0,f,eptr1,... is in side_components[], v0 = eptr0.RelativeVertex(0), v1 = eptr0.RelativeVertex(0), and v0 == v1, then eptr0 and eptr1 are consecutive edges in the boundary of f and v0==v1 is a vertex in the edge chain.

If ...eptr0,f,eptr1,... is in side_components[], v0 = eptr0.RelativeVertex(0), v1 = eptr0.RelativeVertex(0), and v0 != v1, then there is an edge c from v0 to v1 that is in the edge chain and eptr0,c,eptr1 are consecutive edges in the boundary of f.

If ...eptr0,f,v,... is in side_components[] and v0 = eptr0.RelativeVertex(0), and then v0 != v, then there is an edge c from v0 to v that is in the edge chain, and eptr0,c are consecutive edges in the boundary of f.

If ...v,f,eptr1,... is in side_components[] and v1 = eptr1.RelativeVertex(0), and then v != v1, then there is an edge c from v to v1 that is in the edge chain, and c,eptr1 consecutive edges in the boundary of f.

Remarks: If the SubD is not an oriented manifold along the entire side of the chain, then there may be gaps in chain_side[]. When there are face fans at a chain vertex, there will be faces that do not have an edge on the chain.

◆ Hash()

const ON_SHA1_Hash ON_SubDEdgeChain::Hash ( ) const

Returns: A SHA1 hash of the edge and vertex ids. Useful for determining when two edge chains from different subds (one generally a modified copy) involve the same edges and vertices.

◆ HasPersistentEdgeIds()

bool ON_SubDEdgeChain::HasPersistentEdgeIds ( ) const

◆ HasRuntimeEdgePtrs()

bool ON_SubDEdgeChain::HasRuntimeEdgePtrs ( ) const

◆ InChain() [1/3]

bool ON_SubDEdgeChain::InChain ( const ON_SubDEdge edge) const

◆ InChain() [2/3]

bool ON_SubDEdgeChain::InChain ( const ON_SubDEdgePtr  edge_ptr) const

◆ InChain() [3/3]

bool ON_SubDEdgeChain::InChain ( const ON_SubDVertex vertex) const

◆ IsClosed() [1/2]

static bool ON_SubDEdgeChain::IsClosed ( const ON_SimpleArray< ON_SubDEdgePtr > &  edges)
static

Returns true if edges[] has 3 or more edges, the edges form a single chain, and the chain begins and ends at the same vertex.

Parameters
edges
Returns
True if edges[] forms a closed edge chain.

◆ IsClosed() [2/2]

static bool ON_SubDEdgeChain::IsClosed ( size_t  edge_count,
const ON_SubDEdgePtr edges 
)
static

Returns true if edges[] has 3 or more edges, the edges form a single chain, and the chain begins and ends at the same vertex.

Parameters
edge_countNumber of elements in the edges[] array.
edges
Returns
True if edges[] forms a closed edge chain.

◆ IsClosedLoop()

bool ON_SubDEdgeChain::IsClosedLoop ( ) const

Returns: True if the edge chain has 3 or more edges that form a closed loop.

◆ IsConvexLoop()

bool ON_SubDEdgeChain::IsConvexLoop ( bool  bStrictlyConvex) const

Parameters: bStrictlyConvex - [in] If true, then a colinear pair of edges is not considered convex. Returns: True if the edge chain has 3 or more edges that forma a convex loop.

◆ IsSingleEdgeChain() [1/2]

static bool ON_SubDEdgeChain::IsSingleEdgeChain ( const ON_SimpleArray< ON_SubDEdgePtr > &  edges)
static

Description: Determine if the array of ON_SubDEdgePtrs in edges[] can be sorted into a single edge chain. Parameters: edges - [in] Set of edges to test. Returns: If the array of edges[] can be sorted into a single edge chain with no self intersections, then true is returned. Otherwise false is returned. Remarks: This test usesthe MarkBits() values on the edges and vertices and restores the values to the input state. Multiple threads may not simultaneously use any SubD tools on that rely on markbits on the same ON_SubD.

◆ IsSingleEdgeChain() [2/2]

static bool ON_SubDEdgeChain::IsSingleEdgeChain ( const ON_SimpleArray< ON_SubDEdgePtr > &  edges,
bool &  bIsClosed,
bool &  bIsSorted 
)
static

Description: Determine if the array of ON_SubDEdgePtrs in edges[] can be sorted into a single edge chain. Parameters: edges - [in] Set of edges to test. bIsClosed - [out] If true is returned and edges[] sorts into a closed edge chain, then bIsClosed is true. Otherwise bIsClosed is false. bIsSorted - [out] If true is returned and edges[] is currently sorted into an edge chain, then bIsSorted is true. Otherwise bIsSorted is false. Returns: If the array of edges[] can be sorted into a single edge chain with no self intersections, then true is returned. Otherwise false is returned. Remarks: This test usesthe MarkBits() values on the edges and vertices and restores the values to the input state. Multiple threads may not simultaneously use any SubD tools on that rely on markbits on the same ON_SubD.

◆ IsValidEdgeChain() [1/2]

static bool ON_SubDEdgeChain::IsValidEdgeChain ( const ON_SimpleArray< ON_SubDEdgePtr > &  edge_chain,
bool  bCheckForDuplicateEdges 
)
static

Description: Checks that all edge and vertex pointers are not nullptr and that adjacent edges in the list share the same vertex. Parameters: edge_chain - [in] Edge chain to test bCheckForDuplicateEdges - [in] If bCheckForDuplicateEdges true, then false is returned if there are duplicate edges or duplicate interior vertices. Returns: True if edge_chain[] is valid.

◆ IsValidEdgeChain() [2/2]

static bool ON_SubDEdgeChain::IsValidEdgeChain ( const ON_SubDEdgePtr edge_chain,
size_t  edge_count,
bool  bCheckForDuplicateEdges 
)
static

Description: Checks that all edge and vertex pointers are not nullptr and that adjacent edges in the list share the same vertex. Parameters: edge_count - [in] Number of elements in edge_chain[] to test. edge_chain - [in] Edge chain to test bCheckForDuplicateEdges - [in] If bCheckForDuplicateEdges true, then false is returned if there are duplicate edges or duplicate interior vertices. Returns: True if edge_chain[] is valid.

◆ LastControlNetPoint()

const ON_3dPoint ON_SubDEdgeChain::LastControlNetPoint ( ) const

◆ LastEdge()

const ON_SubDEdge* ON_SubDEdgeChain::LastEdge ( ) const

◆ LastEdgePtr()

const ON_SubDEdgePtr ON_SubDEdgeChain::LastEdgePtr ( ) const

◆ LastVertex()

const ON_SubDVertex* ON_SubDEdgeChain::LastVertex ( ) const

◆ LoftCurve()

ON_NurbsCurve* ON_SubDEdgeChain::LoftCurve ( ON_NurbsCurve destination) const

Description: Get a NURBS curve that is appropriate for lofting SubDs. Parameters: destination - [in] If not nullptr, then the curve is created in this instance. Returns: A pointer to the curve or nullptr if the edge is not valid.

◆ MergeCrossingEdgeChains()

static unsigned ON_SubDEdgeChain::MergeCrossingEdgeChains ( const ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains,
ON__UINT_PTR  callback_context,
bool(*)(ON__UINT_PTR, ON_SubDEdgePtr, ON_SubDEdgePtr continue_chain_callback_function,
ON_SimpleArray< ON_SubDEdgePtr > &  merged_edge_chains 
)
static

Merge crossing edge chains returned by the ON_SubDEdgeChain::SortEdgesIntoEdgeChains() or ON_SubDEdgeChain::RefineEdgeChains() functions. ON_SubDEdgeChain::SortEdgesIntoEdgeChains() unconditionally sorts breaks edge chains at vertices where 3 or more edges meet.

In some contexts, it is often desirable to have edge chains cross each other at 4 valent vertices. ON_SubDEdgeChain::MergeCrossingEdgeChains() search for 4 valent vertices where 4 input chains terminate and uses the call back function to determine if the chains opposite each other should be merged inot a single chain.

To merge edge chains in place, pass the same array as both edge chains parameters.

Parameters
edge_chains
callback_context
continue_chain_callback_functionThe callback function continue_chain_callback_function(callback_context,left_etpr,right_etpr) is called with pairs of crossing edges at the ends of input chains to see if they should be merged into the same chain. If the callback function returns true, input chains are merged. Often times, ON_SubDEdgeChain::ContinueChainDefaultCallback can be used as the callback function. If continue_chain_callback_function is nullptr, then ON_SubDEdgeChain::ContinueChainDefaultCallback() is used and callback_context is passed as the continue_condition parameter.
Parameters
merged_edge_chainsThe merged edge chains are appended to merged_edge_chains[]. ON_SubDEdgePtr::Null elements separate the edge chains and merged_edge_chains[] ends with a ON_SubDEdgePtr::Null.
Returns
Number of edge chains appended to merged_edge_chains[].

◆ operator=()

ON_SubDEdgeChain& ON_SubDEdgeChain::operator= ( const ON_SubDEdgeChain )
default

◆ OrientEdgesIntoEdgeChains() [1/3]

static unsigned int ON_SubDEdgeChain::OrientEdgesIntoEdgeChains ( const ON_SimpleArray< const ON_SubDEdge * > &  edges,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains 
)
static

Description: Orient edges[] into edge chains preserving the order of edges[]. Returns: Number of chains in edge_chains[].

◆ OrientEdgesIntoEdgeChains() [2/3]

static unsigned int ON_SubDEdgeChain::OrientEdgesIntoEdgeChains ( const ON_SimpleArray< ON_SubDComponentPtr > &  edges,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains 
)
static

Description: Orient edges[] into edge chains preserving the order of edges[]. Returns: Number of chains in edge_chains[].

◆ OrientEdgesIntoEdgeChains() [3/3]

static unsigned int ON_SubDEdgeChain::OrientEdgesIntoEdgeChains ( const ON_SubD subd,
const ON_SimpleArray< ON_COMPONENT_INDEX > &  edges,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains 
)
static

Description: Orient edges[] into edge chains preserving the order of edges[]. Returns: Number of chains in edge_chains[].

◆ PersistentSubDId()

const ON_UUID ON_SubDEdgeChain::PersistentSubDId ( ) const

Returns: The persistent id of the parent subd object. If the context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If the context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId().

◆ Read()

bool ON_SubDEdgeChain::Read ( class ON_BinaryArchive archive)

◆ RefineEdgeChains() [1/2]

static unsigned ON_SubDEdgeChain::RefineEdgeChains ( const ON_SimpleArray< ON_SubDEdgePtr > &  unconditional_edge_chains,
bool  bOrdinarySmoothChains,
bool  bOrdinaryCreaseChains,
ON_SimpleArray< ON_SubDEdgePtr > &  refined_edge_chains 
)
static

Refine unconditional edge chains returned by the ON_SubDEdgeChain::SortEdgesIntoEdgeChains() functions. ON_SubDEdgeChain::SortEdgesIntoEdgeChains() unconditionally sorts the input edges into edge chains; ending at where vertices where there the number of candidates for the next edge is zero or two or more.

In many contexts, it is often necessary to further refine the unconditionally sorted edge chains. RefineEdgeChains() refines the unconditional edge chains into chains that have homogeneous edge tags and continuous sharpness. When bOrdinarySmoothChains is true, the interior vertices of smooth chains will always be smooth vertices with 4 edges and faces. When bOrdinaryCreaseChains is true, the interior vertices of crease chains will alwasys be crease vertices.

To clean edge chains in place, pass the same array as both edge chains parameters.

Parameters
unconditional_edge_chainsON_SubDEdgePtr::Null elements separate the edge chains. Typically this arrary is the output from a call to ON_SubDEdgeChain::SortEdgesIntoEdgeChains().
bOrdinarySmoothChains
bOrdinaryCreaseChains
refined_edge_chainsThe refined edge chains are appended to refined_edge_chains[]. ON_SubDEdgePtr::Null elements separate the edge chains and refined_edge_chains[] ends with a ON_SubDEdgePtr::Null.
Returns
Number of refined edge chains appended to refined_edge_chains[].

◆ RefineEdgeChains() [2/2]

static unsigned ON_SubDEdgeChain::RefineEdgeChains ( const ON_SimpleArray< ON_SubDEdgePtr > &  unconditional_edge_chains,
ON__UINT_PTR  callback_context,
bool(*)(ON__UINT_PTR, ON_SubDEdgePtr, ON_SubDEdgePtr continue_chain_callback_function,
ON_SimpleArray< ON_SubDEdgePtr > &  refined_edge_chains 
)
static

Refine unconditional edge chains returned by the ON_SubDEdgeChain::SortEdgesIntoEdgeChains() functions. ON_SubDEdgeChain::SortEdgesIntoEdgeChains() unconditionally sorts the input edges into edge chains ending at where vertices where there the number of candidates for the next edge is zero or two or more. In particular, the unconditionally sorted chains may contain mixed edge tags and have extraordinary vertices as interior vertices.

In many contexts, it is often necessary to further refine the unconditionally sorted edge chains. The callback function is used to determine where the unconditional chain is refined.

To refine edge chains in place, pass the same array as both edge chains parameters.

Parameters
unconditional_edge_chains
callback_context
continue_chain_callback_functionThe callback function continue_chain_callback_function(callback_context,left_etpr,right_etpr) is called with pairs of unconditionally chained edges. If the callback function return false, the unconditional chain is broken between the edges. If continue_chain_callback_function is nullptr, then ON_SubDEdgeChain::ContinueChainDefaultCallback() is used and callback_context is passed as the continue_condition parameter.
Parameters
refined_edge_chainsThe refined edge chains are appended to refined_edge_chains[]. ON_SubDEdgePtr::Null elements separate the edge chains and refined_edge_chains[] ends with a ON_SubDEdgePtr::Null.
Returns
Number of refined edge chains appended to refined_edge_chains[].

◆ RemoveEdges()

unsigned int ON_SubDEdgeChain::RemoveEdges ( const ON_SubDEdge first_edge,
const ON_SubDEdge last_edge 
)

◆ Reverse()

void ON_SubDEdgeChain::Reverse ( )

◆ ReverseEdgeChain() [1/2]

static void ON_SubDEdgeChain::ReverseEdgeChain ( ON_SimpleArray< ON_SubDEdgePtr > &  edge_chain)
static

Description: Reverse the orientation of the elements and the order of the elements in the edge_chain[] array. Parameters: edge_chain - [in/out]

◆ ReverseEdgeChain() [2/2]

static void ON_SubDEdgeChain::ReverseEdgeChain ( ON_SubDEdgePtr edge_chain,
size_t  edge_count 
)
static

Description: Reverse the orientation of the elements and the order of the elements in the edge_chain[] array. Parameters: edge_count - [in] Number of elements in edge_chain[] edge_chain - [in/out]

◆ SetPersistentEdgeIdsFromRuntimeEdgePtrs()

bool ON_SubDEdgeChain::SetPersistentEdgeIdsFromRuntimeEdgePtrs ( ) const

◆ SetRuntimeEdgePtrsFromPersistentSubD()

bool ON_SubDEdgeChain::SetRuntimeEdgePtrsFromPersistentSubD ( ON_UUID  persistent_subd_id,
ON_SubDRef  persistent_subd_ref 
)

Description: In situations where this edge chain is being read from a 3dm archive, or a similar serialization context, this function uses the saved edge id information to initialize the runtime ON_SubDEdgePtr information. Parameters: persistent_subd_id - [in] This id is passed to insure it matches the saved persistent_subd_id. The source of the id depends on the context of the model managing the subd. If that context is an ONX_Model, then the persistent id is the ON_ModelGeometryComponent.Id(). If that context is a CRhinoDoc, then the persistent id is CRhinoObject.ModelObjectId(). Returns: True if successful. False if not successful.

◆ SetStatusCheck()

void ON_SubDEdgeChain::SetStatusCheck ( bool  bEnableStatusCheck,
ON_ComponentStatus  status_check_pass,
ON_ComponentStatus  status_check_fail 
)

◆ SortEdgesIntoEdgeChains() [1/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< const ON_SubDEdge * > &  unsorted_edges,
ON_SimpleArray< ON_SubDEdgePtr > &  sorted_edges 
)
static

Description: Unconditionally sort edges into chains.

Parameters: unsorted_edges - [in] If unsorted_edges[] contains three or more edges that share a common vertex, no edge chain will pass through that vertex.

sorted_edges - [out] The sorted_edges[] has the edges grouped into edge chains. A value of ON_SubDEdgePtr::Null is at the end of every chain including the last chain.

In an edge chain subsequent edges share a common vertex; i.e. sorted_edges[i].RelativeVertex(1) == sorted_edges[i+1].RelativeVertex(0). Returns: Number of chains in edge_chains[]. Remarks: This version of SortEdgesIntoEdgeChains() uses MarkBits() on the edges and vertices in unsorted_edges[]. The output values of MarkBits() on these components are zero. Multiple threads may not simultaneously use any SubD tools on that rely on markbits on the same ON_SubD.

◆ SortEdgesIntoEdgeChains() [2/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< const ON_SubDEdge * > &  unsorted_edges,
unsigned int  minimum_chain_length,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains 
)
static

7.x SDK prservation - calls above with bIgnoreCorners = false

◆ SortEdgesIntoEdgeChains() [3/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< const ON_SubDEdge * > &  unsorted_edges,
unsigned int  minimum_chain_length,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains,
const bool  bIgnoreCorners 
)
static

Description: Sort edges into a chains

Parameters: unsorted_edges - [in] To sort an array in place, pass the same array as both parameters. If unsorted_edges[] contains three or more edges that share a common vertex, then all of the edges that share that vertex are ignored. The edges can be from one or more SubDs.

unsigned int minimum_chain_length - [in] minimum number of edges to consider for a chain.

edge_chains - [out] The edge_chains[] has the edges grouped into edge chains.

In an edge chain subsequent edges share a common vertex; i.e. edge_chains[i].RelativeVertex(1) == edge_chains[i+1].RelativeVertex(0).

When edge_chains[i].RelativeVertex(1) != edge_chains[i+1].RelativeVertex(0), a chain ends at edge_chains[i] and another begins at edge_chains[i+1].

The first edge in every chain has the same orientation as the input edge from edge_chains[].

bIgnoreCorners - [in] If true the chains are not split at corner vertices

Returns: Number of chains in edge_chains[].

Remarks: When the orientation of the input edges is not intentionally set, the versions of SortEdgesIntoEdgeChains() above without a minimum_chain_length variable are a better choice.

◆ SortEdgesIntoEdgeChains() [4/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< ON_SubDComponentPtr > &  unsorted_edges,
ON_SimpleArray< ON_SubDEdgePtr > &  sorted_edges 
)
static

Description: Unconditionally sort edges into chains.

Parameters: unsorted_edges - [in] If unsorted_edges[] contains three or more edges that share a common vertex, no edge chain will pass through that vertex.

sorted_edges - [out] The sorted_edges[] has the edges grouped into edge chains. A value of ON_SubDEdgePtr::Null is at the end of every chain including the last chain.

In an edge chain subsequent edges share a common vertex; i.e. sorted_edges[i].RelativeVertex(1) == sorted_edges[i+1].RelativeVertex(0). Returns: Number of chains in edge_chains[]. Remarks: This version of SortEdgesIntoEdgeChains() uses MarkBits() on the edges and vertices in unsorted_edges[]. The output value of MarkBits() on these components is zero. Multiple threads may not simultaneously use any SubD tools on that rely on markbits on the same ON_SubD.

◆ SortEdgesIntoEdgeChains() [5/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< ON_SubDComponentPtr > &  unsorted_edges,
unsigned int  minimum_chain_length,
ON_SimpleArray< ON_SubDEdgePtr > &  sorted_edges 
)
static

Description: Sort edges into a chains

Parameters: unsorted_edges - [in] To sort an array in place, pass the same array as both parameters. If unsorted_edges[] contains three or more edges that share a common vertex, then all of the edges that share that vertex are ignored. The edges can be from one or more SubDs.

unsigned int minimum_chain_length - [in] minimum number of edges to consider for a chain.

edge_chains - [out] The edge_chains[] has the edges grouped into edge chains.

In an edge chain subsequent edges share a common vertex; i.e. edge_chains[i].RelativeVertex(1) == edge_chains[i+1].RelativeVertex(0).

When edge_chains[i].RelativeVertex(1) != edge_chains[i+1].RelativeVertex(0), a chain ends at edge_chains[i] and another begins at edge_chains[i+1].

The first edge in every chain has the same orientation as the input edge from edge_chains[].

Returns: Number of chains in edge_chains[].

Remarks: When the orientation of the input edges is not intentionally set, the versions of SortEdgesIntoEdgeChains() above without a minimum_chain_length variable are a better choice.

◆ SortEdgesIntoEdgeChains() [6/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< ON_SubDEdgePtr > &  unsorted_edges,
ON_SimpleArray< ON_SubDEdgePtr > &  sorted_edges 
)
static

Edge chain tools Description: Unconditionally sort edges into chains.

Parameters: unsorted_edges - [in] If unsorted_edges[] contains three or more edges that share a common vertex, no edge chain will pass through that vertex. To sort an array in place, pass the same array as both parameters.

sorted_edges - [out] The sorted_edges[] has the edges grouped into edge chains. A value of ON_SubDEdgePtr::Null is at the end of every chain including the last chain.

In an edge chain subsequent edges share a common vertex; i.e. sorted_edges[i].RelativeVertex(1) == sorted_edges[i+1].RelativeVertex(0). Returns: Number of chains in edge_chains[]. Remarks: This version of SortEdgesIntoEdgeChains() uses MarkBits() on the edges and vertices in unsorted_edges[]. The output values of MarkBits() on these components are zero. Multiple threads may not simultaneously use any SubD tools on that rely on markbits on the same ON_SubD.

◆ SortEdgesIntoEdgeChains() [7/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< ON_SubDEdgePtr > &  unsorted_edges,
unsigned int  minimum_chain_length,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains 
)
static

7.x SDK prservation - calls above with bIgnoreCorners = false

◆ SortEdgesIntoEdgeChains() [8/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SimpleArray< ON_SubDEdgePtr > &  unsorted_edges,
unsigned int  minimum_chain_length,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains,
const bool  bIgnoreCorners 
)
static

Description: Sort edges into a chains

Parameters: unsorted_edges - [in] To sort an array in place, pass the same array as both parameters. If unsorted_edges[] contains three or more edges that share a common vertex, then all of the edges that share that vertex are ignored. The edges can be from one or more SubDs.

unsigned int minimum_chain_length - [in] minimum number of edges to consider for a chain.

edge_chains - [out] The edge_chains[] has the edges grouped into edge chains.

In an edge chain subsequent edges share a common vertex; i.e. edge_chains[i].RelativeVertex(1) == edge_chains[i+1].RelativeVertex(0).

When edge_chains[i].RelativeVertex(1) != edge_chains[i+1].RelativeVertex(0), a chain ends at edge_chains[i] and another begins at edge_chains[i+1].

Reasonable effort is made to keep the first edge in every chain with the same orientation as the input edge from edge_chains[]. However, this is not possible in every case, for example if the input is two edges sharing the same starting vertex.

NB: Reasonable effort is made to keep the corner vertices on the exterior of the chains, however some chains will have corners in their interior, especially closed chains.

bIgnoreCorners - [in] If true the chains are not split at corner vertices

Returns: Number of chains in edge_chains[].

Remarks: When the orientation of the input edges is not intentionally set, the versions of SortEdgesIntoEdgeChains() above without a minimum_chain_length variable are a better choice.

◆ SortEdgesIntoEdgeChains() [9/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SubD subd,
const ON_SimpleArray< ON_COMPONENT_INDEX > &  unsorted_edges,
ON_SimpleArray< ON_SubDEdgePtr > &  sorted_edges 
)
static

Description: Unconditionally sort edges into chains.

Parameters: unsorted_edges - [in] If unsorted_edges[] contains three or more edges that share a common vertex, no edge chain will pass through that vertex.

sorted_edges - [out] The sorted_edges[] has the edges grouped into edge chains. A value of ON_SubDEdgePtr::Null is at the end of every chain including the last chain.

In an edge chain subsequent edges share a common vertex; i.e. sorted_edges[i].RelativeVertex(1) == sorted_edges[i+1].RelativeVertex(0). Returns: Number of chains in edge_chains[]. Remarks: This version of SortEdgesIntoEdgeChains() uses MarkBits() on the edges and vertices in unsorted_edges[]. The output value of MarkBits() on these components is zero. Multiple threads may not simultaneously use any SubD tools on that rely on markbits on the same ON_SubD.

◆ SortEdgesIntoEdgeChains() [10/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SubD subd,
const ON_SimpleArray< ON_COMPONENT_INDEX > &  unsorted_edges,
unsigned int  minimum_chain_length,
ON_SimpleArray< ON_SubDEdgePtr > &  edge_chains 
)
static

Description: Sort edges into a chains

Parameters: unsorted_edges - [in] To sort an array in place, pass the same array as both parameters. If unsorted_edges[] contains three or more edges that share a common vertex, then all of the edges that share that vertex are ignored. The edges can be from one or more SubDs.

unsigned int minimum_chain_length - [in] minimum number of edges to consider for a chain.

edge_chains - [out] The edge_chains[] has the edges grouped into edge chains.

In an edge chain subsequent edges share a common vertex; i.e. edge_chains[i].RelativeVertex(1) == edge_chains[i+1].RelativeVertex(0).

When edge_chains[i].RelativeVertex(1) != edge_chains[i+1].RelativeVertex(0), a chain ends at edge_chains[i] and another begins at edge_chains[i+1].

The first edge in every chain has the same orientation as the input edge from edge_chains[].

Returns: Number of chains in edge_chains[].

Remarks: When the orientation of the input edges is not intentionally set, the versions of SortEdgesIntoEdgeChains() above without a minimum_chain_length variable are a better choice.

◆ SortEdgesIntoEdgeChains() [11/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SubDEdge *const *  unsorted_edges,
unsigned  unsorted_edge_count,
ON_SimpleArray< ON_SubDEdgePtr > &  sorted_edges 
)
static

◆ SortEdgesIntoEdgeChains() [12/12]

static unsigned int ON_SubDEdgeChain::SortEdgesIntoEdgeChains ( const ON_SubDEdgePtr unsorted_edges,
unsigned  unsorted_edge_count,
ON_SimpleArray< ON_SubDEdgePtr > &  sorted_edges 
)
static

◆ StatusCheck()

bool ON_SubDEdgeChain::StatusCheck ( const ON_SubDEdge edge) const

◆ StatusCheckEnabled()

bool ON_SubDEdgeChain::StatusCheckEnabled ( ) const

◆ StatusCheckFail()

const ON_ComponentStatus ON_SubDEdgeChain::StatusCheckFail ( ) const

◆ StatusCheckPass()

const ON_ComponentStatus ON_SubDEdgeChain::StatusCheckPass ( ) const

◆ SubD()

const ON_SubD& ON_SubDEdgeChain::SubD ( ) const

◆ SubDRef()

const ON_SubDRef ON_SubDEdgeChain::SubDRef ( ) const

◆ Vertex()

const ON_SubDVertex* ON_SubDEdgeChain::Vertex ( int  vertex_index) const

◆ Write()

bool ON_SubDEdgeChain::Write ( class ON_BinaryArchive archive) const

Member Data Documentation

◆ Empty

const ON_SubDEdgeChain ON_SubDEdgeChain::Empty
static