summaryrefslogtreecommitdiff
path: root/src/export.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-08-22 17:31:56 (GMT)
committerMarius Kintel <marius@kintel.net>2011-08-22 17:31:56 (GMT)
commit428d5bfc0e8684d6cf8116d0a580b36281135a45 (patch)
tree95319f09ce16b96512e382a1fc86c1f5e56caa0a /src/export.cc
parentbe63c6eeacf7ed4604106dc0859602ba98847a4f (diff)
Refactored cgal_nef3_to_polyset() to cgal wrapper class
Diffstat (limited to 'src/export.cc')
-rw-r--r--src/export.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/export.cc b/src/export.cc
index c87e917..e46a14f 100644
--- a/src/export.cc
+++ b/src/export.cc
@@ -36,42 +36,6 @@
#ifdef ENABLE_CGAL
#include "cgal.h"
-void cgal_nef3_to_polyset(PolySet *ps, CGAL_Nef_polyhedron *root_N)
-{
- CGAL_Polyhedron P;
- root_N->p3.convert_to_Polyhedron(P);
-
- typedef CGAL_Polyhedron::Vertex Vertex;
- typedef CGAL_Polyhedron::Vertex_const_iterator VCI;
- typedef CGAL_Polyhedron::Facet_const_iterator FCI;
- typedef CGAL_Polyhedron::Halfedge_around_facet_const_circulator HFCC;
-
- for (FCI fi = P.facets_begin(); fi != P.facets_end(); ++fi) {
- HFCC hc = fi->facet_begin();
- HFCC hc_end = hc;
- Vertex v1, v2, v3;
- v1 = *VCI((hc++)->vertex());
- v3 = *VCI((hc++)->vertex());
- do {
- v2 = v3;
- v3 = *VCI((hc++)->vertex());
- double x1 = CGAL::to_double(v1.point().x());
- double y1 = CGAL::to_double(v1.point().y());
- double z1 = CGAL::to_double(v1.point().z());
- double x2 = CGAL::to_double(v2.point().x());
- double y2 = CGAL::to_double(v2.point().y());
- double z2 = CGAL::to_double(v2.point().z());
- double x3 = CGAL::to_double(v3.point().x());
- double y3 = CGAL::to_double(v3.point().y());
- double z3 = CGAL::to_double(v3.point().z());
- ps->append_poly();
- ps->append_vertex(x1, y1, z1);
- ps->append_vertex(x2, y2, z2);
- ps->append_vertex(x3, y3, z3);
- } while (hc != hc_end);
- }
-}
-
/*!
Saves the current 3D CGAL Nef polyhedron as STL to the given file.
The file must be open.
contact: Jan Huwald // Impressum