Prevent Loop in BRepBuilderAPI_Transform

- if a scale transform with scale = 0 is passed to
  BRepBuilderAPI_Transform, it will loop forever.
  If Page.keepUpdated is false, and Views have not yet
  been executed (ex at load time), Views will have a
  0.0 x 0.0 bbox and if Autoscale is true, a scale of
  0.0 will be used in fit-to-page.
This commit is contained in:
WandererFan
2018-02-01 15:46:01 -05:00
parent 1402e39ba0
commit 356f879659
5 changed files with 24 additions and 2 deletions

View File

@@ -249,6 +249,10 @@ void DrawView::setPosition(double x, double y)
double DrawView::getScale(void) const
{
auto result = Scale.getValue();
if (!(result > 0.0)) {
result = 1.0;
Base::Console().Log("DrawView - %s - bad scale found (%.3f) using 1.0\n",getNameInDocument(),Scale.getValue());
}
return result;
}