I am quite advanced in using Dynamo and working with geometries, but I am currently facing a problem that is too complex for me to solve on my own. I hope someone here can help me with it. I need to identify all the floor space in a room that meets the 1.8 x 1.8 meter requirement.
I have tried multiple methods, but none have been universally successful. I attempted to divide the room into smaller cubes based on the boundaries, but this approach misses small floor spaces that would be included if approached differently. I also tried creating lofts in both directions, but that resulted in too much floor space, which I would then need to subtract.
Below is an image of my test shape(and result), but please note that it could be any shape, including ones with structural columns. My test shape is not necessarily logical regarding column placement, but if the solution works with this shape, it should work in more realistic situations.
The following image shows the result I want to achieve with my practice shape.
I hope someone can assist me, as I have already spent over 40 hours trying to find a solution. Please keep in mind that the shape can vary. I am a new user on this platform, so I cannot share the code I have created so far, but I would gladly do so if I could.
What is the 1.8m x 1.8m requirement? Get specific about describing it as if we take it on it’s face of “can you fit a 1.8m square in this space” that requires rotation aspects so the areas around voids would have non-orthogonal shapes around them which fit the 1.8m square.
I’m sorry I wasn’t specific enough about the 1.8m x 1.8m requirement . I want to check if there is any area in the room that isn’t at least 1.8m in width. However, if the length is smaller than the width, the width would become the length and vice versa. This is why the space needs to be at least 1.8m x 1.8m. I hoped my second picture gave a better idea of what I want to achieve.
Let’s say you have a room like this (sorry for my drawing skills).
First, you divide the room into cubes that are as large as possible. Then, you check each cube to see if both dimensions are larger than 1.8 meters. If both dimensions meet the requirement, you can sum their volumes.
In cases where one dimension does not meet the requirements, you need to exclude only the part of that cube that fails to meet the criteria. If the cubes overlap, the one that meets the requirements will take precedence over the one that does not.
Additionally, if there is a column in the room, the space between the wall and the column must also be at least 1.8 meters; otherwise, you need to exclude the space between the wall and the column as well.
In the case of a room with five walls, like the picture below, you first identify the minimum requirement to ensure that everything to the right of the first left red line (1.8 meters) meets the requirements. However, if you follow the process I described earlier, you might overlook the small green triangle.
I haven’t thought of a room like this before, so I don’t have a solid programming rule for it. When I do it by hand, it’s easy to see what is included and what isn’t.
This is always the hard part. If as a designer you can’t work out all of the rules for when to do A vs B then you aren’t going to be able to teach a computer how to work things out either, and as I never came across this when I was practicing it’s hard to see the logic.
One thought I do have is that if you take the perimeter curves by 1.8 units into the room might narrow things down, as any space remaining certainly fits, any any part of the surface formed by lofting the original and paste curve which doesn’t contain another shape is also valid. Not an easy starter graph though.
You could try slicing up the floor into a grid as well, but this requires the logic be completely worked out as noted before.
So if you had an “L” shaped room with a column (drawn in black)
And the space between the column and the wall is 1.7m.
Do you want to remove the whole of the area inside the green square, or do you want to keep the bit that’ll allow a 1.8 * 1.8 m square (red) rotated to penetrate the space if rotated?
You’re right, the entire area of the green square needs to be removed. The measurement should be taken perpendicular to the wall or room boundary to accurately exclude the parts that don’t meet the 1.8-meter requirement.
A L shape is fairly simple I can use the split node for it and then check the individual squares on its 1,8m perimeter lines. but yea I haven’t taken the column into account yet
The logic is based on the Dutch building code, which states that any floor area smaller than 1.8 meters cannot be considered usable for long-term stays by people. Therefore, in architectural plans, you need to clearly distinguish between the total floor space and the officially usable floor space (areas that meet the 1.8-meter requirement) for long-term occupancy throughout the day. This would apply to spaces like offices, bedrooms, living rooms, etc.
I also tried your idea already, but if you check it like that, you will include parts that you don’t want. However, the lofting works great. I am currently using it to slice up the room because the normal split node is not working—it deletes parts when you group your cutting elements. If I don’t group them, I don’t get the correct shapes.
If I understand your approach correctly, you want to group all the lines below 1.8m. However, if you do that, you will get the blue square and exclude too much area. In addition to your approach, I thought about grouping them by length (red squares), but if you do that, you will miss the yellow area.
Regarding your idea of dividing the boundary lines into 100mm segments, isn’t that a bit excessive, especially if you are working with a whole floor of rooms?
Instead, if you extend all the boundary lines with the maximum length from one of the boundary lines, you’ll have all the lines needed to measure the areas. You would only need to trim them back to the correct length. You can use the Geometry.Intersect node, applying it to the lines and the room mass to get only the intersecting parts of the lines.
Thank you for pointing that out. I have the same question. I haven’t tried that method of getting the correct floor area yet. Maybe later today I can put it into practice.