summaryrefslogtreecommitdiff
path: root/src/CGAL_Nef_polyhedron_DxfData.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-06-04 09:34:27 (GMT)
committerMarius Kintel <marius@kintel.net>2012-06-04 09:34:27 (GMT)
commit197a4e4d364fbdd0aca8fb9027476ee1c48652e3 (patch)
tree6ca650907710971d6835732caadd4053cdc6f32a /src/CGAL_Nef_polyhedron_DxfData.cc
parent6735a8841b4ca93db2c101ab89d0875b5eee51a8 (diff)
parent9698d1d2fbe6b19573a0e483a6411a8ebd0f6947 (diff)
Merge branch 'master' into value
Diffstat (limited to 'src/CGAL_Nef_polyhedron_DxfData.cc')
-rw-r--r--src/CGAL_Nef_polyhedron_DxfData.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/CGAL_Nef_polyhedron_DxfData.cc b/src/CGAL_Nef_polyhedron_DxfData.cc
index fe58636..411a340 100644
--- a/src/CGAL_Nef_polyhedron_DxfData.cc
+++ b/src/CGAL_Nef_polyhedron_DxfData.cc
@@ -77,4 +77,29 @@ DxfData *CGAL_Nef_polyhedron::convertToDxfData() const
return dxfdata;
}
+// dump the 2 dimensional nef_poly.
+std::string CGAL_Nef_polyhedron::dump_p2() const
+{
+ std::stringstream out;
+ CGAL_Nef_polyhedron2::Explorer explorer = this->p2->explorer();
+ CGAL_Nef_polyhedron2::Explorer::Vertex_const_iterator i;
+ out << "CGAL_Nef_polyhedron::p2 Vertices";
+ for (i = explorer.vertices_begin(); i != explorer.vertices_end(); ++i) {
+ if ( explorer.is_standard( i ) ) {
+ CGAL_Nef_polyhedron2::Explorer::Point point = explorer.point( i );
+ out << "\n Point x y: "
+ << CGAL::to_double(point.x()) << " "
+ << CGAL::to_double(point.y());
+ } else {
+ CGAL_Nef_polyhedron2::Explorer::Ray ray = explorer.ray( i );
+ CGAL_Nef_polyhedron2::Explorer::Point point = ray.point( 0 );
+ out << "\n Ray x y dx dy: "
+ << CGAL::to_double(point.x()) << " " << CGAL::to_double(point.y()) << " "
+ << CGAL::to_double(ray.direction().dx()) << " " << CGAL::to_double(ray.direction().dy());
+ }
+ }
+ out << "\nCGAL_Nef_polyhedron::p2 Vertices end";
+ return out.str();
+}
+
#endif // ENABLE_CGAL
contact: Jan Huwald // Impressum