Surface creation problem

Hi

I have a path like a road. This path have several direction and width changes. To represent this, I took the line that describes the axis of the path and offset its segments according to a list of numbers.
Then I created a bisector line at the points where the path changes its width to create a frame so I could make a surface with the shape and size of that segment of the road.
BUT as you can see in the picture, it does not work for every segment. I don´t know why and its driving me crazy. In the image I am highlighting one of the missing surface segments with the very lines that should generate it.

Thanks for your help.

Surface creation.gh (78.7 KB)

One challenge in your definition is the fact that some of the segments are polylines. It would be easier if all segments were lines and you had one offset value per line.

Not sure what the requirements are but there are easier ways to create one road surface.

My first suggestion is the pipe section method. Creat a pipe with round end on every input curve, solid boolean everything and create a section with the XY plane.

The second approach is using offsets but in contrast to your definition it does not creat individual surfaces. I connected all curves from one side and all from the other side. You get some control on the corners by trimming the curves before doing the offset and later on blending / connecting the curves.

I added a few components so you can fillet the polylines with kinks before doing the offset.

surface_from_segments.gh (56.9 KB)

Maybe you want to stick to your original approach which I managed to get to work too.

What doesn’t make sense in my head yet is why you have three curve inputs …

Surface creation.gh (48.2 KB)

If you want the exact same result as in your original definition, you can do this a little easier with just one curve input. It uses perp frames and creates average planes on the curve ends. Curve / Plane intersections are used to shatter the offset curves …

surface_creation_average_perp_frames.gh (32.1 KB)

Thanks you Martin!

The “road” thing was a way to express the idea the simplest way possible. There is a path, yes, but is not for cars. It is the safe zone at both sides of a high voltage power line. The width varies in a very arbitrary basis. No “roundness” is needed.
The last one is useful to me.
I´m trying to understand the logic behind the components.

Thanks again :wink:

1 Like