From 055d9413812e3ee5418d550fcb7a8ec0d58d0549 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 13 Mar 2017 16:17:39 +0300 Subject: [PATCH] Fix ConstructionPlugin_Plane created by Rotation --- src/ConstructionPlugin/ConstructionPlugin_Plane.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; } -- 2.39.2