TechDraw::EdgeWalker Class Reference

#include <EdgeWalker.h>

Public Member Functions

 EdgeWalker (void)
 
int findUniqueVert (TopoDS_Vertex vx, std::vector< TopoDS_Vertex > &uniqueVert)
 
std::vector< edge_tgetEmbeddingRow (int v)
 get incidence row as edgeDescriptors for v'th vertex More...
 
std::vector< intgetEmbeddingRowIx (int v)
 get incidence row as edge indices for v'th vertex More...
 
ewWireList getResult ()
 
std::vector< TopoDS_Wire > getResultNoDups ()
 
std::vector< TopoDS_Wire > getResultWires ()
 
bool loadEdges (std::vector< TechDraw::WalkerEdge > &edges)
 
bool loadEdges (std::vector< TopoDS_Edge > edges)
 
std::vector< embedItemmakeEmbedding (const std::vector< TopoDS_Edge > edges, const std::vector< TopoDS_Vertex > uniqueVList)
 
std::vector< TopoDS_Vertex > makeUniqueVList (std::vector< TopoDS_Edge > edges)
 
std::vector< WalkerEdgemakeWalkerEdges (std::vector< TopoDS_Edge > edges, std::vector< TopoDS_Vertex > verts)
 make WalkerEdges (unique Vertex index pairs) from edge list More...
 
bool perform ()
 
bool setSize (int size)
 
std::vector< TopoDS_Wire > sortStrip (std::vector< TopoDS_Wire > fw, bool includeBiggest)
 
std::vector< TopoDS_Wire > sortWiresBySize (std::vector< TopoDS_Wire > &w, bool reverse=false)
 
virtual ~EdgeWalker ()
 

Static Public Member Functions

static TopoDS_Wire makeCleanWire (std::vector< TopoDS_Edge > edges, double tol=0.10)
 make a clean wire with sorted, oriented, connected, etc edges More...
 

Static Protected Member Functions

static bool wireCompare (const TopoDS_Wire &w1, const TopoDS_Wire &w2)
 return true if w1 enclosed area is bigger than w2 enclosed area More...
 

Protected Attributes

std::vector< embedItemm_embedding
 
std::vector< TopoDS_Edge > m_saveInEdges
 
std::vector< TechDraw::WalkerEdgem_saveWalkerEdges
 

Constructor & Destructor Documentation

◆ EdgeWalker()

EdgeWalker::EdgeWalker ( void  )

◆ ~EdgeWalker()

EdgeWalker::~EdgeWalker ( )
virtual

Member Function Documentation

◆ findUniqueVert()

int EdgeWalker::findUniqueVert ( TopoDS_Vertex  vx,
std::vector< TopoDS_Vertex > &  uniqueVert 
)

◆ getEmbeddingRow()

std::vector< edge_t > EdgeWalker::getEmbeddingRow ( int  v)

get incidence row as edgeDescriptors for v'th vertex

References TechDraw::embedItem::incidenceList, and m_embedding.

◆ getEmbeddingRowIx()

std::vector< int > EdgeWalker::getEmbeddingRowIx ( int  v)

get incidence row as edge indices for v'th vertex

References TechDraw::embedItem::incidenceList, and m_embedding.

◆ getResult()

ewWireList EdgeWalker::getResult ( void  )

◆ getResultNoDups()

◆ getResultWires()

std::vector< TopoDS_Wire > EdgeWalker::getResultWires ( )

◆ loadEdges() [1/2]

bool EdgeWalker::loadEdges ( std::vector< TechDraw::WalkerEdge > &  edges)

◆ loadEdges() [2/2]

bool EdgeWalker::loadEdges ( std::vector< TopoDS_Edge >  edges)

◆ makeCleanWire()

TopoDS_Wire EdgeWalker::makeCleanWire ( std::vector< TopoDS_Edge >  edges,
double  tol = 0.10 
)
static

make a clean wire with sorted, oriented, connected, etc edges

Referenced by getResultNoDups(), getResultWires(), and TechDraw::DrawViewPart::getWireForFace().

◆ makeEmbedding()

std::vector< embedItem > EdgeWalker::makeEmbedding ( const std::vector< TopoDS_Edge >  edges,
const std::vector< TopoDS_Vertex >  uniqueVList 
)

◆ makeUniqueVList()

std::vector< TopoDS_Vertex > EdgeWalker::makeUniqueVList ( std::vector< TopoDS_Edge >  edges)

References TechDraw::DrawUtil::isSamePoint().

Referenced by loadEdges().

◆ makeWalkerEdges()

std::vector< WalkerEdge > EdgeWalker::makeWalkerEdges ( std::vector< TopoDS_Edge >  edges,
std::vector< TopoDS_Vertex >  verts 
)

make WalkerEdges (unique Vertex index pairs) from edge list

References findUniqueVert(), TechDraw::WalkerEdge::idx, m_saveInEdges, TechDraw::WalkerEdge::v1, and TechDraw::WalkerEdge::v2.

Referenced by loadEdges().

◆ perform()

◆ setSize()

bool EdgeWalker::setSize ( int  size)

Referenced by loadEdges().

◆ sortStrip()

std::vector< TopoDS_Wire > EdgeWalker::sortStrip ( std::vector< TopoDS_Wire >  fw,
bool  includeBiggest 
)

◆ sortWiresBySize()

std::vector< TopoDS_Wire > EdgeWalker::sortWiresBySize ( std::vector< TopoDS_Wire > &  w,
bool  reverse = false 
)

References wireCompare().

Referenced by sortStrip().

◆ wireCompare()

bool EdgeWalker::wireCompare ( const TopoDS_Wire &  w1,
const TopoDS_Wire &  w2 
)
staticprotected

return true if w1 enclosed area is bigger than w2 enclosed area

Referenced by sortWiresBySize().

Member Data Documentation

◆ m_embedding

std::vector<embedItem> TechDraw::EdgeWalker::m_embedding
protected

◆ m_saveInEdges

std::vector<TopoDS_Edge> TechDraw::EdgeWalker::m_saveInEdges
protected

◆ m_saveWalkerEdges

std::vector<TechDraw::WalkerEdge> TechDraw::EdgeWalker::m_saveWalkerEdges
protected

Referenced by loadEdges(), and makeEmbedding().


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