Skip to content

Improve GUI file open, SVG import, part placement, and editing - #188

Merged
mountainarcwelding merged 1 commit into
mainfrom
feat/gui-0.18.1
Nov 15, 2026
Merged

mountainarcwelding merged 1 commit into
mainfrom
feat/gui-0.18.1

Conversation

@mountainarcwelding

Copy link
Copy Markdown
Owner

Improves the graphical workspace so a part can be opened, placed, and edited more clearly. CAMpanion remains primarily command-line driven; the GUI is still in development and does not talk to a machine.

What this includes

  • File → Open, Import part, Save As, and Export G-code use a native chooser (rfd with the xdg-desktop-portal backend on Linux, so the release binary does not need an extra GTK install). When no chooser is available, a typed-path box shows the current directory and accepts relative paths and ~. File → Enter path… opens that fallback on demand.
  • SVG import accepts typical Inkscape and LightBurn files (groups, transforms, px or unitless page size, hidden elements skipped). When page units are ambiguous, a warning is shown and the existing CSS-pixel scale (96px = 1in) is kept; the importer does not silently treat user units as millimetres. Import failures are shown clearly in the GUI.
  • A campanion-job/1 file may set optional placement (x, y, rotate_deg) for a DXF, SVG or STEP source. Rotation is counterclockwise about the drawing bounds centre, then the translation is applied. Omitted placement is the identity (backward compatible). An STL source may not set placement. The GUI can drag the part or type the same offsets; campanion run applies the transform when planning.
  • Tools and operations can be copied, pasted and duplicated (Ctrl+C, Ctrl+V, Ctrl+D, and the Edit menu). Delete (Delete, the context menu, and Edit → Delete) refuses a tool that an operation still uses. Ctrl+Z undoes those edits.
  • Properties show only fields that belong to the active process. A laser job no longer offers wire diameter, pierce delay, or other process-foreign settings. Cut direction auto is preserved and shown as auto, not as climb.
  • Export names from *.job.json and *.ir.json no longer keep a leftover .job or .ir stem. The 2D viewport waits for a usable pane size before fitting, and refits if the pane is resized unless the user has zoomed or panned. campanion-gui --screenshot DIR FILE plans and posts the opened job. Screenshot completion is printed once.

scripts/check.sh (fmt, clippy, tests, wasm, cargo-deny) was run locally and passed (1317 tests passed, 0 failed).

Refs: GUI file open, SVG import, placement, and editing.

Add a native file chooser with a typed-path fallback, keep CSS-pixel SVG
scale while warning when units are ambiguous, store an optional job
placement that the CLI honours, and filter properties to the active
process. Tools and operations can be copied, pasted, duplicated, deleted
and undone. Export stems, viewport fitting, screenshot-with-file, and
cut direction auto are also corrected.
@mountainarcwelding
mountainarcwelding merged commit dfcd35d into main Nov 15, 2026
1 check passed
@mountainarcwelding
mountainarcwelding deleted the feat/gui-0.18.1 branch November 15, 2026 22:55
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