Decomposition#
Work out what simple blocks a part is made of. Given a solid, decomposition returns the maximal volumes it decomposes into: lumps of material with no inside corner anywhere on them, none of which is contained in another.
A part usually reads as material in more than one way — a slab with an upright on it is equally an upright with a slab around its foot — so the volumes overlap by design, and every reading is returned rather than one being chosen.
How it works
The method in pictures, start to finish, on a part small enough to hold in your head. What the algorithm does and why, before any question of how to call it.
How far a sheet reaches
The one question the method turns on, worked out on the part it is first shown on: what bounds the sheet a face is carried on as, and what the part reads like when nothing does.
Running it
Decomposing your own file, reading every field of the result, the four settings, and what to do when coverage comes back low.
Learning path#
Read How a part is broken into simple blocks first. The result is confusing without it — in particular the volumes overlapping, so their shares add to more than the whole part.
Then How far a sheet reaches, which is the one step of the method that has a choice in it, and the one that decides whether a part reads as a handful of blocks or as a pile of slabs.
Then Decomposing a part for the call itself and the settings.
Judge a run by
covered_fraction, not by how many volumes came back.
Key names#
Decomposer— the way in: a part, the settings, and a method for every questiondecompose()— the same run as one value, for a caller with nothing to askDecomposition— the volumes, and what the run could not dodecompose_into_cells()— the cutting stage on its ownCellDecomposition— the cells, and the cuts refusedDecompositionError— no result could be producedIndecomposableError— there was nothing to do