Roads of different width from midlines

Hi everybody!

I’m looking for bright ideas on how to create a nice looking road system from midlines (here I’ve taken mine from OpenStreetMap). Based on the OSM road type I’ve separated the midlines into different road widths, and offsetted them.

The issue I’m facing is making the connections look good. Clipper has a good offset tool, but it can’t handle different widths (as far as I know), and I just can’t make it look good. I would like to fillet sharp corners, and right know I also have parts of the road sticking out when different road widths meet (see image).

Skärmbild 2022-03-28 105339

So, any bright ideas on how to polish the roads?

Thank you, and kind regards
Kaj

Road-from-midlines.gh (35.6 KB)

Maybe something like this?


Road-from-midlines-b.gh (39.1 KB)

Here’s how I would do it:

roads.gh (40.8 KB)

1 Like

:slight_smile: beat me :slight_smile:

It had to happen sooner or later… :laughing:

1 Like

Except that my solution has nicer corners…

1 Like

Wow, that is some fast answering, thank you guys! And yes, Martins corners are a bit smoother so he edges the win. Some of the corners are a bit wonky though, how would you handle these?

/Kaj

PS. I edited the width and the caps if you’re wondering why it looks different.

Skärmbild 2022-03-28 141825

Skärmbild 2022-03-28 141627

Changing the caps doesn’t caus any issues. Round is nicer.

Maybe the End Offset needs to be tweaked. Post the file you adjusted.

1 Like

Sorry, I was unclear. I mean like this:

I thought adding points along the curves should help but I’m having a hard time getting the transition from one width less smooth.

Maybe @DanielPiker can help?

roads.gh (49.3 KB)