#1649 allow profile def in create shape()

This commit is contained in:
Thomas Krijnen
2021-08-14 09:12:11 +02:00
parent 0ce35466ff
commit 4cb59009b4
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -446,7 +446,11 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
}
} else {
if (!representation) {
if (instance->declaration().is(Schema::IfcRepresentationItem::Class()) || instance->declaration().is(Schema::IfcRepresentation::Class())) {
if (instance->declaration().is(Schema::IfcRepresentationItem::Class()) ||
instance->declaration().is(Schema::IfcRepresentation::Class()) ||
// https://github.com/IfcOpenShell/IfcOpenShell/issues/1649
instance->declaration().is(Schema::IfcProfileDef::Class())
) {
IfcGeom::IfcRepresentationShapeItems shapes = kernel.convert(instance);
IfcGeom::ElementSettings element_settings(settings, kernel.getValue(IfcGeom::Kernel::GV_LENGTH_UNIT), instance->declaration().name());