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

set_wwr removes doors #504

Open
szvsw opened this issue Aug 8, 2024 · 3 comments
Open

set_wwr removes doors #504

szvsw opened this issue Aug 8, 2024 · 3 comments
Labels
invalid This doesn't seem right

Comments

@szvsw
Copy link
Collaborator

szvsw commented Aug 8, 2024

When calling set_wwr, doors get inadvertently popped in this snippet here:

if wall_subsurfaces and not construction:
constructions = list(
{
wss.Construction_Name
for wss in wall_subsurfaces
if _is_window(wss)
}
)
if len(constructions) > 1:
raise ValueError(
'Not all subsurfaces on wall "{name}" have the same construction'.format(
name=wall.Name
)
)
construction = constructions[0]
if len(wall_subsurfaces) == 0 and not force:
# Don't create windows on walls that don't have any windows already.
continue
# remove all subsurfaces
for ss in wall_subsurfaces:
self.rename(ss.key.upper(), ss.Name, "%s window" % wall.Name)
self.removeidfobject(ss)

Now it's not necessarily an issue, since this style of setting the WWR sets large windows that span the length of the wall, so they would be conflicting with any existing doors; ultimately this method is not really meant to be used with a model that has doors I suppose.

Having said that, there should probably be a comment about this in docstring, and/or a warning raised when popping non-window subsurfaces.

@szvsw szvsw added the invalid This doesn't seem right label Aug 8, 2024
@szvsw
Copy link
Collaborator Author

szvsw commented Aug 8, 2024

Just wanted to get your thoughts on this @samuelduchesne

@samuelduchesne
Copy link
Owner

samuelduchesne commented Aug 8, 2024

I'm not sure I get where Doors are affected. in the self.removeidfobject call?

@szvsw
Copy link
Collaborator Author

szvsw commented Aug 8, 2024

exactly - they are one of the subsurfaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants