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

bug with Plane_3.to_2d()? #2733

Closed
hugoledoux opened this issue Jan 12, 2018 · 1 comment
Closed

bug with Plane_3.to_2d()? #2733

hugoledoux opened this issue Jan 12, 2018 · 1 comment

Comments

@hugoledoux
Copy link

hugoledoux commented Jan 12, 2018

Issue Details

I first define 5 points in 3D (forming an horizontal plane), then fit a plane through them with the least-square function, and then project each of the original points to the plane with the function Plane_3.to_2d(). The projection returns wrong values, such as:

Projection of points to the plane:
1.38039e+27 -379197
1.38039e+27 -379207
...

Maybe because the coefficients of the plane are not exactly 0, but -4.3906e-26 for instance?

If I translate the plane by z=-200 then it is okay...

Without Eigen this problem doesn't exists, with it always. Tested on macOS and Ubuntu with CGAL 4.11 and Eigen 3.3.4

Source Code

https://gist.github.com/hugoledoux/f763636492dc72fb9f3fb77932b84c56

Environment

macOS 10.13.2

with CGAL v4.11 installed with brew
$ brew info cgal
cgal: stable 4.11 (bottled)
Computational Geometry Algorithm Library

$ brew info eigen
eigen: stable 3.3.4 (bottled), HEAD

hugoledoux added a commit to tudelft3d/val3dity that referenced this issue Jan 13, 2018
hugoledoux added a commit to tudelft3d/val3dity that referenced this issue Jan 13, 2018
@lrineau lrineau added this to the 4.11.1 milestone Jan 19, 2018
@lrineau
Copy link
Member

lrineau commented Jan 19, 2018

Fixed by #2735. Will be in CGAL-4.11.1, and CGAL-4.12.

@lrineau lrineau closed this as completed Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants