Skip to content
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

aToC converts simple arcs to wrong curves #63

Open
fehergeri13 opened this issue Mar 23, 2022 · 1 comment
Open

aToC converts simple arcs to wrong curves #63

fehergeri13 opened this issue Mar 23, 2022 · 1 comment

Comments

@fehergeri13
Copy link

fehergeri13 commented Mar 23, 2022

Converting simple arc to curve gives wrong result

Expected behavior

image

Actual behavior

image

Steps to reproduce the behavior

new SVGPathData(`M 30 30 A 30 30 90 0 0 30 80 Z`).aToC().encode()

will result

M30 30C32.97809201470187 26.434099119281324 24.268705902355805 32.56845225465831 19.76322404376026 41.557791516124894C15.257742185164716 50.54713077759148 15.555408816481538 61.195843818144155 20.55602606358461 69.91945627422297z

https://replit.com/@fehergeri13/BackFocusedDaemons#index.ts

Which seems wrong. You can paste the path data here: https://yqnn.github.io/svg-path-editor/

In comparison the svgpath library works: https://replit.com/@fehergeri13/WetStunningPlanes#index.ts

@nfroidure
Copy link
Owner

Maybe we should consider using this https://github.com/Pomax/bezierjs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants