mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
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.
47 lines
1008 B
Plaintext
47 lines
1008 B
Plaintext
puts "======="
|
|
puts "0029237"
|
|
puts "======="
|
|
puts ""
|
|
##################################################
|
|
# Improve performance of Boolean Operations
|
|
##################################################
|
|
|
|
brestore [locate_data_file bug29237_dom8364_s32_c2.lhs.brep] a
|
|
brestore [locate_data_file bug29237_dom8364_s32_c2.rhs.brep] b
|
|
|
|
bglue 1
|
|
bcheckinverted 0
|
|
|
|
bclearobjects
|
|
bcleartools
|
|
baddobjects a
|
|
baddtools b
|
|
|
|
# start chronometer
|
|
dchrono cpu restart
|
|
bfillds
|
|
|
|
bcbuild r
|
|
|
|
# build the result of cut
|
|
bcremoveall
|
|
bcadd rcut a 1 b 0
|
|
|
|
# build the result of common
|
|
bcremoveall
|
|
bcadd rcommon a 1 b 1
|
|
|
|
# stop chronometer
|
|
dchrono cpu stop counter OCC29237
|
|
|
|
|
|
# check the result of CUT
|
|
checkshape rcut
|
|
checknbshapes rcut -vertex 7374 -edge 13894 -wire 4944 -face 4711 -shell 29 -solid 29
|
|
checkprops rcut -s 5.81474e+006 -v 1.32791e+007
|
|
|
|
# check the result of COMMON
|
|
checkshape rcommon
|
|
checknbshapes rcommon -vertex 6454 -edge 9662 -wire 4462 -face 4462 -shell 627 -solid 627
|
|
checkprops rcommon -s 1.81935e+006 -v 1.6368e+006
|