It’s a bit difficult for me (English is not native for me) to describe what I exactly trying to achieve, so I’ll just show script and a image. I want basically to determine a curve shown with red color… or something like that. I hope if you look at script the basic idea behind will get less vague. Thank you!
Is the red line going through the middle point of the cross lines? If so, you just need to get the middle points of those cross lines and draw the nurb with those points.
No. It’s this the points that closest to one another on the lines. I’ve made it manually like this:
Are you keeping the red line a specific distance away from the black line on the left?
No, not really. The point is to get a curve between side curves that approximates where the middle is. So if I extend the lines along the red curve to length of max value of original lines they will enclose both side curves… I hope it’s clear…
In this particular case the curve on the left is as perfect as it gets so the extended lines of from the red line would enclose mainly the right curve.
Perhaps an even sampling of points on each curve using Curve.PointAtParameter or Curve.PointAtSegmentLength, flatten the list and then use a Line.ByBestFitThroughPoints?
With Line.ByBestFitThroughPoints I’ll just get a line, but I need a curve… or am I understanding you not correctly?
So if I extend the lines along the red curve to length of max value of original lines they will enclose both side curves… I hope it’s clear…
What did you mean by this?
Maybe provide a sketch to explain more clearly what you’re trying to achieve?
If your problem only ever entails 2 ‘rail’ curves then loft them into a surface then get the iso line at 0.5 parameter. If your curves are more similar in appearance to say, a road, meaning t-junctions etc are likely, look at computing the medial axis - Youll find a post on the forum explaining it
Thank you Thomas! This is exactly what I needed.
I’ll look into medial axis computing because that’s indeed what I’m after. To get curves of a road that encloses the both sides of the road.