Skip to content

Commit

Permalink
Fixed #3829 occured after ae45e6b
Browse files Browse the repository at this point in the history
similar_openings wasn't reset on each iteration causing moving unrelated openings
  • Loading branch information
Andrej730 committed Oct 2, 2023
1 parent ad79c63 commit edaabf5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/blenderbim/blenderbim/bim/module/model/opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,17 +748,14 @@ def _execute(self, context):
building_objs = set()
model = tool.Ifc.get()
all_openings = model.by_type("IfcOpeningElement")
similar_openings = []

for obj in context.selected_objects:
element = tool.Ifc.get_entity(obj)
if not element:
continue
openings = [r.RelatedOpeningElement for r in element.HasOpenings]
for opening in openings:
for all_opening in all_openings:
if all_opening.ObjectPlacement == opening.ObjectPlacement:
similar_openings.append(all_opening)
similar_openings = [o for o in all_openings if o.ObjectPlacement == opening.ObjectPlacement]
opening_obj = tool.Ifc.get_object(opening)
if opening_obj:
if tool.Ifc.is_edited(opening_obj):
Expand Down

2 comments on commit edaabf5

@Andrej730
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxfb87 hello! found some issue with similar openings

@maxfb87
Copy link
Contributor

@maxfb87 maxfb87 commented on edaabf5 Oct 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Andrej730 ah yes, i didn't realize that... thanks for the call

Please sign in to comment.