Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
1

OpenStudio: Create window with nothing but offset from floor and offset from ceiling?

asked 2016-01-20 04:13:41 -0500

My windows are basically from 1' off the floor until 3' from the ceiling and span the surface width of the surface.

The existing method is setWindowToWallRatio (double wwr, double desiredHeightOffset, bool heightOffsetFromFloor): it doesn't accept TWO offsets, and you must specify a window to wall ratio, and this window to wall ratio MUST not be too large to fit on the surface after the offset is done (and offset from floor of 1 meter and a wwr of 0.99 will not work).

So, using a (bad) while loop decrementing the wwr until the setWindowToWallRatio returns an initialized window, I can quickly put a window on my wall that will take the largest admissible wwr given an offset from the floor OR from the ceiling, but not BOTH.

Is there a method similar to surface.setWindowToWallRatio(double desiredHeightOffsetFromFloor, double desiredHeightOffsetFromCeiling) somewhere?

edit retag flag offensive close merge delete

Comments

Apparently not. And it doesn't look like you can synthesize that behavior from other methods either. I would create a feature request on the uservoice site.

__AmirRoth__ gravatar image __AmirRoth__  ( 2016-01-20 06:37:41 -0500 )edit
1

Couldn't you do this with math and surface vertices? Like, get the min/max z-values of the surface vertices, increase/decrease them by your offset distance, and create a new subsurface with the new set of vertices. You'd have to figure out how to do a slight offset of the vertical edges (so you don't break up the base surface), but I think that's done in the WWR user script, so there's probably code there that could help.

Eric Ringold gravatar image Eric Ringold  ( 2016-01-20 09:20:22 -0500 )edit

I'm sure you can do that. I've done similar stuff to resize existing windows around the centroid, it's a fun exercise that makes you refresh trigonometry and 3D geometry, but that requires time I don't have for now =)

Julien Marrec gravatar image Julien Marrec  ( 2016-01-20 10:13:10 -0500 )edit

I agree it's fun to dust off those old math skills. But yeah, Dan's is the more elegant (and faster) solution.

Eric Ringold gravatar image Eric Ringold  ( 2016-01-20 10:19:10 -0500 )edit

And how would you know wall height and rectangularity (rectangularness? rectanguaritude?) without looking at the vertices? I was trying to stay away from that kind of stuff. Given that most of the code already exists in the SDK, the full monty should probably go in there too.

__AmirRoth__ gravatar image __AmirRoth__  ( 2016-01-20 12:03:35 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
4

answered 2016-01-20 09:23:00 -0500

updated 2016-01-20 09:36:46 -0500

Assuming you know the wall height you can do something like this:

ft_to_m = 0.3048
wall_height = 10*ft_to_m # or whatever it is
window_height = (wall_height-1-3)*ft_to_m # subtract floor and ceiling offsets
wall_area = wall.grossArea
wall_width = wall_area/wall_height 
window_area = wall_width*window_height
wwr = window_area/wall_area

Then you can pass that window to wall ratio into the setWWR methods.

edit flag offensive delete link more

Comments

If you don't know the height there is some code in the C++ that tries to find it but you also need to check that your walls are rectangular.

macumber gravatar image macumber  ( 2016-01-20 09:24:35 -0500 )edit

That's not a bad idea at all.

Julien Marrec gravatar image Julien Marrec  ( 2016-01-20 10:10:14 -0500 )edit

And why not use OpenStudio::convert(10,"ft","m").get. I dug that up not so long ago, can't remember where. I used to bother to create OpenStudio::Quantity objects and do the conversion... no more!

Julien Marrec gravatar image Julien Marrec  ( 2016-01-20 10:11:33 -0500 )edit

FYI the documentation on OpenStudio.convert is here. Super helpful, but kind of buried.

Eric Ringold gravatar image Eric Ringold  ( 2016-01-20 12:04:27 -0500 )edit
2

answered 2016-01-20 11:38:53 -0500

updated 2016-01-20 11:50:00 -0500

You may want to look at discrete window user script for SketchUp Plugin that Mohammad Heidarinejad made, it has window width and height, and number of window as arguments, along with offset. It looked very cool but I haven't had a chance to test it out. Looks like while there is wwr argument it currently uses the number of windows vs. the wwr.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2016-01-20 04:13:41 -0500

Seen: 205 times

Last updated: Jan 20 '16