Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PJS002 - Correct related elements in project aggregation #111

Open
aothms opened this issue Nov 16, 2023 · 0 comments
Open

PJS002 - Correct related elements in project aggregation #111

aothms opened this issue Nov 16, 2023 · 0 comments
Labels
rule tracker for development of a new rule/warning

Comments

@aothms
Copy link
Collaborator

aothms commented Nov 16, 2023

NOTE The actual object occurrences used within the context of a project, such as walls, beams, air outlets, are assigned to a spatial hierarchy that is linked to the project using the aggregation hierarchy. See concept Spatial Decomposition for linking a spatial structure to the project.

https://ifc43-docs.standards.buildingsmart.org/IFC/RELEASE/IFC4x3/HTML/concepts/Project_Context/Project_Declaration/content.html

(source: IfcOpenShell/IfcOpenShell@2557580#commitcomment-132712129)

@aothms aothms added the rule tracker for development of a new rule/warning label Nov 16, 2023
aothms referenced this issue in IfcOpenShell/IfcOpenShell Nov 16, 2023
In case if some element (not another aggregate) was aggregated by IfcProject directly, importing IFC was resulting in error below since the project's collection was never added to `self.collections`.

Traceback:
```
  File "\scripts\addons\blenderbim\bim\module\project\operator.py", line 732, in execute
    ifc_importer.execute()
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 292, in execute
    self.place_objects_in_collections()
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1668, in place_objects_in_collections
    self.place_object_in_collection(self.file.by_id(ifc_definition_id), obj)
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1672, in place_object_in_collection
    self.place_object_in_decomposition_collection(element, obj)
  File "\scripts\addons\blenderbim\bim\import_ifc.py", line 1689, in place_object_in_decomposition_collection
    return self.collections[aggregate.GlobalId].objects.link(obj)
KeyError: '2bKVb8E7L6e89EQYJUk8BM'
```
@evandroAlfieri evandroAlfieri changed the title Correct related elements in project aggregation PJS002 - Correct related elements in project aggregation Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule tracker for development of a new rule/warning
Projects
None yet
Development

No branches or pull requests

1 participant