Skip to content

mesh-compile: triangulate non-planar polygon faces with a certified bound instead of refusing NotPlanar #254

Description

@GeneralPawz

Reported by a consumer (axioval), based on not-evaluated causes across 14 real models. Affects 346 objects / 689 outcomes in 2 models.

`ReferenceMeshCompiler` (`planar.rs`) refuses an authored polygon face that isn't planar with `NotPlanar(distance)`, so faceted B-reps with slightly warped faces can't be measured.

Proposal

Triangulate a non-planar authored polygon face, as a mesh only and never as exact. Report the deviation through `compile_mesh_with_deviation`.

  • The authored face has no unique surface, so state the bound against the authored polygon's own definition: the largest distance of any corner from the triangulation's plane fit, or the distance between the authored polygon and its triangulation, documented precisely.
  • The bound must be ≥ the largest corner distance from the triangulation.
  • Planar faces (within tolerance) stay exact and unchanged.
  • The exact compiler keeps refusing non-planar faces by name.
  • Self-intersecting or degenerate polygons are still refused by name.

Done when

A faceted B-rep with one face 5 cm out of plane compiles as tessellated, with a reported bound ≥ 5 cm, never exact. All-planar inputs are bit-identical to before.

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