mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
#2260 correct init order
This commit is contained in:
@@ -483,6 +483,15 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
}
|
||||
}
|
||||
|
||||
if (!ifc_representation) {
|
||||
if (reps->size()) {
|
||||
// Return a random representation
|
||||
ifc_representation = *reps->begin();
|
||||
} else {
|
||||
throw IfcParse::IfcException("No suitable IfcRepresentation found");
|
||||
}
|
||||
}
|
||||
|
||||
// Read precision for found representation's context
|
||||
auto context = ifc_representation->ContextOfItems();
|
||||
if (context->template as<typename Schema::IfcGeometricRepresentationSubContext>()) {
|
||||
@@ -499,15 +508,6 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
kernel.setValue(IfcGeom::Kernel::GV_PRECISION, p);
|
||||
}
|
||||
|
||||
if (!ifc_representation) {
|
||||
if (reps->size()) {
|
||||
// Return a random representation
|
||||
ifc_representation = *reps->begin();
|
||||
} else {
|
||||
throw IfcParse::IfcException("No suitable IfcRepresentation found");
|
||||
}
|
||||
}
|
||||
|
||||
IfcGeom::BRepElement* brep = kernel.convert(settings, ifc_representation, product);
|
||||
if (!brep) {
|
||||
throw IfcParse::IfcException("Failed to process shape");
|
||||
|
||||
Reference in New Issue
Block a user