From: dbv Date: Thu, 7 Apr 2016 16:46:51 +0000 (+0300) Subject: Extrusion fix X-Git-Tag: V_2.3.0~262 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c66d90377083e2611816b72500533d4ffbc73e19;p=modules%2Fshaper.git Extrusion fix --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp index d213063b0..45e0adfeb 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp @@ -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(); + } } aBaseLoc.reset(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z())); aBasePlane = GeomAlgoAPI_FaceBuilder::planarFace(aBaseLoc, aBaseDir);