I’ve been working on creating a script that shows me all unique rooms on a certain level and create a polyline from those roomboundaries. Though I’ve come to hit a brick wall where I try to create an offset from those roomboundaries, but due to some of those rooms having a rather unique shape the offset node won’t work because it probably exceeds a curve point resulting in dynamo not being able to create this new polyline from the offset node. I hope this all makes sense so far.
1: Unfortunately I cannot fix the rooms because it is from a 3rd party linked model, so every time we receive a new update from them I’ll be facing the same issue.
2: I don’t have any experience in python so I’m afraid I won’t be able to program the code to make it functional, though I do appreciate the thought. (Perhaps a good starting point to enter some python course so I can write python myself in the near future)
Thanks again for the suggestions but sadly they won’t be able to resolve my problem on the short-term.
Open a detached copy of the model in 2023 or 2024, do the offset, encode the resulting curves to a SolidDef format, save that to a text document. Then in your attached real model read in the text document, deserialize the solid def, and progress from there.
I’ll see, how i can help you.
But be ready for another bunch of problems. In real life projects contours of rooms may be broken, so you can’t bulid closed polycurves from lines.
1- You can offset the boundary lines of the rooms as x1000 and then offset them again as -x1000 and combine them. In this way you can get a smooth and closed polycurve.
2- You can solve this directly with the “Shapely” package,
@Vladimir, node didn’t seem to work on my polycurve. Though it was no problem when just using curves.
@Durmus_Cesur, offsetting it by 1000 didn’t work either, not sure what the problem of that was though. Would probably have to do some further investigating. Still haven’t given shapely a try though.
I currently have done the following. I’ve just offsetted the curves for now without merging it into a polyline. Now I hope with the intersecting lines that I can create new points and make new lines between those points. Also ignoring lines that are shorter than 500mm.
@LiamvM can you save the lines of this room with Data.Remember node and share DYN file? It seems that we have non-closed or self intersecting polycurve. Also test polycurve with Curve.IsClosed node.
@Vladimir Ah, thanks for suggesting. It does indeed seem that the polycurve isn’t even closed at some of the indexes since it returned the false boolean.