#2805 IfcGeom dynamic casting updates

This commit is contained in:
Thomas Krijnen
2023-06-22 14:07:34 +02:00
parent e9d0b8ab66
commit 65cb47e2d8
7 changed files with 32 additions and 29 deletions
+6 -6
View File
@@ -58,14 +58,14 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcGeometricSet* l, IfcRepresenta
part_succes = true;
decltype(parent_style) style = 0;
if (element->declaration().is(IfcSchema::IfcPoint::Class())) {
style = get_style((IfcSchema::IfcPoint*) element);
if (element->as<IfcSchema::IfcPoint>()) {
style = get_style(element->as<IfcSchema::IfcPoint>());
}
else if (element->declaration().is(IfcSchema::IfcCurve::Class())) {
style = get_style((IfcSchema::IfcCurve*) element);
else if (element->as<IfcSchema::IfcPoint>()) {
style = get_style(element->as<IfcSchema::IfcPoint>());
}
else if (element->declaration().is(IfcSchema::IfcSurface::Class())) {
style = get_style((IfcSchema::IfcSurface*) element);
else if (element->as<IfcSchema::IfcPoint>()) {
style = get_style(element->as<IfcSchema::IfcPoint>());
}
shapes.push_back(IfcRepresentationShapeItem(l->data().id(), s, style ? style : parent_style));
}