Expand description
What the tests of the operations share about the model: checking it
valid and drawn as its trims say, finding its entities by where they
are, the model an editor shows, building a part of a model given and
steps run on it one by one, and the model a program builds. Only built
for tests: with testing, or in this crate’s own.
Structs§
- Cases
- The cases of a sweep, as they come: how many built, how many were refused, and every one that went wrong.
Enums§
- Outcome
- What one case of a sweep came to.
Constants§
- GIVEN
- The id of the step that gives a part its model, in
given_part.
Traits§
- Built
- Building a program on its own, written in the operations
registrymakes.
Functions§
- apply
- What
O’s stepstepwithargsmakes ofmodel, as a program of two steps would build it — the model given, then the step — together with what else the step made: the part, after its one run. For an operation’s tests, which build the model they act on directly. - apply_
to_ model - The model
O’s stepstepwithargsleaves ofmodel(seeapply): for the tests of an operation that builds on the model. - assert_
close - Checks
ais withintolofbin every coordinate. - assert_
draws_ its_ trims - Checks every face of
partis drawn exactly where its trims say: the triangles the rasterizer draws it with cover, in(u, v), the area its outer boundary encloses less its holes’ — as the rasterizer samples them. A face drawn over a hole it goes around, or leaving a gap, covers more or less. Plainf64, like the rasterizer. - assert_
model_ valid - Checks
modelis a valid manifold model, failing with every validation error’s root message. - assert_
model_ valid_ sheets - Checks
model, which may hold open bodies — sheets, wires — is valid, failing with every validation error’s root message. - assert_
valid - Checks
partis a valid manifold model with consistent names, failing with the report ofcheck_valid. - assert_
valid_ sheets - Checks
part, which may hold open bodies — sheets, wires — is valid with consistent names, failing asassert_validdoes. - assert_
volume - Checks the solid named
solidofpartenclosesexpected, to withintolerance(seesolid_volume). - check_
valid - Whether
partis a valid manifold model — if not, every validation error’s root message, one per line, and the names of the entities they mention. - classify
- Where the point
plies relative to the solidsolidofpart: inside it, outside it, or on its boundary — inside, if inside any of its shells. - edge_at
- The name of the edge of
partwhosemiddlecould be atp. - edges_
where - The names of the edges of
partthatkeepaccepts, sorted. - edges_
with_ middle_ where - The names of the edges of
partwhosemiddlekeepaccepts, as plain numbers, sorted. - error
- The error
resultholds, for a test that expects one. - face_
towards - The planar face of
solidwhose outward normal isnormal, lying furthest that way. - given_
part - A part of one step that defines its model as
model: what the tests of an operation, an exporter or an inspector build on. - has_
vertex - Whether
parthas a vertex that could be atp. - middle
- The middle of
edge, halfway along its curve’s domain. - model_
of - The model
partholds: empty if it built no topology. - model_
shown - The model the editor
editorshows: what the program it edits builds, as far as it runs it. - outcome
- Applies a step of
Owithargsto a copy ofpartand says how it went: refused, where the error’s root message is oneis_refusalaccepts — the operation refusing what it does not support, rather than failing at what it does. - run_
step - Runs
O’s stepstepwithargsonpart, after the steps it ran: the next step of a program built one step at a time, on a model given (seegiven_part). - runner_
of - A runner of programs written in the operations
registrymakes, as the filepart.geop— of a workspace of no other files. - solid_
volume - The volume the solid named
solidofpartencloses, from its mesh as drawn (seevolume). - unit_
cube - A unit cube, every entity named by its kind and its position among
those:
v0…v7,e0…e11,f0…f5,s0. - vertex_
at - The name of the vertex of
partthat could be atp. - volume
- The volume
solidofpartencloses, from its mesh as drawn atresolution(seerasterize): negative if its faces point in. Its triangles’ corners aref32, as STL stores them: a test’s measuring stick, not a kernel comparison.