summaryrefslogtreecommitdiff
path: root/src/dxfdata.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-07-07 20:02:51 (GMT)
committerMarius Kintel <marius@kintel.net>2012-07-07 20:02:51 (GMT)
commit0d619e5ac155e37c432d57062d8224a58c9d59ab (patch)
tree10183df17cd4786ee1ef43b95c988fefd13ca990 /src/dxfdata.cc
parentaa8aee623adc74cbfe87f9e92e30be4a9ed3a7c8 (diff)
parentb028b704e029a5161d3703efda35642a37c28cb6 (diff)
Merge branch 'master' into linear_extrude_argument
Diffstat (limited to 'src/dxfdata.cc')
-rw-r--r--src/dxfdata.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/dxfdata.cc b/src/dxfdata.cc
index 2b84f7e..00b246f 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();
+}
contact: Jan Huwald // Impressum