Skip to content

Another update for cut atom#1723

Open
tristan-huber wants to merge 4 commits into
mainfrom
morecutfix
Open

Another update for cut atom#1723
tristan-huber wants to merge 4 commits into
mainfrom
morecutfix

Conversation

@tristan-huber
Copy link
Copy Markdown
Collaborator

@tristan-huber tristan-huber commented May 27, 2026

Updates logic around cut operations in abundance.

Specifically it turns out that Volume computation for 3d solids is fast. Fast enough that we can use it to double check the class of interaction which a cut operation falls into. The cases being:

  1. cut between two shapes that don't touch -> volume of both inputs is unchanged
  2. cut which entirely removes the target shape -> volume of result is 0
  3. cut removes some but not all of the target -> volume of result is < initial but > 0

Only the third case requires a new entry in the cache.

Prior to this PR case 1 was fairly common and would lead us to re-instantiate identical objects. This was particularly pervasive in assemblies. In an initial effort to fix this I conflated cases 1 and 2 which would sometimes allow shapes to persist after when they should have been cut away to nothing.

@tristan-huber
Copy link
Copy Markdown
Collaborator Author

tristan-huber commented May 27, 2026

TODO:

  • update fuse and intersect to use the booleanOperation helper. Intersect can sometimes produce no-ops and sometimes produce empty shapes. Fuse can sometimes produce no-ops.
  • add instrumentation to booleanOperation helper so that it also logs into our metrics like createIfAbsent does

Use "measureVolume" to determine if a cut operation resulted in a no-op
or in an empty result.
Introduces a sentinel empty geometry key
adds explicit no-ops for whenever the empty geom shows up
mocks empty geometries as replicad compound-of-nothing objects for code
atom
add explicit check to the mesher for empty objects
@tristan-huber tristan-huber changed the title Explicit empty geometry handling Another update for cut atom May 29, 2026
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