Expand description
Test fixture — this crate’s tests, and others’ with the testing
feature: a plain axis-aligned unit-cube-shaped solid, described whole
and built at once (see crate::build).
This crate sits below geop-lib-sweep in the workspace’s
dependency order (that crate is what actually builds shapes like a real
cube_solid via extrude), so validation/edit tests here that
just need “some realistic populated Model” to run structural or
numerical checks against can’t reach for it — a dev-dependency back on
geop-lib-sweep would make Cargo compile this crate twice
(once under #[cfg(test)], once as that crate’s plain library
dependency), and the two copies’ Model types don’t unify, which
surfaces as expected Model, found Model at every call site. This is a
small, self-contained stand-in scoped to exactly what these tests need:
six planar faces, twelve shared edges, eight shared vertices — no
extrude generality (arbitrary footprints, holes) required.
Functions§
- check_
errors - The errors
checkfinds inmodel, under the default parameters. - line2
- The straight pcurve from
(u, v)atob, over[0, 1]. - line3
- The straight line from
atob, over[0, 1]. - test_
cube_ model - A new model holding only
test_cube_solid. - test_
cube_ solid - Build
model’s unit cube (corners at0/1on every axis) and return itsSolidId. Every face is a flat, degree-1bilinear patch; every edge a straight degree-1line — plenty for the structural/numerical checks these tests actually exercise.
Type Aliases§
- Check
- One check of
crate::validation: it adds what it finds wrong with a model to the errors.