mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-11 22:31:55 +00:00
Take into account Position is optional in IFC4 when processing layersets on slabs
This commit is contained in:
@@ -1554,9 +1554,16 @@ bool IfcGeom::Kernel::convert_layerset(const IfcSchema::IfcProduct* product, std
|
|||||||
IfcSchema::IfcExtrudedAreaSolid* extrusion = *extrusions->begin();
|
IfcSchema::IfcExtrudedAreaSolid* extrusion = *extrusions->begin();
|
||||||
|
|
||||||
gp_Trsf extrusion_position;
|
gp_Trsf extrusion_position;
|
||||||
if (!convert(extrusion->Position(), extrusion_position)) {
|
|
||||||
Logger::Message(Logger::LOG_ERROR, "Failed to convert placement for extrusion of:", product->entity);
|
bool has_position = true;
|
||||||
return false;
|
#ifdef USE_IFC4
|
||||||
|
has_position = extrusion->hasPosition();
|
||||||
|
#endif
|
||||||
|
if (has_position) {
|
||||||
|
if (!convert(extrusion->Position(), extrusion_position)) {
|
||||||
|
Logger::Message(Logger::LOG_ERROR, "Failed to convert placement for extrusion of:", product->entity);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gp_Dir extrusion_direction;
|
gp_Dir extrusion_direction;
|
||||||
|
|||||||
Reference in New Issue
Block a user