Skip to content

Version 0.20.0 data model (machine/2, job/2, multi-part planner) - #194

Merged
mountainarcwelding merged 3 commits into
mainfrom
feat/v020-data-model
Nov 16, 2026
Merged

mountainarcwelding merged 3 commits into
mainfrom
feat/v020-data-model

Conversation

@mountainarcwelding

Copy link
Copy Markdown
Owner

Backend data model for the approved GUI v0.4 spec, plus CLI support. This is step 2 only: no Setup, Operations, or Simulate/Export UI redesign.

campanion-machine/2 adds gantry and resin machine types. A gantry has a user-entered bed and any mix of heads (laser, plasma, spindle, extruder, or another kind), each with a process, post, material library, and optional per-head XYZ offsets, safe-Z, and max power, all user-entered. A resin machine has no heads. campanion-machine/1 files migrate on load.

campanion-job/2 names a machine and head, a job type (cut_route or print) derived from that head, a parts list with linked instances, operation selectors (whole part, layers, colour, or stable contour ids), an explicit cut order, per-contour overrides, and material presets in real units. Raw 0..=1 power is rejected. Only a single head is supported now; multi-head mixed jobs are refused. campanion-job/1 files migrate on load.

The planner runs every instance in order, warns about parts off the bed, unused contours, and lead-ins that appear to cross another part, and refuses G-code export when a part is off a user-entered bed or work area. Planning can be cancelled at the next instance or operation boundary. campanion run accepts a multi-part job. An arrayed two-instance laser job has a G-code golden; equivalent single-instance v1 and v2 jobs produce the same output.

The current GUI keeps compiling on the new model. Opening a v2 or multi-part job generates from the loaded file. Saving that file from the current Setup editor is refused so instances are not overwritten.

CAMpanion is still primarily command-line driven; the GUI is a work in progress and has not been machine-tested.

Refs only.

Gantry machines store a user-entered bed and any mix of heads (laser,
plasma, spindle, extruder, or another kind). Each head may have a
process, post, material library, XYZ offset, and safe-Z, all entered by
the user. Resin machines have no heads; screen and bed sizes are stored
only when entered. Material power is percent or watts, never a raw 0..1
fraction. campanion-machine/1 files migrate on load (bed from a complete
work area, kind from process, power 0..1 to percent). The current
Machines manager still compiles and saves v2 gantry profiles.

Refs only.
A job can name several parts, each with a source (absolute or relative)
and one or more linked instances that share that source. Placement now
includes optional mirror and scale. campanion-job/1 files migrate on
load to a single part with one instance, so existing accessors and
single-part planning stay the same. v2 operations may set a selector,
real-unit power, passes, override marks, and an explicit cut order.
Only a single head is accepted. Tests cover migrate-on-load, a
two-instance part, refusals, and stable contour ids.

Refs only.
campanion-job/2 jobs plan every instance in order, map real-unit power,
honour selectors and contour overrides, and surface bed, unused-contour,
and crossing lead-in checks. campanion run accepts a multi-part job.
The current GUI keeps compiling: it plans a loaded v2 job and refuses
to save one from the single-part editor. CLI-first; not machine-tested.
@mountainarcwelding
mountainarcwelding merged commit 412b96a into main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant