I’m trying to offset building footprints derived from GIS shapefile data. The intent is to shrink them to approximate a subtraction of wall thickness, as well as correct for overlapping shapes to ensure downstream boolean operations work. I’m working with Rhino 5 for Mac.
Offset works when done in Rhino, but fails for some shapes when done in GH. Thanks to help on this forum, I have overcome that using Clipper’s PolyOffset.
However with curves that have curves inside them - i.e. building courtyards - PolyOffset, unlike normal Offset, does not autodetect this and requires you to choose the direction of the offset per curve.
Again, with help from this forum, esp @seghierkhaled, I have deconstructed the curves and automated by filtering for the smaller shapes.
This works well, except in cases where the courtyard is too close to the external wall, in which case an extra shape is created which intersects. To solve this I am using an If condition and Sift, but I’m having some trouble with list organization.
So my questions are:
Am I correct in using python instead of an If expression because expressions can’t deal with nulls?
What am I doing wrong with Sift that the Outer offset works but the Inner doesn’t? The “object instance” error seems to be because the Distance input is getting too many values, but flattening doesn’t work. Also I would expect the error to appear for both offsets…
Some shapes that have narrow parts get split into two shapes when offset. This is okay but how do I keep them grouped so that the data integrity is maintained for later (i.e. labeling with address from GIS data)?
In general, is there a smarter way to achieve the desired outcome?
Optional bonus question - why does Rhino offset work in Rhino but not in GH for some curves? You can test yourself by baking one of the shapes in the middle row.
Thanks in advance, I hope this isn’t too many questions at once.
Rhino Offset workaround:
offset debug.gh (37.6 KB)