]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1464: make direction attributes as non-obligatory
authorvsv <vitaly.smetannikov@opencascade.com>
Thu, 28 Apr 2016 08:35:24 +0000 (11:35 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Thu, 28 Apr 2016 08:35:24 +0000 (11:35 +0300)
src/ConstructionPlugin/ConstructionPlugin_Axis.cpp

index 521d35dfb3b294e86ee6d35da2d820a7caf8f760..b25cc9c2d4c0b3568fa89ddbf1f7e06e5caa1f6b 100644 (file)
@@ -12,6 +12,8 @@
 #include <ModelAPI_ResultConstruction.h>
 #include <ModelAPI_AttributeString.h>
 #include <ModelAPI_AttributeDouble.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
 
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Vertex.h>
@@ -44,6 +46,12 @@ void ConstructionPlugin_Axis::initAttributes()
                        ModelAPI_AttributeDouble::typeId());
   data()->addAttribute(ConstructionPlugin_Axis::Z_DIRECTION(),
                        ModelAPI_AttributeDouble::typeId());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), 
+      ConstructionPlugin_Axis::X_DIRECTION());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), 
+      ConstructionPlugin_Axis::Y_DIRECTION());
+  ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), 
+      ConstructionPlugin_Axis::Z_DIRECTION());
 }
 
 void ConstructionPlugin_Axis::createAxisByTwoPoints()