Skip to content

Bambu Studio: find it wherever it is installed, and put every part on the plate - #5

Draft
cnYui wants to merge 3 commits into
mainfrom
claude/bambu-open
Draft

cnYui wants to merge 3 commits into
mainfrom
claude/bambu-open

Conversation

@cnYui

@cnYui cnYui commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Found while sending the switch robot's printed parts to a running Bambu Studio on Windows (installed at D:\Bambu Studio).

  • Finding the exe. find_bambu_studio() only looked at App Paths, the uninstall entries and Program Files, so the install wasn't found. 发到 Bambu Studio then fell back to the bambustudio://open?file= link, which opens a second Bambu Studio that asks whether to trust the download. It now also reads the exe from the link handler's registry command ("D:\Bambu Studio\bambu-studio.exe" "%1"), so the file is opened directly with no prompt.
  • Parts on the plate. write_3mf laid the parts in one row centred on y = 0, so Bambu Studio's plate, which starts at its front-left corner, had half of every part off it and showed an "outside the plate" warning. Parts are now packed in rows centred on a 256 mm plate (A1 / P1 / X1).

Not changed: Bambu Studio opens each file in a new window instead of the one already open. That is Bambu Studio's own behaviour when it is launched with a file.

Tests: tests/test_printing.py (6 passed) checks that all five switch-robot parts sit inside 0–256 mm without overlapping, and checks the link-handler command parsing.


Generated by Claude Code

… the plate

find_bambu_studio also reads the exe from the bambustudio:// link handler, so an install
outside Program Files (D:\Bambu Studio) is opened directly instead of through the link,
which made Bambu Studio ask whether to trust the download. write_3mf packs parts in rows
centred on the 256 mm plate; before, they sat in one row centred on y = 0, half off the
plate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LYYasrqRAofRzzudWC4dqe
…gle-instance)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LYYasrqRAofRzzudWC4dqe
… of loading it

Tested on Windows with Bambu Studio: with --single-instance no new window opened, but the
already-open window (single-instance preference off) did not load the parts either.
Opening in a new window at least always loads them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LYYasrqRAofRzzudWC4dqe
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.

2 participants