Expand description
The operations a crate::Program is made of.
Each is a unit struct implementing Operation, with an Args struct
holding everything it needs. Arguments are plain design data — f64
lengths, sketches — and refer to existing entities of the part only by
name, never by an internal id: an id only means something inside the one
build that produced it, a name means the same thing in every build of
the same program (see geop_core_part’s crate docs).
Entities a step builds on directly — a sketch’s plane, what a datum is
built from — are EntityRefs: a vertex, edge, face or datum by name,
or the origin, a world axis or a base plane.
PartOperation is any one of them together with its arguments: what a
program step holds, and what serializes as {"operation": "extrude", "args": {...}}.
Structs§
- AddDatum
- Adds a datum to the part, named by the operation’s id: a point, an axis
or a plane built from the selected entities by one of the
Constructions. Like a sketch’s plane, it is built when the step runs and stays where it was, whatever later steps do to what it was built from. - AddDatum
Args - AddSketch
- Adds a sketch on a plane to the part, named by the operation’s id: a base
plane, a planar face or a datum plane (see
EntityRef). The plane is resolved when the sketch is added: a sketch on a face stays where the face was, whatever later operations do to the face. - AddSketch
Args - ArgSchema
- One argument of an operation.
- Boolean
- Combines the solids named
aandbinto one solid namedboolean(B)for the operationB, consuming both. - Boolean
Args - Construction
Schema - One way to build a datum (see
crate::Construction): what it builds, what it needs selected — one entity per input, in any order — and the values it takes besides. - Extrude
- Extrudes every region of a sketch along the sketch plane’s normal, into
one solid named
extrude(E)for the operationE. - Extrude
Args - Geometry
- Everything an entity can be used as. An entity is usually several at once: a straight edge is a line and a curve, a circular edge an arc, a curve and something round, a datum point a point and a frame.
- Handle
- One draggable value of a step.
- Operation
Schema - One operation: its kind (as a program step spells it), a short label, what it does, and its arguments.
- Revolve
- Revolves every region of a sketch a full turn around one of its lines,
into one solid named
revolve(R)for the operationR— or, withRevolveArgs::combine, combines that with another solid (seeCombine), the result namedrevolve(R)all the same. - Revolve
Args - Selection
Fit - What an editor offers for a selection: what each entity can be used as, and which constructions fit — by the same matching a step applies.
Enums§
- ArgKind
- What kind of value an argument holds — and so how an editor lets a user enter it.
- Combine
- What an extrude or revolve does with the solid it builds: keep it as a
new body, or combine it with the solid named
target— which that consumes, like aBooleandoes.Differencecuts the new solid out of the target: an extruded pocket, a drilled hole. - Construction
- How a datum is built from its selection: one variant per way,
with the values it takes besides. Serialized with its method:
{"method": "offset", "distance": 1.0}. - Entity
Ref - Something picked to build on.
- Handle
Group - What a handle belongs to, so an editor can offer only what fits what the user is doing: a feature’s parameters while looking at the part, a sketch’s points while sketching.
- Handle
Motion - How a handle moves, and how that maps onto its step’s arguments.
- Part
Operation - An operation together with its arguments, not yet applied to any part.
- Role
- What a construction needs an input to be.
- World
Axis - One of the world’s three axes.
Constants§
- CONSTRUCTIONS
- Every
Construction, described for an editor.
Traits§
- Operation
- One kind of operation on a
Part. - Operation
Args - An operation’s arguments, described field by field — implemented by
#[derive(OperationArgs)].
Functions§
- arg_
path - A path from
&strsegments. - inspect_
selection - Which constructions fit
selectioninpart(seeSelectionFit). - resolve_
plane - The frame of the plane
planerefers to inpart:u/va sketch’sx/yon it,w = u x vits normal. Fails if it is not a plane.
Type Aliases§
- ArgPath
- Where a handle writes in its step: field names into the arguments as
they serialize —
["distance"], or["sketch", "points", "7", "x"].