Skip to main content

Module copies

Module copies 

Source
Expand description

Copies of sketch geometry that stay copies: mirrored across a line, or repeated along a line or round a center. Every copied point is tied to the point it copies by a constraint — Constraint::Symmetric for a mirror, Constraint::Moved for a pattern — and every copied arc’s sweep to the original’s (Constraint::EqualSweep), every circle’s radius (Constraint::Equal). So the copies follow whatever is done to the original: dragged, dimensioned, solved.

Patterns are structure, not records. A pattern is its construction curve by — a line for a linear pattern, an arc for a circular one — and the Constraint::Moved constraints that name it: each copy is the previous one moved by by. That is all there is to know about it: how many copies it has (Sketch::pattern_count) is read off the chain of constraints, and changing that (Sketch::set_pattern_count) adds or removes copies at its end. Its spacing is a dimension of by — a Constraint::Length of the line, an Constraint::Angle between the radii to the arc’s ends — edited like any other.

Positions here are where the copies are placed before the sketch is solved: free choices, computed in plain numbers (see crate::plain).

Structs§

Made
A pattern made: its construction curve, and the dimension of its spacing.

Enums§

Step
How a pattern moves each copy on from the one before.