Use contour area for wire size instead of bounding box

This commit is contained in:
WandererFan
2017-01-19 18:28:49 -05:00
committed by Yorik van Havre
parent 5874a83409
commit 324171dbe4
2 changed files with 19 additions and 80 deletions

View File

@@ -405,7 +405,6 @@ std::vector<splitPoint> DrawProjectSplit::sortSplits(std::vector<splitPoint>& s,
return result;
}
std::vector<TopoDS_Edge> DrawProjectSplit::removeDuplicateEdges(std::vector<TopoDS_Edge>& inEdges)
{
std::vector<TopoDS_Edge> result;
@@ -446,7 +445,6 @@ std::vector<TopoDS_Edge> DrawProjectSplit::removeDuplicateEdges(std::vector<Topo
Base::Console().Message("ERROR - DPS::removeDuplicateEdges - access: %d inEdges: %d\n",e.idx,inEdges.size());
}
}
return result;
}
@@ -479,7 +477,7 @@ std::string edgeSortItem::dump(void)
/*static*/bool edgeSortItem::edgeLess(const edgeSortItem& e1, const edgeSortItem& e2)
{
bool result = false;
if ((e1.start - e2.start).Length() < Precision::Confusion()) {
if (!((e1.start - e2.start).Length() < Precision::Confusion())) { //e1 != e2
if ( DrawUtil::vectorLess(e1.start, e2.start)) {
result = true;
}
@@ -503,9 +501,8 @@ std::string edgeSortItem::dump(void)
bool result = false;
double startDif = (e1.start - e2.start).Length();
double endDif = (e1.end - e2.end).Length();
if ( (startDif < Precision::Confusion()) &&
(endDif < Precision::Confusion()) &&
(endDif < Precision::Confusion()) &&
(DrawUtil::fpCompare(e1.startAngle,e2.startAngle)) &&
(DrawUtil::fpCompare(e1.endAngle,e2.endAngle)) ) {
result = true;