Open CASCADE Technology
6.9.1
|
#include <Poly_MakeLoops.hxx>
Data Structures | |
class | HeapOfInteger |
This class implements a heap of integers. The most effective usage of it is first to add there all items, and then get top item and remove any items till it becomes empty. More... | |
class | Helper |
The abstract helper class. More... | |
struct | Link |
The Link structure. More... | |
Public Types | |
enum | LinkFlag { LF_None = 0, LF_Fwd = 1, LF_Rev = 2, LF_Both = 3, LF_Reversed = 4 } |
Orientation flags that can be attached to a link. More... | |
enum | ResultCode { RC_LoopsDone = 1, RC_HangingLinks = 2, RC_Failure = 4 } |
typedef NCollection_List< Link > | ListOfLink |
typedef ListOfLink | Loop |
Public Member Functions | |
Poly_MakeLoops (const Helper *theHelper, const Handle< NCollection_BaseAllocator > &theAlloc=0L) | |
Constructor. If helper is NULL then the algorithm will probably return a wrong result. More... | |
void | Reset (const Helper *theHelper, const Handle< NCollection_BaseAllocator > &theAlloc=0L) |
It is to reset the algorithm to the initial state. More... | |
void | AddLink (const Link &theLink) |
Adds a link to the set. theOrient defines which orientations of the link are allowed. More... | |
void | ReplaceLink (const Link &theLink, const Link &theNewLink) |
Replace one link with another (e.g. to change order of nodes) More... | |
LinkFlag | SetLinkOrientation (const Link &theLink, const LinkFlag theOrient) |
Set a new value of orientation of a link already added earlier. It can be used with LF_None to exclude the link from consideration. Returns the old value of orienation. More... | |
Link | FindLink (const Link &theLink) const |
Find the link stored in algo by value. More... | |
Standard_Integer | Perform () |
Does the work. Returns the collection of result codes. More... | |
Standard_Integer | GetNbLoops () const |
Returns the number of loops in the result. More... | |
const Loop & | GetLoop (Standard_Integer theIndex) const |
Returns the loop of the given index. More... | |
Standard_Integer | GetNbHanging () const |
Returns the number of detected hanging chains. More... | |
void | GetHangingLinks (ListOfLink &theLinks) const |
Fills in the list of hanging links. More... | |
Protected Member Functions | |
virtual Standard_Integer | chooseLeftWay (const Standard_Integer theNode, const Standard_Integer theSegIndex, const NCollection_List< Standard_Integer > &theLstIndS) const =0 |
const Helper * | getHelper () const |
Link | getLink (const Standard_Integer theSegIndex) const |
Make loops from a set of connected links. A link is represented by a pair of integer indices of nodes.
typedef ListOfLink Poly_MakeLoops::Loop |
Poly_MakeLoops::Poly_MakeLoops | ( | const Helper * | theHelper, |
const Handle< NCollection_BaseAllocator > & | theAlloc = 0L |
||
) |
Constructor. If helper is NULL then the algorithm will probably return a wrong result.
void Poly_MakeLoops::AddLink | ( | const Link & | theLink | ) |
Adds a link to the set. theOrient defines which orientations of the link are allowed.
|
protectedpure virtual |
Implemented in Poly_MakeLoops2D, and Poly_MakeLoops3D.
void Poly_MakeLoops::GetHangingLinks | ( | ListOfLink & | theLinks | ) | const |
Fills in the list of hanging links.
|
inlineprotected |
|
inlineprotected |
|
inline |
Returns the loop of the given index.
|
inline |
Returns the number of detected hanging chains.
|
inline |
Returns the number of loops in the result.
Standard_Integer Poly_MakeLoops::Perform | ( | ) |
Does the work. Returns the collection of result codes.
Replace one link with another (e.g. to change order of nodes)
void Poly_MakeLoops::Reset | ( | const Helper * | theHelper, |
const Handle< NCollection_BaseAllocator > & | theAlloc = 0L |
||
) |
It is to reset the algorithm to the initial state.
Set a new value of orientation of a link already added earlier. It can be used with LF_None to exclude the link from consideration. Returns the old value of orienation.