Salome HOME
Fix SketcherSetEqual.test_length_equality
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Point.cpp
index 4c13dba4958abb832558f62db3d307c557470e4e..c164e44a40225855d89111b0ed14b17be1a45e2e 100644 (file)
@@ -13,6 +13,8 @@
 #include <GeomAlgoAPI_PointBuilder.h>
 #include <GeomAPI_Pnt.h>
 
+#include <Config_PropManager.h>
+
 using namespace std;
 
 ConstructionPlugin_Point::ConstructionPlugin_Point()
@@ -27,9 +29,9 @@ const std::string& ConstructionPlugin_Point::getKind()
 
 void ConstructionPlugin_Point::initAttributes()
 {
-  data()->addAttribute(ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble::type());
+  data()->addAttribute(ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble::typeId());
 }
 
 void ConstructionPlugin_Point::execute()
@@ -43,3 +45,13 @@ void ConstructionPlugin_Point::execute()
   aConstr->setShape(GeomAlgoAPI_PointBuilder::point(aPnt));
   setResult(aConstr);
 }
+
+bool ConstructionPlugin_Point::customisePresentation(ResultPtr theResult, 
+                                                     AISObjectPtr thePrs,
+                               std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
+{
+  bool isCustomized = theDefaultPrs.get() != NULL &&
+                      theDefaultPrs->customisePresentation(theResult, thePrs, theDefaultPrs);
+  //thePrs->setPointMarker(1, 1.); // Set point as a '+' symbol
+  return true;
+}