Do no silently drop invalid faces from IfcConnectedFaceSets

This commit is contained in:
Thomas Krijnen
2016-06-21 11:27:59 +02:00
parent ee2303d965
commit 69535800b5
+8 -2
View File
@@ -621,12 +621,18 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcConnectedFaceSet* l, TopoDS_Sh
TopTools_ListOfShape face_list; TopTools_ListOfShape face_list;
for (IfcSchema::IfcFace::list::it it = faces->begin(); it != faces->end(); ++it) { for (IfcSchema::IfcFace::list::it it = faces->begin(); it != faces->end(); ++it) {
bool success = false;
TopoDS_Face face; TopoDS_Face face;
try { try {
convert_face(*it, face); success = convert_face(*it, face);
} catch (...) { } catch (...) {}
if (!success) {
Logger::Message(Logger::LOG_WARNING, "Failed to convert face:", (*it)->entity);
continue; continue;
} }
if (face_area(face) > getValue(GV_MINIMAL_FACE_AREA)) { if (face_area(face) > getValue(GV_MINIMAL_FACE_AREA)) {
face_list.Append(face); face_list.Append(face);
} else { } else {