Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8532

GetPointAtChordLength(double Length)?

$
0
0

@lionpeloux wrote:

Hello,

I want to achieve something quite similar to what the Curve.DivideByLength(double segmentLength) method do, that is “Divide the curve into specific length segments”. Here, all segments will be of length segmentLength.

But instead of giving only one segmentLength I want to input a list of segment length (double[] segmentLengths that acts as a division pattern. For instance, if the list is [1,2,4], the distance between first and second points will be 1, 2nd and 3rd will be 2, 3rd and 4th will be 4 … then back to 1 between 4th and 5th, …

So I wonder if there is a chance you can provide a GetPointAtChordLength(double Length) similar to the GetPointAtLength(double Length) in the rhinocommon C# API ? I suppose the Curve.DivideByLength(double segmentLength) method uses such a method internally ?

Second question, could you explain the principles of the algorithm behind Curve.DivideByLength(double segmentLength) ? Is this a kind of dichotomic search ?

Thanks,
Lionel

NB : I can already do what I want with curve/sphere intersection but this is really slow and I want to speed up my method.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 8532

Trending Articles