-
-
Notifications
You must be signed in to change notification settings - Fork 575
Refactor the 'Sample Points' node to use Kurbo API. #2629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
let lengths = segments_length | ||
.map(|segments_length| segments_length.to_vec()) | ||
.unwrap_or(bezpath.segments().map(|segment| segment.perimeter(PERIMETER_ACCURACY)).collect()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why allocate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the global_euclidean_to_local_euclidean
function needed &[f64] and also to calculate total_length. I tried without coverting the segments length to Vec but could not figure out a way to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To calculate the lengths of the segment when pre-computed it not provided then I will have to create Vec of f64s to store the lengths right?
…better approximate euclidean position on a path
Closes #