From 7e04c17bdd9a5639c85919295cf8445f1666cbaa Mon Sep 17 00:00:00 2001 From: WandererFan Date: Thu, 1 Sep 2016 11:37:54 -0400 Subject: [PATCH] Fix part/section handling of Face OuterWire --- src/Mod/TechDraw/App/DrawViewPart.cpp | 8 ++------ src/Mod/TechDraw/App/DrawViewSection.cpp | 3 --- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index 06b347d79..03cf8e5a6 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -363,13 +363,9 @@ void DrawViewPart::extractFaces() EdgeWalker ew; ew.loadEdges(faceEdges); ew.perform(); - std::vector fw = ew.getResultWires(); - //TODO: we should remove duplicates here in case of islands? - // but for non-mosaic's we should keep 1 copy of the outerWire - // if we remove duplicates after sortstrip, then the outerWire won't be a duplicate - // still ok as long as we draw biggest first? + std::vector fw = ew.getResultNoDups(); - std::vector sortedWires = ew.sortStrip(fw,false); //false==>do not include OuterWire + std::vector sortedWires = ew.sortStrip(fw,true); std::vector::iterator itWire = sortedWires.begin(); for (; itWire != sortedWires.end(); itWire++) { diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index 073fa3524..f73dd996f 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -389,9 +389,6 @@ TopoDS_Face DrawViewSection::projectFace(const TopoDS_Shape &face, if (sortedWires.empty()) { return projectedFace; } - //TODO: should have the same size checking logic as DVP? - //remove the largest wire (OuterWire of graph) ??? but duplicates have been removed? only do this if a mosaic? - //sortedWires.erase(sortedWires.begin()); BRepBuilderAPI_MakeFace mkFace(sortedWires.front(),true); //true => only want planes? std::vector::iterator itWire = ++sortedWires.begin(); //starting with second face