mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 11:43:53 +00:00
create_shape - raise the same error for representations and rep items
To be consistent with how it's handled when product+representation is passed, previously it would fail silently.
This commit is contained in:
@@ -844,7 +844,12 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
// https://github.com/IfcOpenShell/IfcOpenShell/issues/1649
|
||||
instance->declaration().is(Schema::IfcProfileDef::Class())
|
||||
) {
|
||||
IfcGeom::ConversionResults shapes = kernel.convert(instance);
|
||||
IfcGeom::ConversionResults shapes;
|
||||
try {
|
||||
shapes = kernel.convert(instance);
|
||||
} catch (...) {
|
||||
throw IfcParse::IfcException("Failed to process shape");
|
||||
}
|
||||
|
||||
IfcGeom::Representation::BRep brep(settings, instance->declaration().name(), to_locale_invariant_string(instance->data().id()), shapes);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user