Problem
axiolid has no convex decomposition: no way to take an arbitrary
(possibly non-convex, possibly multi-component) TriMesh and produce a set
of convex pieces whose union is the original solid.
Why it matters
This is the missing prerequisite for #88 (general Minkowski sum and
difference). The Minkowski sum of two CONVEX polyhedra is the convex hull of
the pairwise vertex sums, which is tractable and exact. For non-convex
operands there is no such shortcut: the standard construction decomposes both
operands into convex pieces, takes the pairwise sums, and unions the results.
Without decomposition, #88 has only two honest options, and both are bad:
- restrict to convex operands, which silently narrows the published
capability to a case most real geometry does not satisfy, or
- attempt a general implementation whose cost is exponential in the
non-convexity of the inputs.
convex_hull already exists (crates/algorithms/construction/construct),
so the convex end of this is solved. The decomposition itself is not.
Scope
- Decompose a closed, two-manifold
TriMesh into convex parts.
- Report the decomposition rather than asserting it: part count, and whether
the result is an exact decomposition or an approximate one within a stated
bound. An approximate decomposition is legitimate and widely used, but it
must be labelled, not passed off as exact.
- Bounded refusal for inputs that are not closed or not two-manifold, rather
than producing parts whose union is not the input.
- Deterministic part ordering, matching the discipline
decimate established.
Done when
- an arbitrary closed two-manifold solid decomposes into convex parts
- the union of the parts reproduces the input within a stated tolerance,
verified by a volume-conservation test rather than by index comparison
- exact vs approximate decomposition is reported, never implied
- a non-manifold or open input is refused by name
- part ordering is deterministic across runs
Blocks
#88
Problem
axiolidhas no convex decomposition: no way to take an arbitrary(possibly non-convex, possibly multi-component)
TriMeshand produce a setof convex pieces whose union is the original solid.
Why it matters
This is the missing prerequisite for #88 (general Minkowski sum and
difference). The Minkowski sum of two CONVEX polyhedra is the convex hull of
the pairwise vertex sums, which is tractable and exact. For non-convex
operands there is no such shortcut: the standard construction decomposes both
operands into convex pieces, takes the pairwise sums, and unions the results.
Without decomposition, #88 has only two honest options, and both are bad:
capability to a case most real geometry does not satisfy, or
non-convexity of the inputs.
convex_hullalready exists (crates/algorithms/construction/construct),so the convex end of this is solved. The decomposition itself is not.
Scope
TriMeshinto convex parts.the result is an exact decomposition or an approximate one within a stated
bound. An approximate decomposition is legitimate and widely used, but it
must be labelled, not passed off as exact.
than producing parts whose union is not the input.
decimateestablished.Done when
verified by a volume-conservation test rather than by index comparison
Blocks
#88