#[non_exhaustive]pub enum MotionKind {
Show 32 variants
Probe {
cycle: ProbeCycle,
},
Rapid {
to: Point3,
},
Plunge {
to: Point3,
},
Cut {
to: Point3,
},
ArcCw {
to: Point3,
center: Point3,
plane: ArcPlane,
pitch: f64,
},
ArcCcw {
to: Point3,
center: Point3,
plane: ArcPlane,
pitch: f64,
},
Retract {
to: Point3,
},
LeadIn {
to: Point3,
},
LeadOut {
to: Point3,
},
Link {
to: Point3,
},
Dwell {
seconds: f64,
},
ToolChange {
tool: ToolId,
},
Cycle {
at: Point3,
cycle: Cycle,
},
SpindleOn {
rpm: f64,
direction: SpindleDirection,
},
SpindleOff,
SpindleOrient {
angle_deg: f64,
},
SpindleSync {
enabled: bool,
},
Coolant {
mode: Coolant,
},
Comment {
text: String,
},
WorkPlane {
origin: Point3,
x_axis: Point3,
z_axis: Point3,
},
WorkPlaneOff,
RotaryPosition {
axes: Vec<RotaryWord>,
},
TcpMode {
enabled: bool,
},
LatheMode {
diameter_mode: bool,
},
SpindleSurfaceSpeed {
surface_speed: f64,
max_rpm: f64,
direction: SpindleDirection,
},
ThreadCut {
to: Point3,
pitch: f64,
},
TurnThreadCycle {
cycle: TurnThreadCycle,
},
PolarInterpolation {
enabled: bool,
},
CylindricalInterpolation {
radius: Option<f64>,
},
LinearRotary {
to: Point3,
axes: Vec<RotaryWord>,
},
Stop {
optional: bool,
},
PassThrough {
text: String,
},
}Expand description
One typed motion. Positions are the TOOL REFERENCE POINT in machine
coordinates; every variant that moves the tool ends at to. The start of a
motion is the end of the previous one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Probe
An expanded probe trigger move (lane C14); never ordinary cutting.
Fields
cycle: ProbeCycleRapid
Rapid traverse clear of material.
Plunge
Vertical (or near-vertical) descent into material at plunge feed.
Cut
Cutting move.
ArcCw
Clockwise arc (looking down the plane’s normal) about center.
pitch is the axial advance per full turn for helices, 0 for planar arcs.
ArcCcw
Counter-clockwise arc, same conventions as ArcCw.
Retract
Move up and away from material.
LeadIn
Approach into the cut.
LeadOut
Departure out of the cut.
Link
Non-cutting connection between passes that stays near the surface.
Dwell
Pause for seconds.
ToolChange
Tool change to tool.
Cycle
A canned hole cycle executed at at (XY; Z is the retract plane).
SpindleOn
Spindle on at rpm.
SpindleOff
SpindleOrient
Orient the stopped spindle to angle_deg (fine boring, back boring: M19).
SpindleSync
Rigid tapping mode on/off (spindle synchronized with the feed: M29).
Coolant
Coolant mode change.
Comment
A comment passed to the post verbatim (operation start, notes).
WorkPlane
Tilted work plane on (G68.2 / CYCLE800 / PLANE SPATIAL) for a 3+2
indexed section. origin, x_axis and z_axis are in setup
coordinates; positions in the stream STAY in setup coordinates (the
post derives the local coordinates); z_axis is the section’s tool
axis, and canned-cycle depths inside the section run along it.
WorkPlaneOff
Tilted work plane off (G69 / CYCLE800() / PLANE RESET).
RotaryPosition
Position the rotary axes with the tool clear of the part (3+2 indexing); angles in degrees in the machine’s axis order.
Fields
axes: Vec<RotaryWord>TcpMode
Rotary tool-centre-point control on/off (G43.4 / TRAORI / M128).
LatheMode
Enter G18 XZ turning; internal X coordinates remain radius. Diameter mode is post conversion only.
SpindleSurfaceSpeed
G96 constant surface speed with a G50 maximum rpm; units/min consistent with model units.
ThreadCut
G33/G32 synchronized constant-pitch thread cut; the start is the
previous position. pitch is the authoritative synchronisation: never
convert it to an ordinary feed move silently.
TurnThreadCycle
Canned turning thread schedule; the expanded equivalent is one
ThreadCut per pass.
Fields
cycle: TurnThreadCyclePolarInterpolation
Polar interpolation on/off (G12.1 / TRANSMIT): XY programmed as X and C (lane C11b).
CylindricalInterpolation
Cylindrical interpolation (G7.1 / TRACYL) on a cylinder of radius;
None cancels it.
LinearRotary
Synchronized linear and rotary feed move: the linear axes to to while
the rotary axes reach axes (lane C11b).
Stop
Program stop (M0) or optional stop (M1) (lane C15).
PassThrough
Explicit user text passed to the post byte for byte, in order; never interpolated or generated (lane C15).
Implementations§
Source§impl MotionKind
impl MotionKind
Sourcepub fn is_cutting(&self) -> bool
pub fn is_cutting(&self) -> bool
Motions that remove material (cuts, arcs, leads, cycles, plunges).