Salome HOME
#1119 Confirmation box for deleting parts
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Tools.cpp
index be093bc6907cb17a08113abc0e1609814fda819a..78b521957ba85a23359bbb5c29d62e09f7e75cd9 100644 (file)
 #include <BRep_Tool.hxx>
 #include <Precision.hxx>
 
+#include <AIS_Dimension.hxx>
+
+// it is not possible to use 0x2211 as summ symbol because it is not supported by
+// debian Linux platform
+static const Standard_ExtCharacter MyEmptySymbol(' ');
+static const Standard_ExtCharacter MySigmaSymbol(0x03A3);
+
 namespace SketcherPrs_Tools {
 
 ObjectPtr getResult(ModelAPI_Feature* theFeature, const std::string& theAttrName)
@@ -267,4 +274,16 @@ std::shared_ptr<GeomAPI_Pnt> getAnchorPoint(const ModelAPI_Feature* theConstrain
   return thePlane->to3D(aFlyoutPnt->x(), aFlyoutPnt->y());
 }
 
+void setDisplaySpecialSymbol(AIS_Dimension* theDimension, const bool& theToDisplay)
+{
+  if (theToDisplay) {
+    theDimension->SetSpecialSymbol(MySigmaSymbol);
+    theDimension->SetDisplaySpecialSymbol(AIS_DSS_Before);
+  }
+  else {
+    theDimension->SetSpecialSymbol(MyEmptySymbol);
+    theDimension->SetDisplaySpecialSymbol(AIS_DSS_No);
+  }
+}
+
 };