From: vsv Date: Mon, 23 Nov 2015 09:49:06 +0000 (+0300) Subject: Provide special symbol for parametrized dimensions X-Git-Tag: V_2.1.0~240^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e6773333b955991aa3ebddd6476e3c253f2aa1d9;p=modules%2Fshaper.git Provide special symbol for parametrized dimensions --- diff --git a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp index 24977ecee..8f93fd0ea 100644 --- a/src/SketcherPrs/SketcherPrs_LengthDimension.cpp +++ b/src/SketcherPrs/SketcherPrs_LengthDimension.cpp @@ -21,12 +21,17 @@ #include #include +#include + +#include static const gp_Pnt MyDefStart(0,0,0); static const gp_Pnt MyDefEnd(1,0,0); static const gp_Pln MyDefPln(gp_Pnt(0,0,0), gp_Dir(0,0,1)); +static const Standard_ExtCharacter MySummSymbol(0x2211); + IMPLEMENT_STANDARD_HANDLE(SketcherPrs_LengthDimension, AIS_LengthDimension); IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension); @@ -67,6 +72,13 @@ void SketcherPrs_LengthDimension::Compute(const Handle(PrsMgr_PresentationManage // The value of vertical aligment is sometimes changed myAspect->TextAspect()->SetVerticalJustification(Graphic3d_VTA_CENTER); + AttributeDoublePtr aValue = myConstraint->data()->real(SketchPlugin_Constraint::VALUE()); + std::set aParams = aValue->usedParameters(); + if (aParams.size() > 0) { + SetSpecialSymbol(MySummSymbol); + SetDisplaySpecialSymbol(AIS_DSS_Before); + } + AIS_LengthDimension::Compute(thePresentationManager, thePresentation, theMode); } diff --git a/src/XGUI/pictures/expression.png b/src/XGUI/pictures/expression.png index d9ea77546..158678a87 100644 Binary files a/src/XGUI/pictures/expression.png and b/src/XGUI/pictures/expression.png differ