Salome HOME
bos #20564 EDF 22692 - Extrusion not possible
authorjfa <jfa@opencascade.com>
Thu, 28 Jan 2021 09:27:47 +0000 (12:27 +0300)
committerjfa <jfa@opencascade.com>
Thu, 28 Jan 2021 09:27:47 +0000 (12:27 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp

index 6903fbdb6f387008a1cb96a8524592c6f3aa3d5c..c9a9a4443254d9895a189b497e60a4d4fb81d206 100644 (file)
@@ -184,11 +184,11 @@ GeomAlgoAPI_Prism::GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
           Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurface);
         aSurface = aTrimSurface->BasisSurface();
       }
-      if(aSurface->DynamicType() != STANDARD_TYPE(Geom_Plane)) {
-        return;
-      }
-      aPlane = Handle(Geom_Plane)::DownCast(aSurface);
-    } else {
+      if (aSurface->DynamicType() == STANDARD_TYPE(Geom_Plane))
+        aPlane = Handle(Geom_Plane)::DownCast(aSurface);
+    }
+
+    if (aPlane.IsNull()) {
       aPlane = aFindPlane.Plane();
       checkOrientation = true;
     }