]> OCCT Git - occt.git/commitdiff
0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception
authorakaftasev <akaftasev@opencascade.com>
Tue, 1 Aug 2023 12:10:47 +0000 (13:10 +0100)
committerjokwajeb <jokwajeb@opencascade.com>
Mon, 7 Aug 2023 10:26:07 +0000 (11:26 +0100)
In method ShapeUpgrade_UnifySameDomain::IntUnifyFaces() the searched edge is finally checked that it is not empty before accessing it.

src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx
tests/bugs/heal/bug33421 [new file with mode: 0644]

index 23d27e2bef426a755596eb63d535c3cd3039148d..e17fefa111c5635af6dc26258a427da61e56598d 100644 (file)
@@ -3617,6 +3617,10 @@ void ShapeUpgrade_UnifySameDomain::IntUnifyFaces(const TopoDS_Shape& theInpShape
               
               ReconstructMissedSeam (RemovedEdges, F_RefFace, CurEdge, CurVertex, CurPoint,
                                      Uperiod, Vperiod, NextEdge, NextPoint);
+              if (NextEdge.IsNull())
+              {
+                return;
+              }
             }
             else
               return;
diff --git a/tests/bugs/heal/bug33421 b/tests/bugs/heal/bug33421
new file mode 100644 (file)
index 0000000..fcfebd2
--- /dev/null
@@ -0,0 +1,19 @@
+puts "TODO CR33439 ALL: Error :  is WRONG because number of EDGE entities in shape"
+puts "TODO CR33439 ALL: Error :  is WRONG because number of WIRE entities in shape"
+puts "TODO CR33439 ALL: Error :  is WRONG because number of FACE entities in shape"
+
+puts "========================================="
+puts "0033421: Modeling Algorithms - ShapeUpgrade_UnifySameDomain fails"
+puts "========================================="
+puts ""
+
+pcylinder c1 10 10
+copy c1 c2
+tmirror c2 0 0 10 0 0 1
+bop c1 c2
+bopfuse c3
+
+unifysamedom result c3
+
+checknbshapes result -t -solid 1 -shell 1 -face 3 -wire 3 -edge 3 -vertex 3
+checkview -display result -2d -path ${imagedir}/${test_image}.png