-
Notifications
You must be signed in to change notification settings - Fork 520
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
V3 geom2 no sides #1182
V3 geom2 no sides #1182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice effort. I am very much in favor of this.
Unrelated comment. Also for some next PR it will be I think ok to remove compactBinary. during my explorations of worker code, I think it will be just fine to do all the calculations in worker, and also IO for export, so there is no need to transfer models to main thread. TypedArrays that are used to provide webgl data for displaying is transferable and already optimal for postMessage.
@platypii This is so cool. This is like one of the most talked about change for V2 but we opted out in order to focus on fixing the broken API (V1 was a mess). And, I think this would never be possible without the improvements made over the last year to V2. The result of this PR will be huge, and allow the 2D API to become much more useful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@platypii great start but i have a few change requests, and a few questions as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@platypii getting close now. sorry for the nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@platypii super job. thanks again.
i think those little discussions were worth the extra time as well.
Definitely. Thanks for the detailed reviews! |
This PR changes geom2 from using
sides
to usingoutlines
. This will improve performance, reduce memory allocations, and simplify a bunch of operations.The main benefit is that for operations like booleans, extrusions, and expansion, the first step is to produce outlines from a geom2. To produce outlines from sides requires running a depth first search of the sides. With this PR, there is no need to run a graph traversal, because the data structure is already stored as outlines.
Credit to @briansturgill for the idea in #1120
To make these changes work, I needed to update the following:
Sorry for the large PR. This will help prepare for future improvements for things like the expansions which I want to look at next. Let’s make the V3 geom2 engine into a ferrari :-D
All Submissions: