]> OCCT Git - occt.git/commitdiff
0029945: Export body of revolution to STEP breaks the shape
authorika <ika@opencascade.com>
Wed, 11 Jul 2018 14:29:34 +0000 (17:29 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 13 Jul 2018 12:06:05 +0000 (15:06 +0300)
Now vertex loops on surfaces of revolution are imported from STEP format in the same way as on spheres and b-spline surfaces: in case of a single vertex loop neutral bounds will be used.

src/StepToTopoDS/StepToTopoDS_TranslateFace.cxx
tests/bugs/step/bug29945 [new file with mode: 0644]

index 6de7d28d34f47d48c2faea4b72126660dcc30bd7..7b993456441241ccc24c3e6af0cca255745ad496 100644 (file)
@@ -37,6 +37,7 @@
 #include <Geom_Plane.hxx>
 #include <Geom_SphericalSurface.hxx>
 #include <Geom_Surface.hxx>
+#include <Geom_SurfaceOfRevolution.hxx>
 #include <Geom_ToroidalSurface.hxx>
 #include <GeomAbs_Shape.hxx>
 #include <GeomAdaptor_HSurface.hxx>
@@ -246,7 +247,8 @@ void StepToTopoDS_TranslateFace::Init
 
       // abv 10.07.00 pr1sy.stp: vertex_loop can be wrong; so just make natural bounds
       if (GeomSurf->IsKind (STANDARD_TYPE(Geom_SphericalSurface)) ||
-          GeomSurf->IsKind (STANDARD_TYPE(Geom_BSplineSurface)) )
+          GeomSurf->IsKind (STANDARD_TYPE(Geom_BSplineSurface)) || 
+          GeomSurf->IsKind (STANDARD_TYPE(Geom_SurfaceOfRevolution)))
       {
         if (NbBnd ==1 || FaceBound->IsKind(STANDARD_TYPE(StepShape_FaceOuterBound))) {
           BRepBuilderAPI_MakeFace mf (GeomSurf, Precision());
diff --git a/tests/bugs/step/bug29945 b/tests/bugs/step/bug29945
new file mode 100644 (file)
index 0000000..dd34474
--- /dev/null
@@ -0,0 +1,11 @@
+puts "=========="
+puts "OCC29945"
+puts "=========="
+puts ""
+#########################################################
+# Export body of revolution to STEP breaks the shape
+#########################################################
+
+testreadstep [locate_data_file bug29945.stp] res
+
+checkshape res