From: mpv Date: Mon, 29 Aug 2016 07:08:59 +0000 (+0300) Subject: Support of initial planes stored in previous versions X-Git-Tag: V_2.5.0~122 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5368ca406dbdef09aca0c6a09ed8e8ce52479ef7;p=modules%2Fshaper.git Support of initial planes stored in previous versions --- 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();