Expand description
Repeating and moving bodies, as operations of a program (see
geop_core_editor::part_operation::PartOperation):
LinearPattern: copies in a row along a direction, or in a grid along two.CircularPattern: copies turned around an axis.Pattern: copies wherever a list of frames puts them — along a curve, at points, from a table, filling a face, at holes (seegeop_ops_model::spacing::Frames).Mirror: a mirror image in a plane.MoveBody: bodies, or a copy of them, turned and shifted.ScaleBody: bodies scaled about a point, evenly or along each axis.DeformBody: bodies tapered, twisted or bent about an axis.
The first four repeat bodies or features.
Each acts on solids, and on sheets — faces standing on their own — and
keeps what it makes as new bodies, or combines it with a solid as an
extrude does (geop_ops_model::Combine): joined to the bodies
themselves, or cut from another solid. The copies are moved exactly as
the bodies are (see geop_core_topology::Model::transform_body): every
surface and curve by the same motion, each pcurve as it was.
§Patterning a feature
Patterns and mirrors also repeat features — a hole cut by an extrude, a
boss joined to a plate, a tapped hole with its thread — picked by a face
each made. A step only sees the part the steps before it built, never
their arguments; what it sees of a feature is what the feature’s step
recorded on the part as it combined its tools (see
geop_ops_model::Feature), and a feature is picked by a face it made
(Feature). A pattern copies those tools, moves them, and
combines each copy with the solid the feature lies on as the feature
combined it: why that, rather than running the step again, is said in
features.rs.
§Spacing
Where instances go — in a row, each a step from the last or spread over
an extent, round an axis, along a curve, at points, filling a face — is
geop_ops_model::spacing’s, shared with every operation that lays out
instances (a placed part’s copies, fasteners in holes, too).
Modules§
- examples
- The examples of patterns an editor offers: a plate drilled with a row of holes, one hole patterned; and two drawn in the editor, a turbine and a flange, each patterned round its axis.
Structs§
- Circular
Pattern - Copies the bodies
bodies— solids, and sheets by one of their faces — or does the featuresfeaturesagain, turned around an axis:countinstances, the bodies themselves the first, eachSpacing::Stepdegrees from the last, or spread evenly overSpacing::Extentdegrees — over a full turn of 360°, the last a step short of coming round onto the first again. Turning goes counter-clockwise looking against the axis, the other way ifreversed. - Circular
Pattern Args - Deform
Body - Tapers, pinches, shears, twists or bends the bodies
bodies— solids, and sheets by one of their faces — about the axis throughoriginalongaxis, over the zone fromstarttoendalong it (measured fromorigin): in place, every entity keeping its name. Before the zone a body stays where it is; past it, it is carried on as the zone’s end leaves it — turned rigidly by a twist or a bend, scaled across the axis by a taper or a pinch. A shear is affine: one map along the whole axis, so nothing is divided at the zone’s ends. - Deform
Body Args - Direction
- One direction of a row or a grid of instances.
- Feature
- What a step did by combining tools with a solid — a cut, a boss, a hole
— as an element of the model: named by the step, and picked by a face
it made (see
FeatureFaces), lit as every face of it that is left. A feature of a part placed in the part is picked as one of that part, behind its instance. - Linear
Pattern - Copies the bodies
bodies— solids, and sheets by one of their faces — or the featuresfeaturesin a row along a direction, or in a grid along two:countinstances along each, the bodies or features themselves the first, eachSpacing::Stepfrom the last or spread evenly overSpacing::Extent. - Linear
Pattern Args - Mirror
- Mirrors the bodies
bodies— solids, and sheets by one of their faces — or does the featuresfeaturesagain mirrored, in a plane: a planar face, a datum plane, a frame’s plane. The mirror image is a valid body of its own, its faces turned around so that they face out again; the bodies themselves stay. - Mirror
Args - Move
Body - Moves the bodies
bodies— solids, and sheets by one of their faces — turned byangledegrees aboutaxis, if any (counter-clockwise looking against it), then shifted bytranslation. Moved, every entity keeps its name; withcopy, the bodies stay and a moved copy of them is made, the copy of each entity namedXnamedmove(M,X)for the operationM. - Move
Body Args - 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. - Pattern
- Copies the bodies
bodies— solids, and sheets by one of their faces — or does the featuresfeaturesagain whereverframesputs them (seeFrames): in a row or a grid, round an axis, along a curve, at points — the seed at the first, or where it is said to be — at the offsets of a table, filling a flat face on a grid, or at the holes features drilled. Linear and circular patterns are two of these, with a dialog of their own (crate::LinearPattern,crate::CircularPattern). - Pattern
Args - Scale
Body - Scales the bodies
bodies— solids, and sheets by one of their faces — about the pointaboutbyfactorsalong the world’sx,yandz: in place, every entity keeping its name. Exact: a NURBS curve or surface scaled is its control points scaled, weights and parametrization kept, so every pcurve stays as it is. Unequal factors make a circle an ellipse — exactly, as a NURBS. A negative factor mirrors (an odd number of them turns every face around, so the normals still point out); a factor of zero is refused. - Scale
Body Args - Seeds
- What a pattern repeats:
bodies— kept as new bodies, or combined ascombinesays — orfeatures, each copy combined as its feature was (see [crate::features]). Its fields are among those of the step’s arguments.
Enums§
- Deform
- How a
DeformBodydeforms: each about the axis, over the zone. - Frames
- Where the instances of a pattern go (see the module’s docs).
- Pattern
Direction - A direction to go along: a line — a straight edge, a datum axis or a frame’s, a sketch’s line — or a plane, along its normal: a flat face, a datum plane, a sketch’s plane.
- Points
Ref - Where something goes: a vertex, a datum point or a frame’s origin, a sketch’s point — or a sketch, standing for its points that no line, arc or spline runs through.
- Turn
Axis - An axis to turn about: a line — a straight edge, a datum axis or a frame’s, a sketch’s line — or what a round element turns around: a circular edge, a cylindrical or conical face, a sketch’s circle or arc.
Functions§
- body
- The body named
name: a solid, or the sheet of the face of that name. - feature
- The feature of the step
step. - register
- Adds what this crate offers an editor to
r: patterns, mirrors and moved bodies.
Type Aliases§
- BodyRef
- A body of the part: a solid by its name, or a sheet by one of its faces’.
- Feature
Ref - A feature of the part, or of a part placed in it, by the step that made it.