Skip to content

Solid offset and shelling with refusal on self-intersection #78

Description

@GeneralPawz

Problem

Axiolid has no solid offset, shelling, or Minkowski sum. minkowski and
offset_mesh match nothing in crates/, and there is no shell/thicken
producing a hollowed solid.

  • OCCT: BRepOffsetAPI_MakeOffsetShape and MakeThickSolid are standard
    modelling operations.
  • CGAL: minkowski_sum_3, plus polygon and polyhedron offsets.
  • Manifold: offset and refine operations.

Note the planar half is already done: axiolid-overlay gained exact 2D
offset and stroke offset in v0.5 (3549c07). This issue is the solid half.

Why it matters

Shelling is how a wall becomes a wall assembly, a pipe becomes a pipe, and a
container becomes a container. In IFC terms it is the difference between a
solid extrusion and a hollow section — the RectangleProfile.thickness field
Axiolid already carries expresses exactly this intent at profile level, but
there is no operation to apply it to a finished solid.

Depends on

v0.9's general exact boolean (#77): an offset shell is naturally expressed as
the difference between an outer and an inner solid, and shelling a non-convex
solid requires it.

Scope

  • Constant-distance offset of a planar-faced solid, outward and inward.
  • Shell/thicken: hollow a solid to a stated wall thickness, optionally
    removing named faces to leave an opening.
  • Self-intersection under offset must be detected and refused, not
    emitted. Offsetting a solid inward by more than its local half-thickness
    collapses it; that is a geometric fact the caller needs told, and it is
    precisely what the v0.7 detection work exists to catch.
  • Concave edges under outward offset, and convex edges under inward offset,
    need explicit treatment — a naive face-plane push produces gaps or overlaps
    at exactly those edges.

Not in scope

  • Variable-distance offsets.
  • Offsets of curved-faced solids (same curved-surface prerequisite as General exact boolean over planar-faced solids #77).
  • General Minkowski sum with an arbitrary structuring solid. Offset by a
    sphere is the special case worth having; the general operation is
    substantially heavier and has no named consumer yet. This is a deliberate
    narrowing
    — "CGAL has it" is not by itself a product requirement.

Verification

  • bash scripts/gate.sh
  • A cube offset outward by d has the volume of a cube with edge a + 2d,
    measured with the v0.7 provider — this fails immediately if edges or corners
    are mishandled.
  • A shelled box has volume equal to outer minus inner, and its wall thickness
    measured across every face matches the request.
  • Inward offset exceeding the local half-thickness returns a typed refusal
    rather than a collapsed or inside-out solid.
  • Every result passes v0.7 diagnosis with no self-intersection.
  • Mutation probe: skip the collapse check on inward offset; the over-offset
    refusal test must fail.

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