Offset Issue with polylines in GH

Hey gang,

Looking for some help with offsetting lines belonging to the same boundary, individually, before joining them again.

I have 6 rectangles here, essentially functioning as building plots. And im looking to introduce an offset parameter for the inner lines, and another offset parameter for the outer lines. The end goal is to then join the lines belonging to its respective groups to form a new outline

Hope that makes sense. Appreciate any help or advice.




Offset Boundary.gh (17.9 KB)

this is what I see whenn I open your file:

isn’t that good?

hey @inno :slight_smile: yes it works on simple rectangles but fails to compute when the geometry is less stringent, which is very possible for land plots in reality. Apologies, ive attached a script with curves closer to what im looking at atm. Im assuming thats because the setup of my script logic isnt the best…

Offset Boundary_02.gh (18.8 KB)

I’m pretty sure Rhino 8 has better offsets compared to Rhino 7… So you might want to upgrade

In your file just above this post three of the curves aren’t closed.

I added the missing segments and internalised the closed curves.

Upon reading your first post again, I see my result is not quite what you’re looking for just yet.

Offset Boundary_02_mrtn.gh (16.6 KB)

2 Likes

Hello
I think it is pretty simple with using clipper (if not use pipe to offset)
Edit : I didn’t see Martin version finished before posting. I think you can mix differents indeas.


You need closed curves as input, also curves must have the control points at same place.
I use cull duplicate to find middle of curves and then the duplicate curves (meaning there are inside) . But if middles are not the same it will not work ! But there are others way to find if a point is inside.
Beware of tolerance you work with big scale.

When inside curves are found offset them using clipper and if not pipe them with round ending. Then boolean difference
Human is just used for the rendering.
Offset Boundary_02 LD.gh (14.3 KB)

3 Likes