mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +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
|
// Read precision for found representation's context
|
||||||
auto context = ifc_representation->ContextOfItems();
|
auto context = ifc_representation->ContextOfItems();
|
||||||
if (context->template as<typename Schema::IfcGeometricRepresentationSubContext>()) {
|
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);
|
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);
|
IfcGeom::BRepElement* brep = kernel.convert(settings, ifc_representation, product);
|
||||||
if (!brep) {
|
if (!brep) {
|
||||||
throw IfcParse::IfcException("Failed to process shape");
|
throw IfcParse::IfcException("Failed to process shape");
|
||||||
|
|||||||
Reference in New Issue
Block a user