Composite curves

This commit is contained in:
Ken Arroyo Ohori
2017-03-07 19:39:59 -06:00
parent 3f94d4af37
commit a3df0556aa
3 changed files with 94 additions and 2 deletions
@@ -127,7 +127,7 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcExtrudedAreaSolid *l, cgal
face_list.push_back(bottom_face);
// if (true) {
// cgal_shape_t polyhedron = CGAL::Polyhedron_3<Kernel>();
// CGAL::Polyhedron_3<Kernel> polyhedron;
// PolyhedronBuilder builder(&face_list);
// polyhedron.delegate(builder);
//
@@ -166,12 +166,13 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcExtrudedAreaSolid *l, cgal
// Stitch edges
// std::cout << "Before: " << polyhedron.size_of_vertices() << " vertices and " << polyhedron.size_of_facets() << " facets" << std::endl;
CGAL::Polyhedron_3<Kernel> old_polyhedron(polyhedron);
CGAL::Polygon_mesh_processing::stitch_borders(polyhedron);
if (!polyhedron.is_valid()) {
std::cout << "Invalid polyhedron!" << std::endl;
std::ofstream fresult;
fresult.open("/Users/ken/Desktop/invalid.off");
fresult << polyhedron << std::endl;
fresult << old_polyhedron << std::endl;
fresult.close();
}