#include <TopoDS_Shape.hxx>
#include <BRepBndLib.hxx>
#include <Bnd_Box.hxx>
+#include <BRepTools.hxx>
+
+#include <sstream>
#define MY_SHAPE static_cast<TopoDS_Shape*>(myImpl)
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<GeomAPI_Shape*>(this)->impl<TopoDS_Shape>();
+ BRepTools::Write(aShape, aStream);
+ return aStream.str();
+}
bool computeSize(double& theXmin, double& theYmin, double& theZmin,
double& theXmax, double& theYmax, double& theZmax) const;
+ std::string getShapeStream() const;
};
//! Pointer on list of shapes