alexbol99 / flatten-js

Javascript library for 2d geometry
MIT License
546 stars 56 forks source link

add pointAtLength methods for Arc, Segment, Edge and Face #95

Closed schelmo closed 2 years ago

alexbol99 commented 2 years ago

Merged and published @flatten-js/core@1.2.25 Note, I renamed method face.length() to face.perimeter() Thank you for collaboration! Alex

alexbol99 commented 2 years ago

Hi, @schelmo ,

You method face.pointAtLength did not work as expected. In fact, it encounted edges in the direction opposite to face orientation. I changed it to more simple logic. I also used precalculated edge.arc_length property, which is the incremental length of the path from the face start. New method released in the version v1.2.26 See visualization of the method in this notebook: https://observablehq.com/@alexbol99/run-point-along-polygon-boundary

Best regards, Alex

schelmo commented 2 years ago

thank your very much for the fixes!