Skip to main content

Module program

Module program 

Source
Expand description

Program assembly (lane C4, row 4): one NC program from ordered operations across setups.

The Program is the single stream simulation and the post-processors read: every motion keeps its operation identity, and the Section list tells where each operation starts, which tool, work offset, spindle and coolant it runs with, and what its report said. Assembly inserts the tool changes, spindle and coolant switches and operation comments between the operations’ own streams, and polishes each operation’s motions exactly once on the way in (polish): the line filter within LinkingParams::smoothing_tolerance and arc fitting when LinkingParams::fit_arcs. Strategies hand over raw linked paths (their link::finish runs with filter 0 and no arcs); previews and simulation read the raw OperationInput::toolpath, the post reads Program::motions.

Modules§

sheet
Setup sheet (lane C4, row 7): one HTML page per program, from the same stream the post reads. Deterministic: no dates, no random ids.

Structs§

OperationInput
One operation’s toolpath with the definitions it was generated from.
Polish
What assembly did to one operation’s motions on the way into the stream.
Program
The assembled program: one motion stream plus its sections.
ProgramInput
What the document hands to assembly.
ProgramSummary
Totals over the program.
Section
Where one operation sits in the program stream and how it runs.
SetupInput
One setup and its operations in machining order.

Enums§

Units
Length unit of the program’s coordinates and feeds.

Functions§

assemble
Assemble the program. Disabled operations are skipped; an operation whose toolpath is not usable (pending, failed or cancelled) is an error, never silently omitted. Tools are keyed by id; two tools with one id must be identical.
assemble_with
assemble with the caller’s runner: lane C18’s polish hook (feed optimisation, certified smoothing) reports progress and honours cancellation through it; nothing else in assembly does work worth a token.
motion_length
Straight-line length of a motion from from (arcs by their true length).
polish
Polish one operation’s motions for the program stream: the line filter within linking.smoothing_tolerance (off at 0), then arc fitting when linking.fit_arcs, within the smoothing tolerance when it is set and the operation’s machining tolerance otherwise. Fitting touches only runs of straight cuts, so a stream that was polished before passes through unchanged with zero counts; arcs a strategy emitted (helical ramps) stay.
strategy_name
The strategy’s serde tag, by serializing just the tag.