]> OCCT Git - occt.git/commitdiff
0033558: Modeling Algorithms - The solids does not preserve geometry topology after... CR33558
authorastromko <astromko@opencascade.com>
Wed, 3 Jul 2024 16:57:16 +0000 (17:57 +0100)
committerastromko <astromko@opencascade.com>
Mon, 29 Jul 2024 15:24:03 +0000 (16:24 +0100)
Added an additional condition in order to preserve necessary shells.
Added a test case.

19 files changed:
src/BRepOffset/BRepOffset_Tool.cxx
tests/bugs/modalg_2/bug5805_17
tests/bugs/modalg_2/bug5805_41
tests/bugs/modalg_7/bug31845_h
tests/bugs/modalg_8/bug33558 [new file with mode: 0644]
tests/offset/shape_type_a/A2
tests/offset/shape_type_i/B8
tests/offset/shape_type_i/F6
tests/offset/shape_type_i_c/U6
tests/offset/shape_type_i_c/XC5
tests/offset/shape_type_i_c/XU5
tests/offset/shape_type_i_c/XZ4
tests/offset/shape_type_i_c/XZ5
tests/offset/shape_type_i_c/XZ7
tests/offset/shape_type_i_c/ZC5
tests/offset/shape_type_i_c/ZC7
tests/offset/shape_type_i_c/ZE7
tests/offset/shape_type_i_c/ZI7
tests/offset/shape_type_i_c/ZZ7

index 6c08941e180bb914f471361161295b381b2dd7fa..8b77b57cc94eee1df0e70128ec8f3898ec7c185c 100644 (file)
@@ -3915,9 +3915,10 @@ TopoDS_Shape BRepOffset_Tool::Deboucle3D(const TopoDS_Shape& S,
               continue;
             }
           }
-          if (!Boundary.Contains(anEdge) &&
-              !BRep_Tool::Degenerated(anEdge))
+          if (!Boundary.IsEmpty() && !Boundary.Contains(anEdge) && !BRep_Tool::Degenerated(anEdge))
+          {
             JeGarde = Standard_False;
+          }
         }
       }
       if (JeGarde) SS = S;
index f1a70c9126d8f43cf7dd2e87742e6fe8c85c09df..03a9d0ee596ee99a1babd19ceb9b20d8b85f7ba2 100755 (executable)
@@ -1,7 +1,4 @@
 puts "TODO OCC25925 ALL: Faulty OCC5805 : result is not Closed shape"
-puts "TODO OCC25925 ALL: Error: The command cannot be built"
-puts "TODO OCC25925 ALL: TEST INCOMPLETE"
-puts "TODO OCC25925 ALL: Tcl Exception: Error : command \\\"nbshapes result\\\" gives an empty result"
 
 puts "============"
 puts "OCC5805"
@@ -37,7 +34,7 @@ set distance -0.001
 catch { OFFSETSHAPE $distance {} $calcul $type }
 # Null result
 
-checkprops result -s 495.635 
+checkprops result -s 234.792 
 
 set index [lsearch [whatis s] Closed]
 if {$index == -1} {
@@ -51,6 +48,6 @@ if {$index == -1} {
   
 }
 
-checknbshapes result -vertex 2 -edge 3 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 13
+checknbshapes result -vertex 6 -edge 6 -wire 3 -face 3 -shell 3 -solid 0 -compsolid 0 -compound 1 -shape 22
 
 checkview -display result -2d -path ${imagedir}/${test_image}.png
index 46c4a054e2f6aaf7888aa13738fa890c770db788..d81c2db1fd8d1fab7a4ca0e6d4fc7040f9b0cb24 100755 (executable)
@@ -1,6 +1,4 @@
-puts "TODO OCC25925 ALL: Error: The command cannot be built"
-puts "TODO OCC25925 ALL: TEST INCOMPLETE"
-puts "TODO OCC25925 ALL: Tcl Exception: Error : command \\\"nbshapes result\\\" gives an empty result"
+puts "TODO OCC25925 ALL: Faulty OCC5805 : result is not Closed shape"
 
 puts "============"
 puts "OCC5805"
@@ -36,9 +34,9 @@ set distance -0.001
 catch { OFFSETSHAPE $distance {} $calcul $type }
 # Null result
 
-checkprops result -s 495.635 
+checkprops result -s 356.089 
 
-checknbshapes result -vertex 2 -edge 3 -wire 3 -face 3 -shell 1 -solid 1 -compsolid 0 -compound 0 -shape 13
+checknbshapes result -vertex 6 -edge 6 -wire 3 -face 3 -shell 3 -solid 0 -compsolid 0 -compound 1 -shape 22
 
 set index [lsearch [whatis s] Closed]
 if {$index == -1} {
index 44f3dd4089613d8ddfb2cca629cb9320ea97b9e0..e715c55aac85db6977b9dc42bacc081b0efa984b 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO OCC31845 All: ERROR: null result"
-
 puts "============================================"
 puts "OCC31845: BRepOffsetAPI_MakeThickSolid fails"
 puts "============================================"
diff --git a/tests/bugs/modalg_8/bug33558 b/tests/bugs/modalg_8/bug33558
new file mode 100644 (file)
index 0000000..e6a0ab4
--- /dev/null
@@ -0,0 +1,10 @@
+puts "===================================================================="
+puts "0033558: Modeling Algorithms - The solids does not preserve geometry topology after applying offset to all faces"
+puts "===================================================================="
+puts ""
+
+pload MODELING
+restore [locate_data_file bug33558.brep] bb
+offsetshape r bb -50
+checkshape r
+checkview -display r -2d -path ${imagedir}/${test_image}.png
index 97c4a41fcac1238b490d934d82cc3bdadbbf852c..038277514c7ee23c6898d0e22a3136cc1092bece 100644 (file)
@@ -1,3 +1,5 @@
+puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
+
 #old file ofc25
 restore [locate_data_file CHE_bb60.rle] s
 OFFSETSHAPE 0.37 {} $calcul $type
index 1b7108ab0be9861831e78358e9f6a1974c2c6f23..955add7340bb815e4ded11a0491503761c994db9 100644 (file)
@@ -1,9 +1,5 @@
-puts "TODO OCC23068 ALL: result is not a topological shape"
-puts "TODO OCC23068 ALL: TEST INCOMPLETE"
-puts "TODO OCC23068 ALL: Error: The command cannot be built"
-
 ptorus s 10 10 0 45
 
 OFFSETSHAPE 1 {} $calcul $type
 
-checkprops result -v 0
+checkprops result -v 18408.6
index efb55153e30ee4e0a764f908e68b794986d2f97f..de1095dae45cb16713bb17b60aa8b8f2c373d145 100644 (file)
@@ -1,6 +1,5 @@
-puts "TODO OCC23068 ALL: result is not a topological shape"
-puts "TODO OCC23068 ALL: Error: The command cannot be built"
-puts "TODO OCC23068 ALL: TEST INCOMPLETE"
+puts "TODO OCC25983 ALL: Error : The volume of result shape is"
+puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
 
 cpulimit 500
 
index 50afd7167189050f3135c9035de0c7e5dd62c13a..f3ce32ad44fb7996a73a1d1c796ba588ebc25605 100755 (executable)
@@ -2,15 +2,12 @@
 ##puts "TODO OCC27414 ALL: Error : The area of result shape is"
 ##puts "TODO OCC27414 ALL: Faulty shapes in variables faulty_"
 ##puts "TODO OCC27414 ALL: Error : The area of face"
-puts "TODO OCC27414 ALL: Error: The command cannot be built"
-puts "TODO OCC27414 ALL: gives an empty result"
-puts "TODO OCC27414 ALL: TEST INCOMPLETE"
 
 restore [locate_data_file bug26917_M2_trim33.brep] s
 
 OFFSETSHAPE 5 {} $calcul $type
 
-checkprops result -v 0
-checkprops result -s 0
+checkprops result -v 301442
+checkprops result -s 39899.1
 
 checknbshapes result -shell 1
index 1532e696ea87070ca72c32744899f1e131e6a415..0ed63e6d337a02f1a31bcfe03a26a5fcb7f6383e 100644 (file)
@@ -1,12 +1,8 @@
-puts "TODO OCC27414 ALL: Error: The command cannot be built"
-puts "TODO OCC27414 ALL: gives an empty result"
-puts "TODO OCC27414 ALL: TEST INCOMPLETE"
-
 restore [locate_data_file bug26917_input.dom7742_simple.brep] s
 
 OFFSETSHAPE 10 {} $calcul $type
 
-checkprops result -v 0
-checkprops result -s 0
+checkprops result -v 10375.5
+checkprops result -s 7292.19
 
 checknbshapes result -shell 1
index e46970e04dc16a336c2d0b3f02e556c0f1587599..e418518384bfbb5a45c564f22f421b971d0adb12 100644 (file)
@@ -6,6 +6,11 @@ puts "TODO CR27414 ALL: Error: operation with offset value 11 has failed"
 puts "TODO CR27414 ALL: Error: operation with offset value 12 has failed"
 puts "TODO CR27414 ALL: Operations with following offset values have failed: 7 8 9 10 11 12"
 puts "TODO CR27414 ALL: Error : The offset cannot be built"
+puts "TODO OCC25983 ALL: Error: number of wire entities in the result shape is"
+puts "TODO OCC25983 ALL: Error: number of face entities in the result shape is"
+puts "TODO OCC25983 ALL: Error: number of solid entities in the result shape is"
+puts "TODO OCC25983 ALL: Error: The area of result shape is"
+puts "TODO OCC25983 ALL: Error: The volume of result shape is"
 
 puts "============================================================================================="
 puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\""
index bef4dd74e9a2a30fdfa72df9ae09031f33c1487e..803dedd5adebb53047d8a39b6b91e582e1cdc26c 100644 (file)
@@ -1,8 +1,11 @@
 puts "TODO CR27414 ALL: Error: number of wire entities in the result"
 puts "TODO CR27414 ALL: Error: number of face entities in the result"
+puts "TODO CR27414 ALL: Error: number of solid entities in the result"
 puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed"
 puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed"
 puts "TODO CR27414 ALL: Operations with following offset values have failed: 9 10"
+puts "TODO OCC25983 ALL: Error: The area of result shape is"
+puts "TODO OCC25983 ALL: Error: The volume of result shape is"
 
 puts "============================================================================================="
 puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\""
index 479f7f83cc8e8418a028c15d1399117f9099a538..88a2e53b1f40ec0e50d026b721fb759536ca470f 100644 (file)
@@ -1,5 +1,10 @@
 puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed"
 puts "TODO CR27414 ALL: Operations with following offset values have failed: 9"
+puts "TODO CR27414 ALL: Error: number of wire entities in the result"
+puts "TODO CR27414 ALL: Error: number of face entities in the result"
+puts "TODO CR27414 ALL: Error: number of solid entities in the result"
+puts "TODO OCC25983 ALL: Error: The area of result shape is"
+puts "TODO OCC25983 ALL: Error: The volume of result shape is"
 
 puts "============================================================================================="
 puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\""
index 54ed10b54dd2d758e9c4f6c066272f42cab7b102..c52aef6284a2a112da1b778eed4665541f9f56ea 100644 (file)
@@ -5,6 +5,12 @@ puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed"
 puts "TODO CR27414 ALL: Error: operation with offset value 11 has failed"
 puts "TODO CR27414 ALL: Error: operation with offset value 12 has failed"
 puts "TODO CR27414 ALL: Operations with following offset values have failed: 7 8 9 10 11 12"
+puts "TODO CR27414 ALL: Error: number of wire entities in the result"
+puts "TODO CR27414 ALL: Error: number of face entities in the result"
+puts "TODO CR27414 ALL: Error: number of solid entities in the result"
+puts "TODO OCC25983 ALL: Error: The area of result shape is"
+puts "TODO OCC25983 ALL: Error: The volume of result shape is"
+
 
 puts "============================================================================================="
 puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\""
index 5d12f647c85fa27af877767069d26e6e60d5cd69..49d3d8d1aa4599e18762e9479bb9d38f275c4eb5 100644 (file)
@@ -1,6 +1,5 @@
-puts "TODO OCC27414 ALL: Error: The command cannot be built"
-puts "TODO OCC27414 ALL: gives an empty result"
-puts "TODO OCC27414 ALL: TEST INCOMPLETE"
+puts "TODO OCC25983 ALL: Error : The area of result shape is"
+puts "TODO OCC25983 ALL: Error : The volume of result shape is"
 
 restore [locate_data_file bug26917_M2_trim32.brep] s
 
index 647b14293f7874cb432cb499835bcc9369a8ef56..492abe3dda0e3b4768ac401aad88dc745e6482f5 100644 (file)
@@ -1,6 +1,5 @@
-puts "TODO OCC27414 ALL: Error: The command cannot be built"
-puts "TODO OCC27414 ALL: gives an empty result"
-puts "TODO OCC27414 ALL: TEST INCOMPLETE"
+puts "TODO OCC25983 ALL: Error : The area of result shape is"
+puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
 
 restore [locate_data_file bug26917_M2_trim34.brep] s
 
index b84f92e6c1d24521027fd36d3881063eacaccd17..9e233ee1e8a8d879c1aaf1833181f48d40704395 100644 (file)
@@ -1,7 +1,5 @@
-#puts "TODO CR27414 ALL: Error : The volume of result shape is"
-puts "TODO OCC27414 ALL: Error: The command cannot be built"
-puts "TODO OCC27414 ALL: gives an empty result"
-puts "TODO OCC27414 ALL: TEST INCOMPLETE"
+puts "TODO CR27414 ALL: Error : The volume of result shape is"
+puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
 
 restore [locate_data_file bug26917_M2_trim16.brep] s
 
index 6ecf51effb656d8d209ae18267d7eeaa0d445bc8..d3732175903f6798f5887ba88061d2cf618d2320 100644 (file)
@@ -1,6 +1,6 @@
-puts "TODO OCC27414 ALL: Error: The command cannot be built"
-puts "TODO OCC27414 ALL: gives an empty result"
-puts "TODO OCC27414 ALL: TEST INCOMPLETE"
+puts "TODO CR27414 ALL: Error : The volume of result shape is"
+puts "TODO OCC25983 ALL: Error : The area of result shape is"
+puts "TODO OCC25406 ALL: Error: bsection of the result and s is not equal to zero"
 
 restore [locate_data_file bug26917_fills_center.input_trim3.brep] s
 
@@ -9,4 +9,4 @@ OFFSETSHAPE 6 {} $calcul $type
 checkprops result -v 0
 checkprops result -s 0
 
-checknbshapes result -shell 1
+checknbshapes result -shell 3
index 4c8d3495052bcb1c445c632ebe49375952337d56..da9efc876c4f2c75e277bf9064d26a228b871b07 100644 (file)
@@ -1,6 +1,6 @@
-puts "TODO OCC27414 ALL: Error: The command cannot be built"
-puts "TODO OCC27414 ALL: gives an empty result"
-puts "TODO OCC27414 ALL: TEST INCOMPLETE"
+puts "TODO CR27414 ALL: Error : The volume of result shape is"
+puts "TODO OCC25983 ALL: Error : The area of result shape is"
+
 
 restore [locate_data_file bug26917_input.dom7742.brep] s
 
@@ -9,4 +9,4 @@ OFFSETSHAPE 15 {} $calcul $type
 checkprops result -v 0
 checkprops result -s 0
 
-checknbshapes result -shell 1
+checknbshapes result -shell 7