pub struct Setup {
pub id: SetupId,
pub name: String,
pub model_to_machine: RigidTransform,
pub wcs: WorkOffset,
pub stock: Stock,
pub turning_stick_out: Option<f64>,
pub heights: Heights,
pub machine: Option<MachineId>,
pub targets: Vec<TargetRef>,
pub protected: Vec<TargetRef>,
pub program: Option<ProgramInfo>,
}Expand description
One machining setup: a fixturing of the part on the machine.
Every algorithm runs in MACHINE coordinates (cutter axis +Z, depths descend
in Z). model_to_machine is the only transform CAM applies to geometry;
the default aligns model +Z with machine +Z.
Fields§
§id: SetupId§name: String§model_to_machine: RigidTransformRigid transform from model coordinates to machine coordinates.
wcs: WorkOffsetWork coordinate system the post emits (G54…, or a fixture offset).
stock: StockRaw material before this setup’s operations.
turning_stick_out: Option<f64>Unclamped length measured back from the cylindrical stock’s front.
heights: HeightsClearance/retract/feed heights in MACHINE Z.
machine: Option<MachineId>Machine the setup is posted for; None falls back to a generic 3-axis mill.
targets: Vec<TargetRef>Bodies being machined in this setup (whole bodies).
protected: Vec<TargetRef>Fixtures, vise jaws and other protected bodies (never cut, always checked).
program: Option<ProgramInfo>Program identity for the post (number and/or comment).