Hello everyone, I found A script Done by O°RI that generates masses from rooms and color them by a colorscheme from the project.
I have a problem when generating the Masses, the appear way bigger than the rooms
does anyone know how can I solve this ? thank you !
Likely the import scaling issue. Best solution is to scale down the solid by the number of meters in a foot prior to running the import.
Hi,
I attempted something similar, but the generated mass is using the wall face as the mass extent, which creates a gap between two masses, even though I’m using Room computation at the wall centerline.
Question 1: Is there a way to adjust it so that it uses the actual room extent instead of the bounding object extent?"
Option 2: I opted for an alternative approach that involved extracting the room boundary into polylines, creating a surface using Surface.byPath, and then extruding it to a solid with a specified height parameter. However, this method fails when the room is in a loop. For some reason, Dynamo is creating two masses: one for the external boundary and another for the internal boundary of the room.
Question 2: How can get the mass for a looped room boundary.
@GavinCrump @jacob.small
Id suggest patching them, then using surface.difference for the largest area surface vs the rest (if any), then extruding that surface.
Hi @GavinCrump, I have already patched the surfaces. However, since the boundaries are autogenerated using Room.Boundaries, it is unable to differentiate and segregate that particular surface from the master list. I am looking for an input for Surface.Difference that will connect to the ‘others’ input, which can later be used to subtract the inner loop (-) from the outside surface indicated as (+).
At present I have only one input which consist of other surfaces including the surface that need to be removed.
Don’t use flatten. Polycurve the curves, then proceed to work with them in lists of polycurves.
Great! Thanks @GavinCrump , Now, I am not able to retrieve the inner boundary. Any custom code block or python code available to identify them and give me a input for others for Surface.Difference node.
Get their areas. The largest will be the outer loop, the rest will be the inners. Sort the surface lists by their areas, then list deconstruct each sublist and use the first against the rest output as a surface difference.
I’m having some trouble with the First & Rest list. When using the Sort node, the sorting order changes. Additionally, after using deconstruct and referring to List 2 Dictionary, the rest list is again grouped using index numbers.
Test File.dyn (32.4 KB)
Use sort by key, where the surfaces are the list and the areas are the keys.
1 Like
Depending on the size of your dataset, a List.MaximumItemByKey node might be more effective here. The key would be a function compose node, with a Surface.ByPatch and a Surface.Area input, and the list would be the polycurves.
From there you can patches each of the largest polycurves into surfaces, and use a Surface.TrimByEdgeLoops where the surfaces are the surface, and the polycurves are the edge loops.
Watch for list levels and lacing as you go with any method as you’ve got to operate on a nested list throughout the process. A custom node or design script definition can help there if you get stuck.
Okay. The surfaces highlighted in Red should be First Items and Surface highlighted in Yellow should be read as Rest items. Even after sorting them using key the order seems not correct.
Hi Jacob, I have tried your method. Its able to generate a mass for the looped corridor. However, it should also create the room mass for the internal space as well.
No need for the Surface.Difference in my method - your list level for the MaximumItemByKey node needs to be set to @L2.
You also need to remove the inputs from the Surface.ByPatch and the Surface.Area. These wire directly into the first and second inout of the Function.Compose node without processing any data.
1 Like