Skip to content

construct: accept rings pinched at a vertex on surface and 2D paths; refuse only where a solid would be non-manifold #262

Description

@GeneralPawz

Must land before #253 is released. #253 (on main, unreleased) replaced earcut with a certified ear clipper, which refuses rings that touch at exactly one vertex: a hole touching the outer ring or another hole, or an outer ring pinched at a vertex. That is right for solids, where extruding such a profile gives a non-manifold edge. But a consumer (axioval) legitimately produces such rings on surface and 2D paths:

  • plan footprints that are unions of projected shadows, where two shadows touch at one corner (diagonal rectangles, an L-shaped room's boundary meeting a column corner);
  • space-boundary surfaces.

They are listing the exact call sites.

Proposal

  • Make pinch handling explicit per caller. Triangulating a 2D region or a planar surface patch accepts rings pinched at a vertex: split the pinch into separate ring pieces at the shared vertex, or let the clipper treat the pinch vertex as two coincident vertices. The output stays a valid triangulation whose edge parity holds when the pinch vertex is counted twice.
  • Solid construction (extrusion caps and anything that must be a closed 2-manifold) keeps refusing by name. Alternatively, it emits two solids touching at an edge, but only where the caller asks for that.
  • Keep the construct: profile triangulation leaves an open mesh for two holes side by side #253 certificate, adapted to pinch vertices.

Done when

  • Pinched rings triangulate on the surface and 2D paths: diagonal rectangles touching at a corner, a hole touching the outer ring at a vertex, and two holes touching at a vertex, with exact area and a valid edge-parity certificate.
  • Extrusion of the same profiles is refused by name.
  • The consumer's listed call sites are covered by tests.

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions