X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Shape.cpp;h=5a84a3d98680abc7ba2753556332fe53b31bffb1;hb=aeca03e919a402327655e3f9c133985d9223b873;hp=6cb6f74c4b8b0dcbf7a31ce122f9c0177442deac;hpb=0e81819f07355dfbaf79fed0fd8e649900f2af40;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Shape.cpp b/src/GeomAPI/GeomAPI_Shape.cpp index 6cb6f74c4..5a84a3d98 100644 --- a/src/GeomAPI/GeomAPI_Shape.cpp +++ b/src/GeomAPI/GeomAPI_Shape.cpp @@ -9,6 +9,9 @@ #include #include #include +#include + +#include #define MY_SHAPE static_cast(myImpl) @@ -60,4 +63,12 @@ bool GeomAPI_Shape::computeSize(double& theXmin, double& theYmin, double& theZmi BRepBndLib::Add(aShape, aBndBox); aBndBox.Get(theXmin, theYmin, theZmin, theXmax, theYmax, theZmax); return true; -} \ No newline at end of file +} + +std::string GeomAPI_Shape::getShapeStream() const +{ + std::ostringstream aStream; + const TopoDS_Shape& aShape = const_cast(this)->impl(); + BRepTools::Write(aShape, aStream); + return aStream.str(); +}