Salome HOME
Make highlight of points as a circle instead of +
[modules/shaper.git] / src / ModuleBase / ModuleBase_Tools.cpp
index 169f911d3a0655e8053ee26f71d6579a7953d2e4..986d22d18a5f707545ee2f583f80e4f58037504c 100755 (executable)
@@ -41,6 +41,9 @@
 #include <Config_PropManager.h>
 #include <Config_Translator.h>
 
+#include <Prs3d_PointAspect.hxx>
+#include <Graphic3d_AspectMarker3d.hxx>
+
 #include <QWidget>
 #include <QLayout>
 #include <QPainter>
@@ -1150,6 +1153,17 @@ void translate(const std::string& theContext, std::string& theMessage)
   }
 }
 
+void setPointBallHighlighting(AIS_Shape* theAIS)
+{
+  Handle(Prs3d_Drawer) aDrawer = theAIS->HilightAttributes();
+  if (aDrawer->HasOwnPointAspect()) {
+    Handle(Prs3d_PointAspect) aPntAspect = aDrawer->PointAspect();
+    aPntAspect->Aspect()->SetType(Aspect_TOM_BALL);
+    aDrawer->SetPointAspect(aPntAspect);
+    theAIS->SetHilightAttributes(aDrawer);
+  }
+}
+
 } // namespace ModuleBase_Tools