From: azv Date: Mon, 13 Mar 2017 13:17:39 +0000 (+0300) Subject: Fix ConstructionPlugin_Plane created by Rotation X-Git-Tag: V_2.7.0~232 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=055d9413812e3ee5418d550fcb7a8ec0d58d0549;p=modules%2Fshaper.git Fix ConstructionPlugin_Plane created by Rotation --- diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp b/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp index a121c4191..d41419236 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp @@ -340,8 +340,17 @@ std::shared_ptr ConstructionPlugin_Plane::createByRotation() double anAngle = real(ANGLE())->value(); GeomAlgoAPI_Rotation aRotationAlgo(aFace, anAxis, anAngle); - std::shared_ptr aRes(new GeomAPI_Face(aRotationAlgo.shape())); + if (!aRotationAlgo.check()) { + setError(aRotationAlgo.getError()); + return GeomShapePtr(); + } + aRotationAlgo.build(); + if (!aRotationAlgo.isDone()) { + setError("Error: Failed to rotate plane"); + return GeomShapePtr(); + } + std::shared_ptr aRes(new GeomAPI_Face(aRotationAlgo.shape())); return aRes; }