]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #853: make '+' as default point symbol
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 24 Aug 2015 13:02:31 +0000 (16:02 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 24 Aug 2015 13:02:44 +0000 (16:02 +0300)
src/GeomAPI/GeomAPI_AISObject.cpp

index 10d720c835520e431bc0583e1e7e6215c5049639..b8b5a7b2252bbbf4b6a4736f9ebf9ccadf371144 100644 (file)
@@ -71,8 +71,16 @@ void GeomAPI_AISObject::createShape(std::shared_ptr<GeomAPI_Shape> theShape)
       aShapeAIS->Set(aTDS);
       aShapeAIS->Redisplay(Standard_True);
     }
-  } else
-    setImpl(new Handle(AIS_InteractiveObject)(new AIS_Shape(aTDS)));
+  } else {
+    // Set default point as a '+' symbol
+    Handle(AIS_Shape) aShape = new AIS_Shape(aTDS);
+    Handle(Prs3d_Drawer) aDrawer = aShape->Attributes();
+    if (aDrawer->HasOwnPointAspect()) 
+      aDrawer->PointAspect()->SetTypeOfMarker(Aspect_TOM_PLUS);
+    else
+      aDrawer->SetPointAspect(new Prs3d_PointAspect(Aspect_TOM_PLUS, Quantity_NOC_YELLOW, 1.));
+    setImpl(new Handle(AIS_InteractiveObject)(aShape));
+  }
 }
 
 void GeomAPI_AISObject::createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,