#include <EdgeWalker.h>
Public Member Functions | |
EdgeWalker (void) | |
int | findUniqueVert (TopoDS_Vertex vx, std::vector< TopoDS_Vertex > &uniqueVert) |
std::vector< edge_t > | getEmbeddingRow (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< embedItem > | makeEmbedding (const std::vector< TopoDS_Edge > edges, const std::vector< TopoDS_Vertex > uniqueVList) |
std::vector< TopoDS_Vertex > | makeUniqueVList (std::vector< TopoDS_Edge > edges) |
std::vector< WalkerEdge > | makeWalkerEdges (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< embedItem > | m_embedding |
std::vector< TopoDS_Edge > | m_saveInEdges |
std::vector< TechDraw::WalkerEdge > | m_saveWalkerEdges |
EdgeWalker::EdgeWalker | ( | void | ) |
|
virtual |
int EdgeWalker::findUniqueVert | ( | TopoDS_Vertex | vx, |
std::vector< TopoDS_Vertex > & | uniqueVert | ||
) |
References TechDraw::DrawUtil::isSamePoint().
Referenced by makeWalkerEdges().
get incidence row as edgeDescriptors for v'th vertex
References TechDraw::embedItem::incidenceList, and m_embedding.
get incidence row as edge indices for v'th vertex
References TechDraw::embedItem::incidenceList, and m_embedding.
ewWireList EdgeWalker::getResult | ( | void | ) |
References TechDraw::edgeVisitor::getResult().
std::vector< TopoDS_Wire > EdgeWalker::getResultNoDups | ( | ) |
std::vector< TopoDS_Wire > EdgeWalker::getResultWires | ( | ) |
bool EdgeWalker::loadEdges | ( | std::vector< TechDraw::WalkerEdge > & | edges | ) |
References m_saveWalkerEdges.
Referenced by TechDraw::DrawViewPart::extractFaces(), and loadEdges().
bool EdgeWalker::loadEdges | ( | std::vector< TopoDS_Edge > | edges | ) |
References loadEdges(), m_embedding, makeEmbedding(), makeUniqueVList(), makeWalkerEdges(), and setSize().
|
static |
make a clean wire with sorted, oriented, connected, etc edges
Referenced by getResultNoDups(), getResultWires(), and TechDraw::DrawViewPart::getWireForFace().
std::vector< embedItem > EdgeWalker::makeEmbedding | ( | const std::vector< TopoDS_Edge > | edges, |
const std::vector< TopoDS_Vertex > | uniqueVList | ||
) |
std::vector< TopoDS_Vertex > EdgeWalker::makeUniqueVList | ( | std::vector< TopoDS_Edge > | edges | ) |
References TechDraw::DrawUtil::isSamePoint().
Referenced by loadEdges().
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().
bool EdgeWalker::perform | ( | ) |
References Base::Console(), draftgeoutils.geometry::isPlanar, Base::ConsoleSingleton::Log(), m_embedding, and TechDraw::edgeVisitor::setGraph().
Referenced by TechDraw::DrawViewPart::extractFaces().
Referenced by loadEdges().
std::vector< TopoDS_Wire > EdgeWalker::sortStrip | ( | std::vector< TopoDS_Wire > | fw, |
bool | includeBiggest | ||
) |
References Base::Console(), Base::ConsoleSingleton::Log(), and sortWiresBySize().
Referenced by TechDraw::DrawViewPart::extractFaces().
std::vector< TopoDS_Wire > EdgeWalker::sortWiresBySize | ( | std::vector< TopoDS_Wire > & | w, |
bool | reverse = false |
||
) |
References wireCompare().
Referenced by sortStrip().
|
staticprotected |
return true if w1 enclosed area is bigger than w2 enclosed area
Referenced by sortWiresBySize().
|
protected |
Referenced by getEmbeddingRow(), getEmbeddingRowIx(), loadEdges(), and perform().
|
protected |
Referenced by getResultNoDups(), getResultWires(), and makeWalkerEdges().
|
protected |
Referenced by loadEdges(), and makeEmbedding().