X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FGeomAPI%2FGeomAPI_AISObject.cpp;h=198a1892631ded1ab512bfaaf282d6f7b9473160;hb=71a74e7993bcab222f1bf8deed1d141cab81bdf5;hp=bd8892987095df14e38c193c0814f0d4835b9cb1;hpb=1924606833292eede4a943af131063199e252feb;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index bd8892987..198a18926 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -83,6 +83,22 @@ void GeomAPI_AISObject::createShape(std::shared_ptr theShape) } } +std::shared_ptr GeomAPI_AISObject::getShape() const +{ + std::shared_ptr aResult; + + Handle(AIS_InteractiveObject) anAIS = impl(); + if (!anAIS.IsNull()) { + Handle(AIS_Shape) aShapeAIS = Handle(AIS_Shape)::DownCast(anAIS); + if (aShapeAIS) { + std::shared_ptr aResult(new GeomAPI_Shape); + aResult->setImpl(new TopoDS_Shape(aShapeAIS->Shape())); + return aResult; + } + } + return std::shared_ptr(); +} + void GeomAPI_AISObject::createDistance(std::shared_ptr theStartPoint, std::shared_ptr theEndPoint, std::shared_ptr theFlyoutPoint,