]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Extrusion fix
authordbv <dbv@opencascade.com>
Thu, 7 Apr 2016 16:46:51 +0000 (19:46 +0300)
committerdbv <dbv@opencascade.com>
Thu, 7 Apr 2016 16:46:51 +0000 (19:46 +0300)
src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp

index d213063b0f13c76fa20f8e96a564f175f71aa68c..45e0adfebd1e93672ab87a0ea390d4a417535411 100644 (file)
@@ -139,11 +139,16 @@ void GeomAlgoAPI_Prism::build(const GeomShapePtr&                theBaseShape,
       }
     }
   } else {
-    Handle(Geom_Plane) aPlane = aFindPlane.Plane();
-    aLoc = aPlane->Axis().Location();
-    aDirVec = aPlane->Axis().Direction();
+    if(!theDirection.get()) {
+      Handle(Geom_Plane) aPlane = aFindPlane.Plane();
+      aLoc = aPlane->Axis().Location();
+      aDirVec = aPlane->Axis().Direction();
 
-    aBaseDir.reset(new GeomAPI_Dir(aDirVec.X(), aDirVec.Y(), aDirVec.Z()));
+      aBaseDir.reset(new GeomAPI_Dir(aDirVec.X(), aDirVec.Y(), aDirVec.Z()));
+    } else {
+      aBaseDir = theDirection;
+      aDirVec = theDirection->impl<gp_Dir>();
+    }
   }
   aBaseLoc.reset(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
   aBasePlane = GeomAlgoAPI_FaceBuilder::planarFace(aBaseLoc, aBaseDir);