mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Check for existence of representation identifier in python wrapper create_shape
This commit is contained in:
@@ -274,6 +274,9 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
|||||||
// First, try to find a representation based on the settings
|
// First, try to find a representation based on the settings
|
||||||
for (IfcSchema::IfcRepresentation::list::it it = reps->begin(); it != reps->end(); ++it) {
|
for (IfcSchema::IfcRepresentation::list::it it = reps->begin(); it != reps->end(); ++it) {
|
||||||
IfcSchema::IfcRepresentation* rep = *it;
|
IfcSchema::IfcRepresentation* rep = *it;
|
||||||
|
if (!rep->hasRepresentationIdentifier()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (!settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) {
|
if (!settings.get(IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES)) {
|
||||||
if (rep->RepresentationIdentifier() == "Body") {
|
if (rep->RepresentationIdentifier() == "Body") {
|
||||||
ifc_representation = rep;
|
ifc_representation = rep;
|
||||||
|
|||||||
Reference in New Issue
Block a user