]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1649: New creation of Construction Planes
authornds <nds@opencascade.com>
Tue, 19 Jul 2016 13:28:08 +0000 (16:28 +0300)
committernds <nds@opencascade.com>
Tue, 19 Jul 2016 13:28:08 +0000 (16:28 +0300)
Positive validator using breaks the test.

src/ConstructionPlugin/ConstructionPlugin_Plane.cpp
src/ConstructionPlugin/ConstructionPlugin_Plane.h
src/ConstructionPlugin/plane_widget.xml
src/ModelAPI/Test/Test1064.py

index f4b966ac108a4c27ce283d071bda50e4b506981b..68f3e5b0a732aa1a05f3026b072696f912c4be85 100644 (file)
@@ -68,7 +68,7 @@ void ConstructionPlugin_Plane::initAttributes()
   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(DISTANCE_REVERSE(), ModelAPI_AttributeBoolean::typeId());
+  data()->addAttribute(DISTANCE_REVERSE(), ModelAPI_AttributeBoolean::typeId());
   data()->addAttribute(COINCIDENT_POINT(), ModelAPI_AttributeSelection::typeId());
   data()->addAttribute(AXIS(), ModelAPI_AttributeSelection::typeId());
   data()->addAttribute(ANGLE(), ModelAPI_AttributeDouble::typeId());
index b9a7141f5a788930089d48759e90483b9f234616..15894a2f6ee7d34b13cdacf068e5c92e75fc287c 100644 (file)
@@ -160,11 +160,11 @@ public:
   }
 
   /// Attribute name for reverse in distance from other case
-  /*inline static const std::string& DISTANCE_REVERSE()
+  inline static const std::string& DISTANCE_REVERSE()
   {
     static const std::string ATTR_DISTANCE_REVERSE_ID("distance_reverse");
     return ATTR_DISTANCE_REVERSE_ID;
-  }*/
+  }
 
   /// Attribute name for coincident point.
   inline static const std::string& COINCIDENT_POINT()
index 797dacb6047bf6df054301d10854a3a10bb07c6a..9085e2c76433710a23dfde5bc75a05b080c6d166 100644 (file)
                        label="Distance"
                        tooltip="Distance from selected face to plane."
                        icon="icons/Construction/distance_value.png"
-                       default="0">
-            <validator id="GeomValidators_Positive"/>
-          </doublevalue>
-          <!--<boolvalue id="distance_reverse"
+                       default="10"/>
+          <boolvalue id="distance_reverse"
                      label="Reverse"
                      tooltip="Distance from plane."
-                     default="false"/>-->
+                     default="false"/>
         </box>
         <box id="by_coincident_to_point"
              title="By coincident to point"
index c2078e61d7bd8eb9ecb37bac57a3a0bf0b029cc1..d44e933a02affe8145db8edc13b70f59757f625a 100644 (file)
@@ -75,6 +75,7 @@ aPlane.string("creation_method").setValue("by_other_plane")
 aPlane.string("by_other_plane_option").setValue("by_distance_from_other")
 aPlane.selection("plane").selectSubShape("face", "Part_1/Extrusion_1_1/Generated_Face_3")
 aPlane.real("distance").setValue(0)
+aPlacementFt.boolean("distance_reverse").setValue(False)
 aSession.finishOperation()
 
 #=========================================================================