The Curve Proximity component retrieves the closest points in between two curves, how in converse find the two farthest points?
And the second question here, assume I have a curve and want base on it to create a polyline so that the length of each segment has been calculated through max distance between the curve and the segment, that is I want to set max distance value as a parameter which establishes length for each segment.
To get a rough estimate you could divide both curves to N pieces and then using Cross Reference component compare each point pair together. You could calculate the distance of each pair of points and sort the list in order to find the maximum one.
If additional accuracy is required, I would probably keep dividing the curve around the first ”longest distance giving part of the curves” using C#.
I’m sure there are more elegant ways of doing this.
Hi Vitaly, there is a GetDistancesBetweenCurves method in RhinoCommon which might help. It gives the parameters on each curve where the distance is maximum. It is not the fasted though. If you use polyline segments, they must be passed to the method as type LineCurve.
For the second question i am not sure. It sounds you want a polyline approximation created from the curve. There is a method Curve.ToPolyline which has an overload maxChordLengthRatio.