Improve handling of duplicate edges in projection

This commit is contained in:
WandererFan
2016-11-14 17:03:32 -05:00
committed by wmayer
parent 5ae22d507d
commit 5295f1e2e2
7 changed files with 233 additions and 16 deletions

View File

@@ -266,7 +266,7 @@ TechDrawGeometry::GeometryObject* DrawViewPart::buildGeometryObject(TopoDS_Shape
void DrawViewPart::extractFaces()
{
geometryObject->clearFaceGeom();
const std::vector<TechDrawGeometry::BaseGeom*>& goEdges =
const std::vector<TechDrawGeometry::BaseGeom*>& goEdges =
geometryObject->getVisibleFaceEdges(SmoothVisible.getValue(),SeamVisible.getValue());
std::vector<TechDrawGeometry::BaseGeom*>::const_iterator itEdge = goEdges.begin();
std::vector<TopoDS_Edge> origEdges;
@@ -349,7 +349,7 @@ void DrawViewPart::extractFaces()
std::vector<splitPoint> sorted = DrawProjectSplit::sortSplits(splits,true);
auto last = std::unique(sorted.begin(), sorted.end(), DrawProjectSplit::splitEqual); //duplicates to back
sorted.erase(last, sorted.end()); //remove dupls
sorted.erase(last, sorted.end()); //remove dupl splits
std::vector<TopoDS_Edge> newEdges = DrawProjectSplit::splitEdges(faceEdges,sorted);
if (newEdges.empty()) {
@@ -357,6 +357,8 @@ void DrawViewPart::extractFaces()
return;
}
newEdges = DrawProjectSplit::removeDuplicateEdges(newEdges);
//find all the wires in the pile of faceEdges
EdgeWalker ew;
ew.loadEdges(newEdges);