]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Support of initial planes stored in previous versions
authormpv <mpv@opencascade.com>
Mon, 29 Aug 2016 07:08:59 +0000 (10:08 +0300)
committermpv <mpv@opencascade.com>
Mon, 29 Aug 2016 07:08:59 +0000 (10:08 +0300)
src/ConstructionPlugin/ConstructionPlugin_Plane.cpp

index d08fa90dcd8ec462481e6a091f28eea4de664998..06653561f79fde8c9c9b9876ce3a04941599533a 100644 (file)
@@ -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();