Working on a way to get room sizes written to a room tag without using bounding boxes, since they dont work in off axis rooms. My idea was to get room boundaries as curves, extend them all and them trim them into a rectangle and measure the longest line in each direction.
Stuck at the trimming part. Mabe there is some other way to measure greatest distances- I tried grouping parallel but I lose my list structure, can’t keep the rooms together. Im mediocre at Dynamo, kind of stumbling through this. Trimming lines would be easiest as I already worked out another similar method for non polygonal rooms.
Thanks!
I saw you emailed me about this one as well, but easier to share the solution to the forums.
The attached script will check all room edges and find the average angle of room by the count of the segments found. The only surer way than this is to also weight the relevance of the result by the lengths of the sides, but there isn’t a sure fire way of knowing a room’s rotation really beyond this, just forming an assumption based on its edges. From there it will rotate and measure the bounding size of the shape in a rotated state, then check if the proportions match the original bounding box in plan.
The way I’ve written it wont account for rooms with donuts in them, but this could be added fairly easily by taking the largest area curveloop from a room boundary first (various threads on the forums deal with this).
Hope that helps, sample model/script attached.
rooms.rvt (1.7 MB)
Room with rotation.dyn (62.3 KB)
It was actually a youtube comment I started with your video and then wanted to play with some different ideas. when I saw your nodes I suspected you may have built them for this.
Thanks for the solution! super helpful workflow.
1 Like