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

Look at replacing robust-orientation with robust-predicates #16

Closed
rowanwins opened this issue May 13, 2020 · 2 comments · Fixed by #17
Closed

Look at replacing robust-orientation with robust-predicates #16

rowanwins opened this issue May 13, 2020 · 2 comments · Fixed by #17

Comments

@rowanwins
Copy link
Contributor

We've had a few issues upstream in Turf because of robust-predicates causing an issue.

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'unsafe-inline'

See related issue in robust-orientation

Potentially robust-predicates could be used to replace it, however in swapping one for the other there were changes

Screen_2020_05_14

ZoomedIn

So It's not quite a drop in replacement yet but I thought I'd flag it here and I'll also open an issue in robust-predicates

@mourner
Copy link
Member

mourner commented May 14, 2020

Likely an issue with how you use robust-predicates (see my comment there).

Replacing the dependency is a great idea, I completely forgot concaveman used robust-orientation! One thing to note here is that monotone-convex-hull-2d also depends on robust-orientation, so we would need to replace the convex hull dependency as well.

@mourner
Copy link
Member

mourner commented May 14, 2020

The convex hull code seems small enough to just inline here: https://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain#JavaScript

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

Successfully merging a pull request may close this issue.

2 participants