Skip to content

Commit

Permalink
Add wall IDs to openings instead of their frames
Browse files Browse the repository at this point in the history
  • Loading branch information
argenos committed Jan 20, 2025
1 parent c6d75c7 commit 0e6cc82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/floorplan_dsl/processors/semantics/fpm2.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,12 @@ def process_location(self):
raise TextXSemanticError("Wrong number of walls")

frames = list()
self.wall_ids = list()

for w in self.location.walls:
if textx_isinstance(w, mm["WallFrame"]):
frames.append(w.space.walls[w.wall_idx].frame)
self.wall_ids.append(w.space.walls[w.wall_idx].name)
else:
raise TextXSemanticError("Opening location is not a wall frame")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"3d-shape": "{{ element.shape_3d.name }}",
"thickness": {{ element.shape_3d.thickness.value }},
"voids": [
{% for container in element.location.walls %}
"{{ container.name }}"{%- if not loop.last %},
{% for container in element.wall_ids %}
"{{ container }}"{%- if not loop.last %},
{% endif %}
{% endfor +%}
]
Expand Down

0 comments on commit 0e6cc82

Please sign in to comment.