Repository navigation
Version 0.20.0 data model (machine/2, job/2, multi-part planner) - #194
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/2adds 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/1files migrate on load.campanion-job/2names a machine and head, a job type (cut_routeorprint) 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/1files 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 runaccepts 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.