From: nds Date: Tue, 19 Jul 2016 11:51:20 +0000 (+0300) Subject: Issue #1649: New creation of Construction Planes X-Git-Tag: V_2.5.0~184 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d613df7d51faeba83c5225ac9ba78e35f80094c;p=modules%2Fshaper.git Issue #1649: New creation of Construction Planes "Reverse" boolean attribute in plane creation in distance to other plane. --- diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp b/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp index 1e3e98ab5..68f3e5b0a 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -67,6 +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(COINCIDENT_POINT(), ModelAPI_AttributeSelection::typeId()); data()->addAttribute(AXIS(), ModelAPI_AttributeSelection::typeId()); data()->addAttribute(ANGLE(), ModelAPI_AttributeDouble::typeId()); diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plane.h b/src/ConstructionPlugin/ConstructionPlugin_Plane.h index 999e6fa65..15894a2f6 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plane.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Plane.h @@ -159,6 +159,13 @@ public: return ATTR_ID; } + /// Attribute name for reverse in distance from other case + 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() { diff --git a/src/ConstructionPlugin/plane_widget.xml b/src/ConstructionPlugin/plane_widget.xml index fc85d1b26..8f3ed0dc5 100644 --- a/src/ConstructionPlugin/plane_widget.xml +++ b/src/ConstructionPlugin/plane_widget.xml @@ -68,7 +68,13 @@ label="Distance" tooltip="Distance from selected face to plane." icon="icons/Construction/distance_value.png" - default="0"/> + default="10"> + + +