#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< int > getEmbeddingRowIx (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.

◆ getEmbeddingRowIx()

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

get incidence row as edge indices for v'th vertex

References TechDraw::embedItem::incidenceList.

◆ getResult()

ewWireList EdgeWalker::getResult ( void  )

◆ getResultNoDups()

std::vector< TopoDS_Wire > EdgeWalker::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 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)

◆ 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 TechDraw::WalkerEdge::idx, TechDraw::WalkerEdge::v1, and TechDraw::WalkerEdge::v2.

◆ perform()

◆ setSize()

bool EdgeWalker::setSize ( int  size)

◆ 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().

◆ 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

The documentation for this class was generated from the following files:
  • Sources/FreeCAD/src/Mod/TechDraw/App/EdgeWalker.h
  • Sources/FreeCAD/src/Mod/TechDraw/App/EdgeWalker.cpp