mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0029322: Unify faces classification procedures in Boolean Operations
1. Unify the faces classification procedure of the methods BOPAlgo_BuilderSolid::PerformInternalShapes() and BOPAlgo_Builder::FillIn3DParts() using the latter as a base. The new method BOPAlgo_Tools::ClassifyFaces() has been created for that. Both methods mentioned above have been updated to use the new one. 2. Forced intersection of the edges after enlarge of the tolerance values of their vertices during the operation has been added into BOP's intersection algorithm (BOPAlgo_PaveFiller). BOPAlgo_Tools::PerformCommonBlocks() method has been updated to avoid loosing faces of the already created Common blocks. As a result the case "boolean gdml_private ZF6" became more stable, because the intermediate result is no longer invalid. Additional test cases have been added to verify this improvement (bugs modalg_7 bug29322_*) 3. When building PCurves for edges on faces, check the existing PCurves on its validity for periodic surfaces and adjust PCurves if necessary. The improvement helps to produce the valid result in the test case "bugs moddata_1 bug152". 4. Avoid creation of empty Edge-Edge interference if the intersection point is lying close to a shared vertex. The improvement helps obtain the valid result of the "bopcheck" operation in the test case "bugs modalg_7 bug27683". Adjustment of the test case to current behavior: - Avoid usage of the self-intersecting torus in the test case "boolean gdml_public A9". - Fix the input shape in the test case "boolean bopfuse_complex H1" to provide valid result. - Test cases "bugs moddata_1 bug152_1 bug152_2" have been unified into single test case "bugs moddata_1 bug152". Now, the case rebuilds invalid input data and performs all types of Boolean operations. - Change the test case "bugs modalg_7 bug22750" to produce valid intermediate results used in subsequent operations as arguments. - The following test cases are improvements: - "boolean volumemaker D8" - "boolean volumemaker G1" - "bugs modalg_7 bug27683"
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||
|
||||
restore [locate_data_file CTO908_topo106-p.brep] poche
|
||||
restore [locate_data_file CTO908_topo106-n.brep] nervure
|
||||
|
||||
bfuse result poche nervure
|
||||
# it does not make sense to fuse the not closed solids.
|
||||
# get the shells from the solids, and fuse them.
|
||||
explode poche sh
|
||||
explode nervure sh
|
||||
|
||||
bfuse result poche_1 nervure_1
|
||||
|
||||
checkprops result -s 105275
|
||||
checkview -display result -2d -otherwise { poche nervure } -s -path ${imagedir}/${test_image}.png
|
@@ -1,11 +1,16 @@
|
||||
puts "TODO #22911 ALL: Error : The area of result shape is"
|
||||
puts "TODO OCC25735 ALL: Faulty shapes in variables faulty_1 to"
|
||||
|
||||
restore [locate_data_file a102] a
|
||||
restore [locate_data_file b136] b
|
||||
|
||||
# fix the second shape
|
||||
fixshape b b
|
||||
# revert the tolerance
|
||||
settolerance b 0.003
|
||||
|
||||
bop a b
|
||||
bopfuse result
|
||||
|
||||
checkprops result -s 0
|
||||
checkview -display result -2d -otherwise { a b } -s -path ${imagedir}/${test_image}.png
|
||||
checkshape result
|
||||
checknbshapes result -vertex 16 -edge 28 -wire 13 -face 13 -shell 1 -solid 1
|
||||
checkprops result -s 20777.6 -v 173396
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
||||
|
@@ -216,9 +216,24 @@ ttranslate sh44547C0_copy 0 0 2.0442502199999999
|
||||
ttranslate sh44547C0_copy 0 31.358955689999998 0
|
||||
|
||||
# tore
|
||||
plane pln_sh4452990 0 0 0 0 0 1 1.1102230246251565e-016 -1 0
|
||||
erase pln_sh4452990
|
||||
ptorus sh4452990 pln_sh4452990 5 10 180
|
||||
#plane pln_sh4452990 0 0 0 0 0 1 1.1102230246251565e-016 -1 0
|
||||
#erase pln_sh4452990
|
||||
#ptorus sh4452990 pln_sh4452990 5 10 180
|
||||
|
||||
# instead of invalid torus create surface of revolution of almost the same form
|
||||
circle c1 0 -5 0 1 0 0 10
|
||||
circle c2 0 5 0 1 0 0 10
|
||||
mkedge e1 c1
|
||||
mkedge e2 c2
|
||||
wire w1 e1
|
||||
wire w2 e2
|
||||
mkplane f1 w1
|
||||
mkplane f2 w2
|
||||
bcut f12 f1 f2
|
||||
revol sh4452990 f12 0 0 0 0 0 1 180
|
||||
copy sh4452990 sh4452990_copy
|
||||
erase c1 c2 e1 e2 w1 w2 f1 f2 f12
|
||||
|
||||
|
||||
# sphere
|
||||
plane pln_sh4456430 0 0 0 0 0 1 1.1102230246251565e-016 -1 0
|
||||
|
@@ -1,8 +1,5 @@
|
||||
# test script on make volume operation
|
||||
# cylinder plane
|
||||
puts "TODO OCC26020 ALL: Faulty shapes in variables faulty_1 to faulty_"
|
||||
puts "TODO OCC26020 ALL: Error: bopcheck failed"
|
||||
puts "TODO OCC26020 ALL: Error : The area of result shape is"
|
||||
# planar face
|
||||
plane pln_f1 -335.23319463083521 698.25 1031.741684575172 0.95105651629515375 3.3306690738754676e-016 0.30901699437494723
|
||||
erase pln_f1
|
||||
@@ -65,5 +62,6 @@ mkface f12 cyl_f12 0 6.2831853071795862 -1000000 1000000
|
||||
# make volume operation
|
||||
mkvolume result f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||
|
||||
checkprops result -s 5.42213e+007
|
||||
checkprops result -s 6.84902e+007 -v 4.35234e+009
|
||||
checknbshapes result -wire 129 -face 129 -shell 31 -solid 31
|
||||
|
||||
|
@@ -1,8 +1,5 @@
|
||||
# test script on make volume operation
|
||||
# cone cylinder plane
|
||||
# Error status: 102
|
||||
|
||||
puts "TODO OCC26020 ALL: Error : is WRONG because number of "
|
||||
|
||||
# conical face
|
||||
cone con_f1 -59.814698440000001 384.36473473000001 127 0.41716766026590824 -0.90882954575006414 -5.4874902763032048e-016 89.995898744693349 0
|
||||
@@ -27,5 +24,5 @@ mkface f4 cyl_f4 0 6.2831853071795862 -1000000 1000000
|
||||
# make volume operation
|
||||
mkvolume result f1 f2 f3 f4
|
||||
|
||||
checknbshapes result -vertex 6 -edge 11 -wire 11 -face 8 -shell 4 -solid 2 -compsolid 0 -compound 1 -shape 43
|
||||
|
||||
checkprops result -s 138971 -v 246.42 -eps 1.e-10
|
||||
checknbshapes result -vertex 7 -edge 12 -wire 11 -face 9 -shell 4 -solid 4
|
||||
|
Reference in New Issue
Block a user