mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 05:22:06 +00:00
Fix #534
This commit is contained in:
@@ -1530,8 +1530,8 @@ IfcGeom::BRepElement<P, PP>* IfcGeom::Kernel::create_brep_for_representation_and
|
|||||||
|
|
||||||
int parent_id = -1;
|
int parent_id = -1;
|
||||||
try {
|
try {
|
||||||
IfcSchema::IfcObjectDefinition* parent_object = get_decomposing_entity(product)->as<IfcSchema::IfcObjectDefinition>();
|
IfcUtil::IfcBaseEntity* parent_object = get_decomposing_entity(product);
|
||||||
if (parent_object) {
|
if (parent_object && parent_object->as<IfcSchema::IfcObjectDefinition>()) {
|
||||||
parent_id = parent_object->data().id();
|
parent_id = parent_object->data().id();
|
||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
@@ -1777,8 +1777,8 @@ IfcGeom::BRepElement<P, PP>* IfcGeom::Kernel::create_brep_for_processed_represen
|
|||||||
{
|
{
|
||||||
int parent_id = -1;
|
int parent_id = -1;
|
||||||
try {
|
try {
|
||||||
IfcSchema::IfcObjectDefinition* parent_object = get_decomposing_entity(product)->as<IfcSchema::IfcObjectDefinition>();
|
IfcUtil::IfcBaseEntity* parent_object = get_decomposing_entity(product);
|
||||||
if (parent_object) {
|
if (parent_object && parent_object->as<IfcSchema::IfcObjectDefinition>()) {
|
||||||
parent_id = parent_object->data().id();
|
parent_id = parent_object->data().id();
|
||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user