prevent fail when scale is zero

This commit is contained in:
WandererFan
2016-07-03 20:23:08 -04:00
committed by wmayer
parent 30f56fabf3
commit 5b5243eae5

View File

@@ -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);
}