Force fast-csg numbers to be exact to improve pathological cases.#4099
Merged
t-paul merged 2 commits intoopenscad:masterfrom Feb 7, 2022
Merged
Force fast-csg numbers to be exact to improve pathological cases.#4099t-paul merged 2 commits intoopenscad:masterfrom
t-paul merged 2 commits intoopenscad:masterfrom
Conversation
…pathological cases. e.g. examples/Old/example024.scad Lazy numbers retain their entire arithmetic tree, which can grow bigger and bigger and can cause "surprising" performance degradation. - The feature fast-csg-exact forces numbers to exact after each operation, which slows every operation down a bit but does a good job on some bad cases. - The feature fast-csg-exact-callbacks doesn't wait for corefinement operations to finish to make its resulting new numbers exact: it registers a callback within corefinement operations that gets called for each new face being created. This slows down more models, but may further fix other bad cases. This will need more test in real life to decide what to retain.
t-paul
approved these changes
Feb 7, 2022
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bring in features that force lazy numbers to be exact to improve files like
e.g. examples/Old/example024.scad (see here)
Lazy numbers retain their entire arithmetic tree, which can grow bigger and bigger and can cause "surprising" performance degradation.
fast-csg-exactforces numbers to exact after each operation, which slows every operation down a bit but does a good job on some bad cases.fast-csg-exact-callbacksdoesn't wait for corefinement operations to finish to make its resulting new numbers exact: it registers a callback within corefinement operations that gets called for each new face being created. This slows down more models, but may further fix other bad cases.See more details in @sloriot's comment where he suggested this workaround
This will need more test in real life to decide what to retain.
Currently running my benchmarks with all the feature combos, will post the results shortly.