Skip to main content

Module spacing

Module spacing 

Source
Expand description

Where the instances of a pattern go — the bodies or features of a pattern, the copies of a placed part, fasteners in holes — and the fields that set it: Frames, every way of laying instances out, each the motions from the seed to its instances; Spacing, the Row of instances in a line or round an axis, and the count (count_field, whole_count); what they are laid out along, round or at (references); and where a part’s holes are (holes).

Every number here is a NumericInput: plain, or a formula of the part’s parameters, resolved through whatever reader the step or its form reads the part with.

Re-exports§

pub use holes::HoleFit;
pub use holes::HoleSite;
pub use holes::HoleSites;
pub use holes::hole_sites;
pub use holes::holes_of;
pub use holes::pose_of;
pub use holes::read_hole_sites;
pub use references::PatternDirection;
pub use references::PointsRef;
pub use references::TurnAxis;
pub use references::resolve_points;

Modules§

holes
Where a part’s holes are and what fits them: each hole a step drilled recorded as a HoleSite — its axis, the screw size it is for, how a head seats in it and how deep it runs — in the part’s target hole_sites, which every step that drills holes revises, and every step that repeats features copies with them. What reads them: a pattern laid out at holes (super::Frames::Holes), and fasteners placed in them, sized by them.
references
What instances are laid out along, round or at, from whichever element gives it — of the part itself, or of a part placed in it, where it is placed: TurnAxis, a line or what a round element turns around; PatternDirection, a line or a plane’s normal; PointsRef, a point or a sketch’s points of its own.

Structs§

Direction
One direction of a row or a grid of instances.
Offset
One instance of a Frames::Table: how far it is from the seed along each axis — numbers, or formulas of the part’s parameters.
Row
Instances of a pattern in a row: count of them, the first where the seed is and the k-th value * k / divisor on from it — a length, or an angle in degrees (see Spacing::along, Spacing::round).

Enums§

Frames
Where the instances of a pattern go (see the module’s docs).
Spacing
How far apart the instances of a pattern are: each Step from the last, or spread evenly over the Extent from the first to the last — a length, or an angle in degrees, plain or a formula of the part’s parameters. Serialized as {"step": 2.0}, {"extent": 10.0} or {"step": {"formula": "pitch"}}.

Functions§

count_field
The count field of a pattern in f, keyed key, of count as reader reads the parameters — dragged by handle unless it follows a formula — calling set with the count it is set to: a formula as typed, a number rounded to a whole one of at least one, the seed alone.
track
A handle at at, dragged along direction; none for a direction that could be zero, which nothing could be dragged along.
whole_count
The number of instances count comes to as reader reads the parameters: a whole number, at least one — the seed alone. Anything else is refused, saying so.