From e6773333b955991aa3ebddd6476e3c253f2aa1d9 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 23 Nov 2015 12:49:06 +0300 Subject: [PATCH] Provide special symbol for parametrized dimensions --- src/SketcherPrs/SketcherPrs_LengthDimension.cpp | 12 ++++++++++++ src/XGUI/pictures/expression.png | Bin 648 -> 437 bytes 2 files changed, 12 insertions(+) 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 d9ea77546004261d02fa1cf2bfa704a0546e349b..158678a87d07c6633fbc2ce55d17826ae90f934b 100644 GIT binary patch delta 411 zcmV;M0c8G&1+@c^B!2;OQb$4nuFf3k00004XF*Lt006O%3;baP00009a7bBm000id z000id0mpBsWB>pF7<5HgbW?9;ba!ELWdLwtX>N2bZe?^JG%heMHvEiZ-v9ssCP_p= zR5(v#`2YVuMHs6fDHw$#<{A(q>JqS@0N#zP2gLwMdmj-|=YN3vVlDyyfq1p3tA7F< zyZASYIS1SZ$sy}OF#v>tiVehE{6B**h>a}AU~kVN=Ino6+}&RRE{3cChCyC|xWfOj zsC}peikypo0kRle0v!XL+YK^A)Y<?SJDru&KciK*plZfgT_OgzN)lu*rikRzVOJb_>z~YJM*4;%9LlTApJaS+CT z^WS&P6t|@I%Ps0qT`Gtof^MSQ62!W%QXq8A66%uIBs_NzqJKjkfIC@2X)DyJUF*ucz!U?JR_>gX3A_z{U;z4cdvxw?yHRik+^#= z6nFdA0V0V+y}&hKcq4#9TA(|YNbLr20IY7kED*vn)Y$B9uXQ+LRZ4~2$TNUo!ae3# z8XTYhWx!v0_%q1-cA?Q8^2|DLfthu<#>PRJeiYM5ML-Ot>X=(pa8b=-(D# z@!j}%NgxZ-4q#%*WSzoMg^vI_IZ&=t?0H~Gh1(dp3;e1WU+3#|dU<6HodI@)n$JZ{ zr9>DIQJq=ab1t8Gi%1V>4A_rI&-~-zsj3fZz5p0!`G1fxp5Lz6DaF6+s`jF~bKOW- z1h7Jl`IaB~3=~nKYxAa-jy)*1fUm%`!u4ot$MLFOv=Kn9d2duz1*U*~0MgfID#i{1 z0gLHE{Zv)Rm;0Vw1$1(Z7o zm;NUPuob!yCT6plF<4C^K&jU2tttBsZwL_5>UlS-hHmzqe*?%I$=pl(9*6({002ov JPDHLkV1f=Q8NC1i -- 2.39.2