Skip to content

Expose cutoff parameter for CGAL intersections; better default#2255

Merged
alecjacobson merged 2 commits intomainfrom
alecjacobson/cutoff
Aug 29, 2023
Merged

Expose cutoff parameter for CGAL intersections; better default#2255
alecjacobson merged 2 commits intomainfrom
alecjacobson/cutoff

Conversation

@alecjacobson
Copy link
Copy Markdown
Contributor

Fixes #270

CGAL weirdly uses a pretty bad default for the somewhat mysterious cutoff parameter in box_intersections_d and box_self_intersections_d

I tired 1,10,100,1000,10000,100000 and √n for all the tutorial data models (not a particularly good test set) and 1000 was the clear winner.

So, this now uses that as the default and exposes the parameter for users to tweak if needed.

The speedups are modest (like 1.1-1.2x).

@alecjacobson alecjacobson merged commit 7a84503 into main Aug 29, 2023
@alecjacobson alecjacobson deleted the alecjacobson/cutoff branch August 29, 2023 02:12
@kbongort
Copy link
Copy Markdown

the somewhat mysterious cutoff parameter

If you're curious, you can read about what this parameter is in Fast Software for Box Intersections. Basically it determines how early the algorithm switches from tree recursion to scanning. The authors do a bunch of experimentation with the parameter themselves. It's odd that CGAL chose 10 as the default since the paper seems to point toward values in the 1k-10k range as best, generally.

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.

libigl's boolean take very large memory

2 participants