Skip to content

Convex decomposition of an arbitrary solid #96

Description

@GeneralPawz

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs-triageFiled but not yet accepted, sized, or scheduled

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions