24 #ifndef __POLYHEDRON_UTILS_H
25 #define __POLYHEDRON_UTILS_H
27 #include "mesher_cgal.h"
29 #include "self_intersect.h"
33 static bool _compare_ending(std::string filename,
const char* ending);
36 static bool readSurfaceFile(std::string filename, Exact_polyhedron& p);
37 static bool readSTLFile(std::string filename, Exact_polyhedron& p);
38 static bool readVTKFile(std::string filename, Exact_polyhedron& p);
39 static bool readVTKXMLFile(std::string filename, Exact_polyhedron& p);
40 static CGAL::Bbox_3 getBoundingBox(Polyhedron& polyhedron);
41 static double getBoundingSphereRadius(Polyhedron& polyhedron);
42 static bool has_degenerate_facets(Exact_polyhedron& p,
double threshold);
43 static void remove_degenerate_facets(Exact_polyhedron& p,
const double threshold);
45 template <
typename Polyhedron>
46 bool has_self_intersections(Polyhedron& p)
48 typedef typename Polyhedron::Triangle_3 Triangle;
49 typedef typename std::back_insert_iterator<std::list<Triangle> > OutputIterator;
51 std::list<Triangle> triangles;
52 ::self_intersect<Polyhedron::Polyhedron_3, Polyhedron::Kernel, OutputIterator>(p, std::back_inserter(triangles));
59 return triangles.size() > 0;
66 #include "PolyhedronUtils.imp.h"
Definition: PolyhedronUtils.h:31