From: nds Date: Wed, 4 Oct 2017 03:55:41 +0000 (+0300) Subject: #2205 Ability to customize the arrows and texts of dimensions: Location type is not... X-Git-Tag: V_2.9.0~23^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bfe7682d53021d3fe1f4a68d0f02503afa2c480a;p=modules%2Fshaper.git #2205 Ability to customize the arrows and texts of dimensions: Location type is not obligatory attribute. --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp index 23bba812a..e1d15b68c 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintAngle.cpp @@ -23,6 +23,8 @@ #include #include +#include +#include #include @@ -68,6 +70,7 @@ void SketchPlugin_ConstraintAngle::initAttributes() data()->addAttribute(SketchPlugin_ConstraintAngle::LOCATION_TYPE_ID(), ModelAPI_AttributeInteger::typeId()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID()); } void SketchPlugin_ConstraintAngle::colorConfigInfo(std::string& theSection, std::string& theName, diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp index 7532a3e0e..e75dcde94 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include @@ -59,6 +61,7 @@ void SketchPlugin_ConstraintDistance::initAttributes() data()->addAttribute(SketchPlugin_ConstraintDistance::LOCATION_TYPE_ID(), ModelAPI_AttributeInteger::typeId()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID()); } void SketchPlugin_ConstraintDistance::colorConfigInfo(std::string& theSection, std::string& theName, diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistanceHorizontal.cpp b/src/SketchPlugin/SketchPlugin_ConstraintDistanceHorizontal.cpp index c75e83bf5..355292413 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistanceHorizontal.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistanceHorizontal.cpp @@ -33,6 +33,8 @@ #include #include +#include +#include const double tolerance = 1e-7; @@ -52,6 +54,7 @@ void SketchPlugin_ConstraintDistanceHorizontal::initAttributes() data()->addAttribute(SketchPlugin_ConstraintDistanceHorizontal::LOCATION_TYPE_ID(), ModelAPI_AttributeInteger::typeId()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID()); } //************************************************************************************* diff --git a/src/SketchPlugin/SketchPlugin_ConstraintDistanceVertical.cpp b/src/SketchPlugin/SketchPlugin_ConstraintDistanceVertical.cpp index 845b3b1cc..8823c3aa0 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintDistanceVertical.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintDistanceVertical.cpp @@ -33,6 +33,8 @@ #include #include +#include +#include const double tolerance = 1e-7; @@ -52,6 +54,7 @@ void SketchPlugin_ConstraintDistanceVertical::initAttributes() data()->addAttribute(SketchPlugin_ConstraintDistanceVertical::LOCATION_TYPE_ID(), ModelAPI_AttributeInteger::typeId()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID()); } //************************************************************************************* diff --git a/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp b/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp index 6eda688a8..70f004441 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintLength.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include @@ -56,6 +58,7 @@ void SketchPlugin_ConstraintLength::initAttributes() data()->addAttribute(SketchPlugin_ConstraintLength::LOCATION_TYPE_ID(), ModelAPI_AttributeInteger::typeId()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID()); } void SketchPlugin_ConstraintLength::colorConfigInfo(std::string& theSection, std::string& theName, diff --git a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp index bd5b0bd7d..0b34c183c 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include @@ -56,6 +58,7 @@ void SketchPlugin_ConstraintRadius::initAttributes() data()->addAttribute(SketchPlugin_ConstraintRadius::LOCATION_TYPE_ID(), ModelAPI_AttributeInteger::typeId()); + ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID()); } void SketchPlugin_ConstraintRadius::colorConfigInfo(std::string& theSection, std::string& theName,