Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Protected Member Functions
Poly_MakeLoops Class Referenceabstract

#include <Poly_MakeLoops.hxx>

Inheritance diagram for Poly_MakeLoops:
Inheritance graph
[legend]

Data Structures

struct  Hasher
 
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< LinkListOfLink
 
typedef ListOfLink Loop
 

Public Member Functions

 Poly_MakeLoops (const Helper *theHelper, const occ::handle< NCollection_BaseAllocator > &theAlloc=nullptr)
 Constructor. If helper is NULL then the algorithm will probably return a wrong result.
 
void Reset (const Helper *theHelper, const occ::handle< NCollection_BaseAllocator > &theAlloc=nullptr)
 It is to reset the algorithm to the initial state.
 
void AddLink (const Link &theLink)
 Adds a link to the set. theOrient defines which orientations of the link are allowed.
 
void ReplaceLink (const Link &theLink, const Link &theNewLink)
 Replace one link with another (e.g. to change order of nodes)
 
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 orientation.
 
Link FindLink (const Link &theLink) const
 Find the link stored in algo by value.
 
int Perform ()
 Does the work. Returns the collection of result codes.
 
int GetNbLoops () const
 Returns the number of loops in the result.
 
const LoopGetLoop (int theIndex) const
 Returns the loop of the given index.
 
int GetNbHanging () const
 Returns the number of detected hanging chains.
 
void GetHangingLinks (ListOfLink &theLinks) const
 Fills in the list of hanging links.
 

Protected Member Functions

virtual int chooseLeftWay (const int theNode, const int theSegIndex, const NCollection_List< int > &theLstIndS) const =0
 
const HelpergetHelper () const
 
Link getLink (const int theSegIndex) const
 

Detailed Description

Make loops from a set of connected links. A link is represented by a pair of integer indices of nodes.

Member Typedef Documentation

◆ ListOfLink

◆ Loop

Member Enumeration Documentation

◆ LinkFlag

Orientation flags that can be attached to a link.

Enumerator
LF_None 
LF_Fwd 
LF_Rev 
LF_Both 
LF_Reversed 

◆ ResultCode

Enumerator
RC_LoopsDone 
RC_HangingLinks 
RC_Failure 

Constructor & Destructor Documentation

◆ Poly_MakeLoops()

Poly_MakeLoops::Poly_MakeLoops ( const Helper * theHelper,
const occ::handle< NCollection_BaseAllocator > & theAlloc = nullptr )

Constructor. If helper is NULL then the algorithm will probably return a wrong result.

Member Function Documentation

◆ AddLink()

void Poly_MakeLoops::AddLink ( const Link & theLink)

Adds a link to the set. theOrient defines which orientations of the link are allowed.

◆ chooseLeftWay()

virtual int Poly_MakeLoops::chooseLeftWay ( const int theNode,
const int theSegIndex,
const NCollection_List< int > & theLstIndS ) const
protectedpure virtual

Implemented in Poly_MakeLoops3D, and Poly_MakeLoops2D.

◆ FindLink()

Link Poly_MakeLoops::FindLink ( const Link & theLink) const

Find the link stored in algo by value.

◆ GetHangingLinks()

void Poly_MakeLoops::GetHangingLinks ( ListOfLink & theLinks) const

Fills in the list of hanging links.

◆ getHelper()

const Helper * Poly_MakeLoops::getHelper ( ) const
inlineprotected

◆ getLink()

Link Poly_MakeLoops::getLink ( const int theSegIndex) const
inlineprotected

◆ GetLoop()

const Loop & Poly_MakeLoops::GetLoop ( int theIndex) const
inline

Returns the loop of the given index.

◆ GetNbHanging()

int Poly_MakeLoops::GetNbHanging ( ) const
inline

Returns the number of detected hanging chains.

◆ GetNbLoops()

int Poly_MakeLoops::GetNbLoops ( ) const
inline

Returns the number of loops in the result.

◆ Perform()

int Poly_MakeLoops::Perform ( )

Does the work. Returns the collection of result codes.

◆ ReplaceLink()

void Poly_MakeLoops::ReplaceLink ( const Link & theLink,
const Link & theNewLink )

Replace one link with another (e.g. to change order of nodes)

◆ Reset()

void Poly_MakeLoops::Reset ( const Helper * theHelper,
const occ::handle< NCollection_BaseAllocator > & theAlloc = nullptr )

It is to reset the algorithm to the initial state.

◆ SetLinkOrientation()

LinkFlag Poly_MakeLoops::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 orientation.


The documentation for this class was generated from the following file: