X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_Revolution.cpp;h=12e053e324da48bab8f9b41016bf42da0fe62b40;hb=85b662214060cf733b44ac7822e3e4db49e2da4b;hp=fb3d594adecb7942017b1ad51f6a5680cfa47f1d;hpb=87b74a6fd4660ebfa71a40f0be84e44535f84798;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp b/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp index fb3d594ad..12e053e32 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Revolution.cpp @@ -74,9 +74,6 @@ bool FeaturesPlugin_Revolution::makeRevolutions(ListOfShape& theBaseShapes, { theMakeShapes.clear(); - /// Sub-feature of the composite should be set in the base list. - setSketchObjectToList(); - // Getting base shapes. getBaseShapes(theBaseShapes); @@ -92,8 +89,14 @@ bool FeaturesPlugin_Revolution::makeRevolutions(ListOfShape& theBaseShapes, anEdge = std::shared_ptr(new GeomAPI_Edge(aSelection->context()->shape())); } if(anEdge.get()) { - anAxis = std::shared_ptr(new GeomAPI_Ax1(anEdge->line()->location(), - anEdge->line()->direction())); + if(anEdge->isLine()) { + anAxis = std::shared_ptr(new GeomAPI_Ax1(anEdge->line()->location(), + anEdge->line()->direction())); + } + } + + if(!anAxis.get()) { + return false; } // Getting angles.