Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIx for issue #360 : make switching on/off checking of transactions in Session -...
[modules/shaper.git]
/
src
/
GeomAPI
/
GeomAPI_Shape.cpp
diff --git
a/src/GeomAPI/GeomAPI_Shape.cpp
b/src/GeomAPI/GeomAPI_Shape.cpp
index 6cb6f74c4b8b0dcbf7a31ce122f9c0177442deac..5a84a3d98680abc7ba2753556332fe53b31bffb1 100644
(file)
--- a/
src/GeomAPI/GeomAPI_Shape.cpp
+++ b/
src/GeomAPI/GeomAPI_Shape.cpp
@@
-9,6
+9,9
@@
#include <TopoDS_Shape.hxx>
#include <BRepBndLib.hxx>
#include <Bnd_Box.hxx>
#include <TopoDS_Shape.hxx>
#include <BRepBndLib.hxx>
#include <Bnd_Box.hxx>
+#include <BRepTools.hxx>
+
+#include <sstream>
#define MY_SHAPE static_cast<TopoDS_Shape*>(myImpl)
#define MY_SHAPE static_cast<TopoDS_Shape*>(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;
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();
+}