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

CSG.Polygon assumes no collinear edges #10

Open
ericu opened this issue Sep 29, 2012 · 4 comments
Open

CSG.Polygon assumes no collinear edges #10

ericu opened this issue Sep 29, 2012 · 4 comments

Comments

@ericu
Copy link

ericu commented Sep 29, 2012

If you try to create a CSG.Polygon, passing in a series of vertices where the first 3 are collinear, the calculation of the plane normal will be wrong. The documentation for the function only requires that the polygon be planar and convex, not that it contain no degeneracies; either the code or the docs should change.

@janhelleman
Copy link

The problem is at the polygon constructor. There it constructs a plane from the first three points. If these are colinear they should not be used untill none colinear are found.

@NateTG
Copy link

NateTG commented Feb 21, 2015

That looks like a relatively easy fix, but I'm not sure that this repository is still being maintained.

@razola
Copy link

razola commented Feb 23, 2015

@NateTG I think I've seen issues in my app related to this. Would really appreciate a fix if you have the time and energy.

@NateTG
Copy link

NateTG commented Feb 23, 2015

I'm still a js neophyte, but the changes at:

https://github.com/NateTG/csg.js

Should support polygons with some non-colinear edges.

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

4 participants