summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-12-14 23:25:40 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-12-14 23:25:40 (GMT)
commit09d60fd5afd54f1537ff6f5349f6466be8401d01 (patch)
tree94870bb1c23eddd78df9b29e55b3603924837373 /src
parent0a2b7ca0d4d7fb1acda9996d69b25ff6b5495856 (diff)
stub of face tessellation function for polyset
Diffstat (limited to 'src')
-rw-r--r--src/CGALEvaluator.cc2
-rw-r--r--src/cgalutils.h2
-rw-r--r--src/dxftess-cgal.cc3
-rw-r--r--src/dxftess.h2
-rw-r--r--src/import.cc2
5 files changed, 6 insertions, 5 deletions
diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc
index 26d3e4c..9902f70 100644
--- a/src/CGALEvaluator.cc
+++ b/src/CGALEvaluator.cc
@@ -686,7 +686,7 @@ CGAL_Nef_polyhedron CGALEvaluator::evaluateCGALMesh(const PolySet &ps)
if (plane_error) try {
PolySet ps2;
CGAL_Polyhedron P;
- tessellate_faces( ps, ps2 );
+ tessellate_3d_faces( ps, ps2 );
createPolyhedronFromPolySet(ps2,P);
N = new CGAL_Nef_polyhedron3(P);
}
diff --git a/src/cgalutils.h b/src/cgalutils.h
index 50b819a..0e7fbb5 100644
--- a/src/cgalutils.h
+++ b/src/cgalutils.h
@@ -3,7 +3,7 @@
#include <cgal.h>
bool createPolySetFromPolyhedron(const CGAL_Polyhedron &p, class PolySet &ps);
-bool createPolyhedronFromPolySet(const class PolySet &ps, class CGAL_Polyhedron &p);
+bool createPolyhedronFromPolySet(const class PolySet &ps, CGAL_Polyhedron &p);
CGAL_Iso_cuboid_3 bounding_box( const CGAL_Nef_polyhedron3 &N );
CGAL_Iso_rectangle_2e bounding_box( const CGAL_Nef_polyhedron2 &N );
diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc
index a3ebccf..d6f592f 100644
--- a/src/dxftess-cgal.cc
+++ b/src/dxftess-cgal.cc
@@ -338,11 +338,12 @@ void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, Vector2d scale, bool u
void triangulate_polygon( const PolySet::Polygon &pgon, std::vector<PolySet::Polygon> &triangles )
{
+
}
/* given a 3d PolySet with 'near planar' faces, triangulate the faces
so CGAL Nef Polyhedron will accept them. */
-void tessellate_3d_faces( PolySet &inps, PolySet &outps ) {
+void tessellate_3d_faces( const PolySet &inps, PolySet &outps ) {
for (size_t i = 0; i < inps.polygons.size(); i++) {
const PolySet::Polygon *pgon = &inps.polygons[i];
for (size_t j = 0; j < pgon->size(); j++) {
diff --git a/src/dxftess.h b/src/dxftess.h
index 3d96747..d596f0b 100644
--- a/src/dxftess.h
+++ b/src/dxftess.h
@@ -7,6 +7,6 @@ class DxfData;
class PolySet;
void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, Vector2d scale, bool up, bool do_triangle_splitting, double h);
void dxf_border_to_ps(PolySet *ps, const DxfData &dxf);
-void tessellate_3d_faces( PolySet &inps, PolySet &outps );
+void tessellate_3d_faces( const PolySet &inps, PolySet &outps );
#endif
diff --git a/src/import.cc b/src/import.cc
index af905fc..f62200b 100644
--- a/src/import.cc
+++ b/src/import.cc
@@ -285,7 +285,7 @@ PolySet *ImportNode::evaluate_polyset(class PolySetEvaluator *) const
file.close();
p = new PolySet();
- bool err = createPolySetFromPolyhedron(poly, *p);
+ createPolySetFromPolyhedron(poly, *p);
}
#else
PRINT("WARNING: OFF import requires CGAL.");
contact: Jan Huwald // Impressum