You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Starting with Hypar.Elements 2.0.0, polylines are parametrized 0 -> # vertices - 1, which changed the behavior of methods such as PointAt. In order to facilitate simple library updates, the convenience method PointAtNormalized using the old parametrization 0 -> 1 was introduced. However, even though this method deceptively appears to be linear, it is not. Should this behavior change or be clarified better?
To Reproduce
An sample polyline with three vertices is initialized below:
Expected behavior point0 is located at x=2.5 and point1 at x=5.0.
What happens point0 is located at x=4.0 and point1 at x=8.0.
Bonus
Is there an elegant way of changing from old to new parametrization? The procedure seems to involve finding the length of each individual line + the total polyline length, and calculating the parametrization variable for each vertex.
The text was updated successfully, but these errors were encountered:
Describe the bug
Starting with Hypar.Elements 2.0.0, polylines are parametrized
0 -> # vertices - 1
, which changed the behavior of methods such asPointAt
. In order to facilitate simple library updates, the convenience methodPointAtNormalized
using the old parametrization0 -> 1
was introduced. However, even though this method deceptively appears to be linear, it is not. Should this behavior change or be clarified better?To Reproduce
An sample polyline with three vertices is initialized below:
Expected behavior
point0
is located atx=2.5
andpoint1
atx=5.0
.What happens
point0
is located atx=4.0
andpoint1
atx=8.0
.Bonus
Is there an elegant way of changing from old to new parametrization? The procedure seems to involve finding the length of each individual line + the total polyline length, and calculating the parametrization variable for each vertex.
The text was updated successfully, but these errors were encountered: