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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user