Skip to main content

Crate axiolid_fixtures

Crate axiolid_fixtures 

Source
Expand description

Shared adversarial and degenerate geometry fixtures.

§Why a crate rather than a directory of files

A degenerate case is usually a NUMBER, not a file: a 2e-9 plane tilt, a sliver a fraction of a millimetre wide, two vertices that coincide. Storing those as mesh files invites silent corruption – an exporter rounds a coordinate and the fixture stops being degenerate while still passing.

Constructing them in code keeps the exact bit pattern under version control and makes the reproduction steps the fixture itself.

§Provenance

Every fixture carries a Provenance naming where it came from and under what licence. Fixtures here are ORIGINAL: constructed from published bug descriptions and geometric first principles, not copied from any corpus. That keeps the licence question trivial and the repository redistributable.

§Adding a fixture

Add a constructor returning Fixture, fill in every Provenance field, and state in expectation what an implementation must do – not what it currently does. A fixture that records present behaviour cannot detect a regression, because the regression becomes the new expectation.

Structs§

Fixture
A named mesh fixture with its provenance.
Provenance
Where a fixture came from and under what terms it may be redistributed.

Functions§

box_mesh
An axis-aligned box with a corner at the origin, wound outward.
coplanar_contact
Two cubes sharing exactly one face plane: coplanar boolean contact.
corpus
Every single-mesh fixture in the corpus.
duplicate_vertex_triangle
A triangle with two coincident vertices: zero area, not merely small.
millimetre_column
The ADR 0014 near-degenerate half-space column, in millimetres.
open_shell
An open box: the top face is missing, so the shell is not closed.
scale_disparity
Two cubes whose sizes differ by nine orders of magnitude.
sliver_triangle
A sliver triangle: three nearly collinear vertices.
unit_cube
A well-formed unit cube. The control: every operation must handle it.