Apply transformation to IfcExtrudedAreaSolid

This commit is contained in:
Thomas Krijnen
2017-03-09 15:35:29 +01:00
parent 0596827b9d
commit 7bcd0d0a8d
@@ -191,6 +191,10 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcExtrudedAreaSolid *l, cgal
CGAL::Polygon_mesh_processing::reverse_face_orientations(polyhedron);
} CGAL_postcondition(polyhedron.is_valid() && polyhedron.is_closed());
// std::cout << "After: " << polyhedron.size_of_vertices() << " vertices and " << polyhedron.size_of_facets() << " facets" << std::endl;
for (auto &vertex : vertices(polyhedron)) {
vertex->point() = vertex->point().transform(trsf);
}
shape = CGAL::Nef_polyhedron_3<Kernel>(polyhedron);
@@ -241,6 +245,10 @@ bool IfcGeom::CgalKernel::convert(const IfcSchema::IfcExtrudedAreaSolid *l, cgal
fresult << hole_polyhedron << std::endl;
fresult.close();
}
for (auto &vertex : vertices(hole_polyhedron)) {
vertex->point() = vertex->point().transform(trsf);
}
if (!CGAL::Polygon_mesh_processing::is_outward_oriented(hole_polyhedron)) {
CGAL::Polygon_mesh_processing::reverse_face_orientations(hole_polyhedron);