]> OCCT Git - occt.git/commitdiff
0033367: Modeling Algorithms - Normal projection or BOP problem [Regression]
authorastromko <astromko@opencascade.com>
Tue, 12 Mar 2024 13:39:19 +0000 (13:39 +0000)
committerjfa <jfa@opencascade.com>
Mon, 25 Mar 2024 13:54:59 +0000 (13:54 +0000)
Fixed passing of an incorrect curve into GeomAdaptor::MakeCurve() function.

src/BRepAlgo/BRepAlgo_NormalProjection.cxx
tests/bugs/modalg_8/bug33367 [new file with mode: 0644]

index 65bc1922e061fac16d6dfc2c13f6fa91168b9acd..e6e8ff46c9b51aa99b619b6100f64f7f53355caa 100644 (file)
@@ -333,7 +333,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
            Only2d = Standard_True;
          
          if(Only2d && Only3d) {
-           BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()), 
+           BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(*hcur),
                                  Udeb, Ufin);
            prj = MKed.Edge();
            BB.UpdateEdge(TopoDS::Edge(prj), 
@@ -369,7 +369,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
            
            if(!Only3d) PCur2d = appr.Curve2d();
            if(Only2d) {
-             BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()), 
+             BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(*hcur),
                                    Udeb, Ufin);
              prj = MKed.Edge();
            }
diff --git a/tests/bugs/modalg_8/bug33367 b/tests/bugs/modalg_8/bug33367
new file mode 100644 (file)
index 0000000..c4763d9
--- /dev/null
@@ -0,0 +1,17 @@
+puts "==============================================================="
+puts "0033367: Modeling Algorithms - Normal projection or BOP problem"
+puts "==============================================================="
+puts ""
+
+pload MODELING
+restore [locate_data_file bug33367_1.brep] sou
+restore [locate_data_file bug33367_2.brep] des
+checkshape sou
+checkshape des
+nproject prj sou des
+checknbshapes prj -vertex 2 -edge 2 -compound 1 -shape 5
+baddobjects des
+baddtools prj
+bfillds
+bbuild res
+checkshape res