Apply transformation to IfcExtrudedAreaSolid

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