mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Don't bother creation relationships to invalid psets.
An invalid pset can occur when the pset doesn't contain any properties. This can happen when all properties are not part of the pset definition template. This may lead to unwanted data loss, but strictly enforces buildingSMART pset definitions.
This commit is contained in:
@@ -2627,10 +2627,11 @@ class IfcExporter():
|
||||
|
||||
def relate_objects_to_psets(self):
|
||||
for relating_property_key, related_objects in self.ifc_parser.rel_defines_by_pset.items():
|
||||
self.file.createIfcRelDefinesByProperties(
|
||||
ifcopenshell.guid.new(), self.owner_history, None, None,
|
||||
[o['ifc'] for o in related_objects],
|
||||
self.ifc_parser.psets[relating_property_key]['ifc'])
|
||||
if self.ifc_parser.psets[relating_property_key]['ifc']:
|
||||
self.file.createIfcRelDefinesByProperties(
|
||||
ifcopenshell.guid.new(), self.owner_history, None, None,
|
||||
[o['ifc'] for o in related_objects],
|
||||
self.ifc_parser.psets[relating_property_key]['ifc'])
|
||||
|
||||
def relate_objects_to_materials(self):
|
||||
if not self.ifc_export_settings.has_representations:
|
||||
|
||||
Reference in New Issue
Block a user