I made this graph that works, but I want to make it better. This graph creates walls on room boundary. It is very useful when separating wall types by core and wall finishes. For example, I can model gypsum partition walls, and then use the script to create ceramic tile finish in the bathrooms.
I’ve been busting my head all day about how can I make the script “ignore” room separation lines. I tried different approaches but I failed to make anything work. Any ideas?
Can’t really read your graph image, but there is a Room.Boundaries node (OOTB, clockwork, or Archilab, I forget which) that pulls the curves and the bounding element types. This can allow you to filter boundaries by intersection with the solid formed by merging the wall solids into a single geometry - if the centerline of the boundary doesn’t intersect with the solid it is a room separation line.
You could also try building an additional polycurve of the room boundary at the centerline of the walls, and testing midpoints for intersections with that (which might be better as it would account for ‘door at the center point’ conditions.
This is complicated. I must look for clashes with concrete columns as well. I tried. Clash detection worked with walls, but not with columns. Maybe I should get the location of all room separation lines and go from there?
You could probably quite easily detect if a room boundary line is a room division line by checking whether the distance of that line regarding all walls, columns, etc. in the model is greater than 0.005 (or something). Using Geometry.DistanceTo and List.MinimumItem. Takes a bit of computation power but its robust and will work.
Also, perhaps you could cut down the necessary calculations by filtering the geometry by level first.
So similar to the way Jacob described, but I wouldnt combine the walls first.
Removing the curve at the location of room separation line would leave an empty space between two other lines. Thus, PolyCurve.ByJoinedCurves would not work (unless I’m wrong). Is it possible to make a new sublist like in the image below?
Thanks. From what I understand, you successfully removed the line that corresponds to ModelCurve, but the rest of the lines are not in sublists. ModelCurve should break a list into two lists. One list contains items that had lower index than ModelCurve, while other list have items that had higher index than ModelCurve. If a list has two model curves, things get complicated…
You can flatten the end list entirely and just build walls at those points.
However, it does not account for walls which are not room bounding, but that isn’t something which is dictated by the room and therefore not in the scope of “interior finishes by rooms”.
However, it will not work when having two separation lines on opposite sides of a single room. This situation would be a rare case, but if we can solve it, maybe we could also exclude curtain walls from the boundary list.
In my example the room in the lower left corner is bound by a separation line on the top, and bottom, so it is working for me… Think you’ll have to illustrate the failure so we can see where the issue is.