From: dbv Date: Tue, 5 Apr 2016 11:57:19 +0000 (+0300) Subject: Issue #1343 Extrusion fixes X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=04831375c4c2091a8f68a85727a22a67ac912dae;p=modules%2Fshaper.git Issue #1343 Extrusion fixes --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp index 35918e17f..33a77beb3 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp @@ -87,6 +87,20 @@ void GeomAlgoAPI_Prism::build(const GeomShapePtr& theBaseShape, // Getting base shape. const TopoDS_Shape& aBaseShape = theBaseShape->impl(); + TopAbs_ShapeEnum aShapeTypeToExp; + switch(aBaseShape.ShapeType()) { + case TopAbs_VERTEX: + aShapeTypeToExp = TopAbs_VERTEX; + break; + case TopAbs_EDGE: + case TopAbs_WIRE: + aShapeTypeToExp = TopAbs_EDGE; + break; + case TopAbs_FACE: + case TopAbs_SHELL: + aShapeTypeToExp = TopAbs_FACE; + break; + } // Getting direction. gp_Vec aDirVec; @@ -141,20 +155,6 @@ void GeomAlgoAPI_Prism::build(const GeomShapePtr& theBaseShape, aResult = aPrismBuilder->Shape(); // Setting naming. - TopAbs_ShapeEnum aShapeTypeToExp; - switch(aMovedBase.ShapeType()) { - case TopAbs_VERTEX: - aShapeTypeToExp = TopAbs_VERTEX; - break; - case TopAbs_EDGE: - case TopAbs_WIRE: - aShapeTypeToExp = TopAbs_EDGE; - break; - case TopAbs_FACE: - case TopAbs_SHELL: - aShapeTypeToExp = TopAbs_FACE; - break; - } for(TopExp_Explorer anExp(aMovedBase, aShapeTypeToExp); anExp.More(); anExp.Next()) { const TopoDS_Shape& aFace = anExp.Current(); GeomShapePtr aFromShape(new GeomAPI_Shape), aToShape(new GeomAPI_Shape);