Skip to content

Avoid converting exact input to inexact when detecting intersections#2019

Merged
alecjacobson merged 6 commits intomainfrom
alecjacobson-patch-1
Mar 30, 2022
Merged

Avoid converting exact input to inexact when detecting intersections#2019
alecjacobson merged 6 commits intomainfrom
alecjacobson-patch-1

Conversation

@alecjacobson
Copy link
Copy Markdown
Contributor

The previous remesh_self_intersections.cpp and intersect_other.cpp had a branch

if detect_only
  use Epick to find intersections
else
  use Epeck to find and resolve intersections

This only depended on the boolean flag detect_only. Unfortunately, that meant if the caller's input vertices were in the exact type CGAL::Epeck::FT and detect_only=true, then the input would be converted (i.e., rounded) to CGAL::Epick::FT (aka double) before looking for intersections. This leads to false positives.

This PR replaces the branch with if detect_only and not Epeck input.

Hopefully this merges easily so I can get it in before finishing #1539 1895

@alecjacobson alecjacobson requested a review from qnzhou March 30, 2022 16:48
@alecjacobson
Copy link
Copy Markdown
Contributor Author

Added unit test.

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

Successfully merging this pull request may close these issues.

1 participant