From 04831375c4c2091a8f68a85727a22a67ac912dae Mon Sep 17 00:00:00 2001 From: dbv Date: Tue, 5 Apr 2016 14:57:19 +0300 Subject: [PATCH] Issue #1343 Extrusion fixes --- src/GeomAlgoAPI/GeomAlgoAPI_Prism.cpp | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) 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); -- 2.39.2