diff options
Diffstat (limited to 'src/dxfdata.cc')
-rw-r--r-- | src/dxfdata.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/dxfdata.cc b/src/dxfdata.cc index 52493ac..20fcc71 100644 --- a/src/dxfdata.cc +++ b/src/dxfdata.cc @@ -38,6 +38,7 @@ #include <boost/lexical_cast.hpp> #include <boost/algorithm/string.hpp> #include <algorithm> +#include <sstream> #include <QDir> #include "value.h" @@ -555,3 +556,27 @@ int DxfData::addPoint(double x, double y) return this->points.size()-1; } +std::string DxfData::dump() const +{ + std::stringstream out; + out << "DxfData" + << "\n num points: " << points.size() + << "\n num paths: " << paths.size() + << "\n num dims: " << dims.size() + << "\n points: "; + for ( size_t k = 0 ; k < points.size() ; k++ ) { + out << "\n x y: " << points[k].transpose(); + } + out << "\n paths: "; + for ( size_t i = 0; i < paths.size(); i++ ) { + out << "\n path:" << i + << "\n is_closed: " << paths[i].is_closed + << "\n is_inner: " << paths[i].is_inner ; + DxfData::Path path = paths[i]; + for ( size_t j = 0; j < path.indices.size(); j++ ) { + out << "\n index[" << j << "]==" << path.indices[j]; + } + } + out << "\nDxfData end"; + return out.str(); +} |