Skip to content

Commit

Permalink
prevent fail when scale is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan authored and wwmayer committed Jul 11, 2016
1 parent 350d8bb commit 66fa2a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Mod/TechDraw/App/DrawViewPart.cpp
Expand Up @@ -367,10 +367,14 @@ void DrawViewPart::extractFaces()
}

std::vector<TopoDS_Wire> sortedWires = sortWiresBySize(fw,false);
if (!sortedWires.size()) {
Base::Console().Log("INFO - DVP::extractFaces - no sorted Wires!\n");
return; // might happen in the middle of changes?
}

//remove the largest wire (OuterWire of graph)
Bnd_Box bigBox;
if (!(sortedWires.back().IsNull())) {
if (sortedWires.size() && !sortedWires.front().IsNull()) {
BRepBndLib::Add(sortedWires.front(), bigBox);
bigBox.SetGap(0.0);
}
Expand Down

0 comments on commit 66fa2a2

Please sign in to comment.