Skip to main content

Crate springrep

Crate springrep 

Source
Expand description

An exact boundary-representation kernel. The representation, the tolerance policy and the history rules are in doc/design.md.

Modules§

blend
Chamfers and fillets on solid edges. Each comes three ways: fillet and chamfer pick every edge where the surfaces of two named faces meet; the _named forms take EdgeNames, which can also pick only where the faces carrying the names meet; the _edges forms take the edges themselves. The shaped blends ([shaped]) take edges or faces.
boolean
Boolean union, difference and intersection of solids.
check
The validity checker: a solid is valid when its shells are closed oriented 2-manifolds, every edge lies on both its faces within tolerance, and each loop closes in its face’s parameters.
codec
A compact binary encoding of built geometry, for build states kept on disk. Numbers are written as their bits, so a decoded solid is the encoded one exactly. A struct is encoded field by field through [fields!], which names every field without ..: a field added to the struct and not to its encoding does not compile.
distance
The closest distance between two sets of faces, edges and vertices, from the exact geometry.
draw
Hidden-line drawings: a solid’s edges and the outlines of its curved faces seen along a direction, each cut into the stretches the viewer sees and those the solid hides.
edit
Changes to a solid’s faces: faces moved, tilted or taken out, a solid hollowed, grown by a distance or stretched, and the slab a face sweeps. Each builds exact tools and combines them with the booleans, blends and face moves.
geom
Curves and surfaces, each with evaluation, derivatives, projection and parameter ranges.
loft
Lofts: a solid through a sequence of planar sections, each side face a B-spline surface skinned across them (a plane where a ruled side is flat). Faces are start and end on the first and last sections and side for the rest.
math
Points, vectors, frames, rigid transforms and boxes. A point and a vector share Vec3; the name at each use says which it is.
measure
Area, volume, mass properties and tight bounding box, from the exact geometry rather than a mesh.
mesh
Tessellation. Each edge is discretised once and both its faces use those points, so the mesh of a valid solid is watertight by construction. Each face is a constrained Delaunay triangulation of those points in its parameter plane, refined until every triangle is within the deflection limits of the surface ([face]).
overlap
Whether two placed solids share material, and how much: interference for an assembly sweep.
pick
Finding a solid’s faces and edges: by the names its faces carry, and by shape.
primitive
The five primitive solids, each placed by a frame: a block and a cylinder extruded along the frame’s z, a sphere, a torus and a cone revolved about it.
probe
Thin places in a valid solid, for design hygiene: faces narrower than a size, and material or empty space thinner than one between faces that face each other. A valid solid can still hold a 0.1 µm sliver or a hairline gap with real wall area when the design states two values a hair apart; the checker passes them, since they are well above LINEAR, and this finds them.
profile
Planar profiles in sketch coordinates: closed loops of named segments, the first loop the outer boundary and the rest holes. A sweep names each face it makes after its segment.
rays
Where a ray crosses a solid’s faces, from the exact geometry.
step
STEP AP214 import and export: [write] turns an arena’s solids into an exchange file whose faces carry their names, and write_assembly several parts placed by their instances; read turns a file’s advanced B-reps, placed by its product structure, into checked kernel solids, each with its product’s name and its colour.
sweep
Sweeps of planar profiles into solids: straight, turned about an axis, along a path of legs and bends, along a helix, and along a space curve. Every side face takes the names of the profile segment that sweeps it; caps are start (on the sketch plane) and end.
tol
The kernel’s tolerances. Every geometric comparison uses one of these, or a value derived from one in the place it is used; no module keeps a tolerance of its own.
topo
The topology arena: solids of shells of faces bounded by loops of coedges, each the use of an edge by one face. Every entity lives in one Brep and is referred to by a typed id.

Enums§

Error
Every kernel failure. An operation that cannot produce a valid solid returns one of these rather than a solid that fails crate::check.

Constants§

SOURCE
A digest of the kernel’s sources, unit tests aside: two builds with the same one build the same geometry, so a cache of built parts keys on it.

Type Aliases§

Result