From 5368ca406dbdef09aca0c6a09ed8e8ce52479ef7 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 29 Aug 2016 10:08:59 +0300 Subject: [PATCH] Support of initial planes stored in previous versions --- src/ConstructionPlugin/ConstructionPlugin_Plane.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp b/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp index d08fa90dc..06653561f 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp @@ -46,6 +46,8 @@ void ConstructionPlugin_Plane::initAttributes() { data()->addAttribute(ConstructionPlugin_Plane::CREATION_METHOD(), ModelAPI_AttributeString::typeId()); + data()->addAttribute(PLANE(), ModelAPI_AttributeSelection::typeId()); + data()->addAttribute(DISTANCE(), ModelAPI_AttributeDouble::typeId()); // By general equation. data()->addAttribute(A(), ModelAPI_AttributeDouble::typeId()); data()->addAttribute(B(), ModelAPI_AttributeDouble::typeId()); @@ -68,8 +70,6 @@ void ConstructionPlugin_Plane::initAttributes() // By other plane. data()->addAttribute(CREATION_METHOD_BY_OTHER_PLANE_OPTION(), ModelAPI_AttributeString::typeId()); - data()->addAttribute(PLANE(), ModelAPI_AttributeSelection::typeId()); - data()->addAttribute(DISTANCE(), ModelAPI_AttributeDouble::typeId()); data()->addAttribute(REVERSE(), ModelAPI_AttributeBoolean::typeId()); data()->addAttribute(COINCIDENT_POINT(), ModelAPI_AttributeSelection::typeId()); data()->addAttribute(AXIS(), ModelAPI_AttributeSelection::typeId()); @@ -86,7 +86,7 @@ void ConstructionPlugin_Plane::execute() GeomShapePtr aShape; std::string aCreationMethod = string(CREATION_METHOD())->value(); - if(aCreationMethod == CREATION_METHOD_BY_GENERAL_EQUATION()) { + if(aCreationMethod == CREATION_METHOD_BY_GENERAL_EQUATION() || aCreationMethod == "PlaneByGeneralEquation") { aShape = createByGeneralEquation(); } else if(aCreationMethod == CREATION_METHOD_BY_THREE_POINTS()) { aShape = createByThreePoints(); -- 2.39.2