mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029237: Improve performance of Boolean Operations
In order to improve performance of Boolean Operations on the relatively fast cases the following improvements have been made: 1. Initialization of the FaceInfo information for the faces participating in Face/Face interference, even when the gluing is ON, to take into account intersection of their sub-shapes. 2. Code simplification & duplication removal - the methods BOPAlgo_ShellSplitter::MakeConnexityBlocks and BOPAlgo_WireSplitter::MakeConnexityBlocks have been unified into BOPTools_AlgoTools::MakeConnexityBlocks. 3. Avoid unnecessary bounding box computation for solids during DS initialization. The bounding boxes for solids will be computed during the building stage to find faces located inside solids. For the shape self-interference check (performed by the BOPAlgo_CheckerSI), the bounding box is still computed, as it is necessary to resolve Shape/Solid intersections. 4. Use only three sample points to check coincidence of line and plane. 5. Perform necessity of planes intersection only when the gluing is off. 6. Avoid repeated initialization of 2D classifier while building splits of the faces. 7. Post treat stage: 7.1. Method CorrectWires: Save edge's data (PCurve, parameter of the vertex, range) to avoid its recalculation. 7.2. Method CheckEdge: While checking vertices on edges avoid unnecessary calculation of their location. 8. Provide possibility to disable the classification of the input solids on the inverted status (to be the holes in the space). 9. Avoid building of bounding boxes for faces/solids during splitting of the input arguments for their classification relatively hole faces/shells if there are no holes created. 10. Avoid rebuilding of the faces/solids from arguments which does not acquire any inside parts from other arguments during the operation by using their draft versions as their splits. Test cases for the issue. Correction of the test cases boolean gdml_public A9 and bugs modalg_7 bug28485 as they are improvements. Additional test case for the issue #28485 as it is fixed by the current changes.
This commit is contained in:
@@ -2718,6 +2718,38 @@ To enable the safe processing mode for the operation in DRAW, it is necessary to
|
||||
bnondestructive 1
|
||||
~~~~
|
||||
|
||||
@subsection occt_algorithms_11a_4 Disabling check of the input solids for inverted status
|
||||
|
||||
By default, all input solids are checked for inverted status, i.e. the solids are classified to understand if they are holes in the space (negative volumes) or normal solids (positive volumes). The possibility to disable the check of the input solids for inverted status is the advanced option in Boolean Operation component. This option can be applied to all Basic operations such as General Fuse, Splitting, Boolean, Section, Maker Volume, Cells building.
|
||||
This option allows avoiding time-consuming classification of the input solids and operate with them as with positive volumes, saving up to 10 percent of time on the cases with big number of input solids.
|
||||
|
||||
The classification should be disabled only if the user is sure that there are no negative volumes among the input solids, otherwise the result may be invalid.
|
||||
|
||||
@subsubsection occt_algorithms_11a_4_1 Usage
|
||||
|
||||
#### API level
|
||||
|
||||
To enable/disable the classification of the input solids it is necessary to call *SetCheckInverted()* method with the appropriate value:
|
||||
~~~~
|
||||
BOPAlgo_Builder aGF;
|
||||
//
|
||||
....
|
||||
// disabling the classification of the input solid
|
||||
aGF.SetCheckInverted(Standard_False);
|
||||
//
|
||||
....
|
||||
~~~~
|
||||
|
||||
#### TCL level
|
||||
To enable/disable the classification of the solids in DRAW, it is necessary to call the *bcheckinverted* command with appropriate value:
|
||||
* 0 - disabling the classification;
|
||||
* 1 - default value, enabling the classification.
|
||||
|
||||
~~~~
|
||||
bcheckinverted 0
|
||||
~~~~
|
||||
|
||||
|
||||
@section occt_algorithms_ers Errors and warnings reporting system
|
||||
|
||||
The chapter describes the Error/Warning reporting system of the algorithms in the Boolean Component.
|
||||
|
Reference in New Issue
Block a user