diff options
author | Don Bright <hugh.m.bright@gmail.com> | 2012-02-11 02:15:16 (GMT) |
---|---|---|
committer | Don Bright <hugh.m.bright@gmail.com> | 2012-02-11 02:15:16 (GMT) |
commit | a76d5b02bdb8cd7a9d32c2e204c86726d1384c63 (patch) | |
tree | cb4d936cf0cfede1d7f07f18ab3edfc0b35f6233 /src/CGAL_Nef_polyhedron_DxfData.cc | |
parent | a83fda0c3d9e92a6e47622cd1c2fdeebdfbb8c1a (diff) |
use Nef_polyhedron3 intersection to do projection(cut).
Diffstat (limited to 'src/CGAL_Nef_polyhedron_DxfData.cc')
-rw-r--r-- | src/CGAL_Nef_polyhedron_DxfData.cc | 25 |
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..d5f774d 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; } +// moved here to reduce compile size/time of CGAL_Nef_polyhedron.cc +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 Standard vertex 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()) << "\n"; + } + } + out << "\nCGAL_Nef_polyhedron::p2 vertices end"; + return out.str(); +} + #endif // ENABLE_CGAL |