0026619: Tolerances of operands are modified using bop
authormsv <msv@opencascade.com>
Wed, 21 Oct 2015 09:36:03 +0000 (12:36 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 23 Dec 2015 07:33:43 +0000 (10:33 +0300)
commit3510db6201eb97af9143ec2b4c5addd863871155
tree80a56af51fc9053a5e7af9db3fdb8ed7d26eb09b
parent6435b9c7fafd294680a3be589deb61de2fdb3d3c
0026619: Tolerances of operands are modified using bop

0026796: The result of General Fuse operation is self-intersecting shape

The fix forces creation of new sub-shapes (vertex, edge) when the tolerance of some sub-shape of an argument is to be increased.

This new behavior is turned off by default. It can be turned on using two ways:
1) Setting 'locking' flag of the arguments.
2) Calling the method SetNonDestructive(Standard_True) of the API classes.

Various bug fixes in the algorithm:
- Compute correct tolerance values for intersections of type Line/Line, Line/Plane, Plane/Plane.
- In case of Line/Plane intersection check if line's vertices lie on the plane.
- Do not allow decreasing of the tolerance value of the Line/Line intersection vertex.
- In IntTools_EdgeEdge, call the method FindParameters with proper 3D tolerance of the curve.
- Force making copy of a degenerated edge if its vertex is touched but no 2D intersection with other curves is found.
- Remove pave blocks both ends of which became referring to the same vertex after vertices substitution.
- Avoid exception in IntTools_Context::IsVertexOnLine if Extrema is not done.
- Reduce tolerance of vertex/edge using actual distances to interfered shapes if it was increased due to line/line, line/plane, or plane/plane small intersection angle.
- Update tolerance of edges to reach all representations in a common block.
- In V-E intersections, check if a vertex hits beyond shrunk range, in such case create V-V interference.
- Do not put a section edge to the result if it becomes to be a micro edge after updating its vertex.
- Correctly make vertices same-domain during the work of MakeBlocks.
- Decrease shrunk range at least on a Precision::Confusion() in addition to vertex tolerance.
- Add Confusion to bounding boxes of new shapes in DS
- Add tolerance Precision::Confusion() to compare distances of touching cases to fix regressions.

TODO marks have been removed from (or modified in) the following test cases (Improvements):
boolean bsection M3 N2 R2
boolean gdml_private B6 C2 C6 G7 I6 F6 J1 J4 M7 N1 N8 N9 O3 O4 O6 O8 O9 P1 P2 P5 Q1 Q3 Q5 S9 T2 U4 U5 U9 ZB5 ZB6 ZC1 ZC5 ZD3 ZD6 ZD7 ZH2 ZH5 ZI2 ZI5 ZI7 ZI9 ZJ3 ZJ4 ZJ7 F8 I6 G1
boolean volumemaker A5 A6 B3 B4 B7 B9 D3 D4 D7 F1
boolean bopcut_2d D5
bugs modalg_5 bug25043
bugs modalg_2 bug472_1 bug472_2 bug472_3

Test cases updated because they are still bad but can be accepted as non-regression:
boolean volumemaker C4 A3 A7 E6
bugs modalg_1 bug10232
boolean bsection N2

Put new TODO in the scripts:
bugs modalg_5 bug25232_9
bugs modalg_6 bug26619
bugs modalg_1 buc60462_2
bugs modalg_4 bug772

For the following tests the result in fix became better, so take fix result as the reference:
bugs modalg_5 bug24628
bugs modalg_6 bug26954_3
boolean volumemaker A4 B5 B6 C3 C8 D2 D5 F2
bugs modalg_2 bug472_2
bugs modalg_1 buc60776_1

- Add the method SetNonDestructive to API classes of user level
144 files changed:
src/BOPAlgo/BOPAlgo_BOP.cxx
src/BOPAlgo/BOPAlgo_Builder.cxx
src/BOPAlgo/BOPAlgo_Builder.hxx
src/BOPAlgo/BOPAlgo_Builder_1.cxx
src/BOPAlgo/BOPAlgo_Builder_2.cxx
src/BOPAlgo/BOPAlgo_Builder_3.cxx
src/BOPAlgo/BOPAlgo_CheckerSI.cxx
src/BOPAlgo/BOPAlgo_CheckerSI.hxx
src/BOPAlgo/BOPAlgo_MakerVolume.cxx
src/BOPAlgo/BOPAlgo_PaveFiller.cxx
src/BOPAlgo/BOPAlgo_PaveFiller.hxx
src/BOPAlgo/BOPAlgo_PaveFiller_1.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_11.cxx [new file with mode: 0644]
src/BOPAlgo/BOPAlgo_PaveFiller_2.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_3.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_4.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_5.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_8.cxx
src/BOPAlgo/BOPAlgo_PaveFiller_9.cxx
src/BOPAlgo/BOPAlgo_Tools.cxx
src/BOPAlgo/BOPAlgo_Tools.hxx
src/BOPAlgo/BOPAlgo_WireSplitter_1.cxx
src/BOPAlgo/FILES
src/BOPDS/BOPDS_CommonBlock.cxx
src/BOPDS/BOPDS_CommonBlock.hxx
src/BOPDS/BOPDS_CoupleOfPaveBlocks.hxx
src/BOPDS/BOPDS_DS.cxx
src/BOPDS/BOPDS_DS.hxx
src/BOPDS/BOPDS_Interf.hxx
src/BOPTest/BOPTest_APICommands.cxx
src/BOPTest/BOPTest_BOPCommands.cxx
src/BOPTest/BOPTest_Objects.cxx
src/BOPTest/BOPTest_Objects.hxx
src/BOPTest/BOPTest_OptionCommands.cxx
src/BOPTest/BOPTest_PartitionCommands.cxx
src/BOPTools/BOPTools_AlgoTools.cxx
src/BOPTools/BOPTools_AlgoTools.hxx
src/BOPTools/BOPTools_AlgoTools_1.cxx
src/BRepAlgoAPI/BRepAlgoAPI_BooleanOperation.cxx
src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.cxx
src/BRepAlgoAPI/BRepAlgoAPI_BuilderAlgo.hxx
src/IntTools/IntTools_BeanFaceIntersector.cxx
src/IntTools/IntTools_Context.cxx
src/IntTools/IntTools_Context.hxx
src/IntTools/IntTools_EdgeEdge.cxx
src/IntTools/IntTools_EdgeEdge.hxx
src/IntTools/IntTools_EdgeFace.cxx
src/IntTools/IntTools_FaceFace.cxx
src/IntTools/IntTools_FaceFace.hxx
src/IntTools/IntTools_ShrunkRange.cxx
src/IntTools/IntTools_Tools.cxx
src/IntTools/IntTools_Tools.hxx
src/QABugs/QABugs_19.cxx
tests/boolean/bopcut_2d/D5
tests/boolean/bsection/M3
tests/boolean/bsection/N2
tests/boolean/bsection/R2
tests/boolean/gdml_private/B6
tests/boolean/gdml_private/C2
tests/boolean/gdml_private/C6
tests/boolean/gdml_private/F6
tests/boolean/gdml_private/F8
tests/boolean/gdml_private/G1
tests/boolean/gdml_private/G7
tests/boolean/gdml_private/H7
tests/boolean/gdml_private/I6
tests/boolean/gdml_private/J1
tests/boolean/gdml_private/J4
tests/boolean/gdml_private/M7
tests/boolean/gdml_private/N1
tests/boolean/gdml_private/N8
tests/boolean/gdml_private/N9
tests/boolean/gdml_private/O1
tests/boolean/gdml_private/O3
tests/boolean/gdml_private/O4
tests/boolean/gdml_private/O6
tests/boolean/gdml_private/O8
tests/boolean/gdml_private/O9
tests/boolean/gdml_private/P1
tests/boolean/gdml_private/P2
tests/boolean/gdml_private/P5
tests/boolean/gdml_private/Q1
tests/boolean/gdml_private/Q3
tests/boolean/gdml_private/Q5
tests/boolean/gdml_private/S9
tests/boolean/gdml_private/T2
tests/boolean/gdml_private/U4
tests/boolean/gdml_private/U5
tests/boolean/gdml_private/U9
tests/boolean/gdml_private/ZB5
tests/boolean/gdml_private/ZB6
tests/boolean/gdml_private/ZC1
tests/boolean/gdml_private/ZC5
tests/boolean/gdml_private/ZD3
tests/boolean/gdml_private/ZD6
tests/boolean/gdml_private/ZD7
tests/boolean/gdml_private/ZH2
tests/boolean/gdml_private/ZH5
tests/boolean/gdml_private/ZI2
tests/boolean/gdml_private/ZI5
tests/boolean/gdml_private/ZI7
tests/boolean/gdml_private/ZI9
tests/boolean/gdml_private/ZJ3
tests/boolean/gdml_private/ZJ4
tests/boolean/gdml_private/ZJ7
tests/boolean/volumemaker/A3
tests/boolean/volumemaker/A4
tests/boolean/volumemaker/A5
tests/boolean/volumemaker/A6
tests/boolean/volumemaker/A7
tests/boolean/volumemaker/B3
tests/boolean/volumemaker/B4
tests/boolean/volumemaker/B5
tests/boolean/volumemaker/B6
tests/boolean/volumemaker/B7
tests/boolean/volumemaker/B9
tests/boolean/volumemaker/C2
tests/boolean/volumemaker/C3
tests/boolean/volumemaker/C4
tests/boolean/volumemaker/C8
tests/boolean/volumemaker/C9
tests/boolean/volumemaker/D1
tests/boolean/volumemaker/D2
tests/boolean/volumemaker/D3
tests/boolean/volumemaker/D4
tests/boolean/volumemaker/D5
tests/boolean/volumemaker/D7
tests/boolean/volumemaker/E6
tests/boolean/volumemaker/F1
tests/boolean/volumemaker/F2
tests/bugs/modalg_1/buc60462_2
tests/bugs/modalg_1/buc60776_1
tests/bugs/modalg_1/bug10232
tests/bugs/modalg_2/bug472_1
tests/bugs/modalg_2/bug472_2
tests/bugs/modalg_2/bug472_3
tests/bugs/modalg_4/bug772
tests/bugs/modalg_5/bug24628
tests/bugs/modalg_5/bug25043
tests/bugs/modalg_5/bug25232_9
tests/bugs/modalg_6/bug26619 [new file with mode: 0644]
tests/bugs/modalg_6/bug26954_3