Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Shape.BoundBox depends on the Shapes tessellation.
The tessellation has 2 properties
Preferences->Part->Shape_view->Maximum deviation
and
Preferences->Part->Shape_view->Maximum angualar deviation
The effect of this is that the users GUI settings for display-accuracy (and freecad rendering speed) affect the exact dimensions of the bounding boxes computed by CurvedShapes - and that in turn can lead to errors in the shape -- > i.e. parts that work fine on one users computer generate Geometry errors and fail in subsequent boolean operations on another users computer because they have the display accuracy set lower for performance reasons.
This is technically a flaw in FreeCAD itself -- Shape.BoundBox is a property that should NOT be calculated based on tessellation. There is an existing bug report for this:
FreeCAD/FreeCAD#17340
however CurvedShapes is affected by this to a much larger dergree, since it uses BoundBox everywhere.
fix #52
Note: this is a draft. Right now the "fix" has too many side effects. Using "optimalBoundingBox()" is more tricky than BoundBox because of several issues:
even with "epsion" increased to 1e-6 some curvedarrays end up weird with broken 1.dimensional ribs created at the beginning or the end sometimes. so a lot more "sanitation" needs to be done with optimalBoundingBox than with BoundBox
Also: on 0.21.2 with OCCT 7.3.0 a call to Shape.optimalBoundBox(False,False) on a standard Part Cube caused FreeCAD to segfault. on 1.0RC4 with OCCT with 7.6.3 there is no segfault