0023954: Modeling Algorithms - BRepPrimAPI_MakeRevol fails to recognize a torus case
authorabulyche <abulyche@opencascade.com>
Fri, 9 Sep 2022 10:21:03 +0000 (13:21 +0300)
committersmoskvin <smoskvin@opencascade.com>
Mon, 31 Oct 2022 15:17:37 +0000 (18:17 +0300)
Fixed the Toroidal surface recognition;
The test case bugs/moddata_1/bug22296: the result is a torus with parameters: u [0, 2*PI], v [PI, 3*PI];
The test case bugs/modalg_5/bug23954: BAD -> OK.

src/GeomAdaptor/GeomAdaptor_SurfaceOfRevolution.cxx
tests/bugs/modalg_5/bug23954
tests/bugs/moddata_1/bug22296

index eea5ae45c90f17ce07b3e407da4dfffd631cd413..62eb29784ef0b874cb08637d6200ca42a3c27cd5 100644 (file)
@@ -502,16 +502,7 @@ GeomAbs_SurfaceType GeomAdaptor_SurfaceOfRevolution::GetType() const
       MajorRadius = aLin.Distance(aLC);
       if(MajorRadius > aR)
       {
-        Standard_Real aT = 0., aDx, dX;
-        gp_Pnt aPx;
-
-        aPx = ElCLib::Value(aT, C);
-        aDx = aLin.Distance(aPx);
-        dX = aDx - MajorRadius - aR;
-        if (dX < 0.)
-          dX = -dX;
-        if (dX < TolConf)
-          return GeomAbs_Torus;
+        return GeomAbs_Torus;
       }
     }
     break;
index 58555b2bcb6901c61a8cd86778e0b075e6b9053c..1dc0cc10daad31f24d7864885f3b5973a513fb87 100644 (file)
@@ -1,5 +1,3 @@
-puts "TODO OCC23954 ALL: Error: result is not Toroidal surface"
-
 puts "============"
 puts "OCC23954"
 puts "============"
index 8a4cf3d15473337d387891d73be573a200b05dbf..5a0e4a2b5976d0c542e1037fae317b54b0b3a0c9 100755 (executable)
@@ -23,8 +23,8 @@ if { ${E_Length} < 6} {
 
    set good_umin 0
    set good_umax 6.28319
-   set good_vmin 0
-   set good_vmax 6.28319
+   set good_vmin 3.14159
+   set good_vmax 9.42478
 
    set xlist [xbounds f]
    set umin [lindex $xlist 0]