Skip to content

mesh-compile: sample edge curves at their corners so sharp polylines don't exhaust the segment cap #342

Open

Description

@GeneralPawz

Since #333, polyline edge curves without a p-curve are trimmed at their vertices. #336 then samples each edge uniformly to the count its strictest face asks for. Uniform samples never land on a polyline's interior corners. Each span across a corner is therefore bounded by the corner's distance from the span's chord, which falls only linearly with the count. At a tight budget, a sharp-cornered polyline edge reaches the 4,096-segment cap and fails with BudgetExceeded. The #333 closed-square test runs at 1e-3 instead of 1e-4 for this reason.

Needed

Sample a polyline edge (and any edge with known C0 breaks: B-spline full-multiplicity knots, composite joints) at its breaks first, then uniformly within each piece, shared across faces as #336 requires. A straight polyline segment then needs no interior samples on a planar face, and its chord bound is exact.

Done when

  • The closed square and the zigzag polyline edges compile at 1e-4 and 1e-6 with a few samples each, within their bound under dense sampling, and without BudgetExceeded.
  • Watertightness is unchanged across face orders.
  • A mutation probe covers it.

Follow-up to #333 and #336.

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