From c66d90377083e2611816b72500533d4ffbc73e19 Mon Sep 17 00:00:00 2001 From: dbv Date: Thu, 7 Apr 2016 19:46:51 +0300 Subject: [PATCH] Extrusion fix --- src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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); -- 2.39.2