Repository navigation
Add a locked 3D printer and tool volume reference - #77
VR-Architect wants to merge 3 commits into
Conversation
Draw a dashed wireframe box for a 3D printer's build volume or for a woodworking machine's working area, toggled from the viewport toolbar. The volume is a global preference rather than document geometry, so it cannot be selected, moved, copied, saved or exported with the project. - 256 mm default, entered in the workspace display units - the volume's base centre sits at the origin - toggling on frames the volume; toggling off leaves the camera alone - a persistent warning appears when geometry leaves the volume - an optional shortcut is available and unassigned by default - hiding the toolbar toggle also hides the volume Fixes BenchUp3D#69 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thanks @VR-Architect! I will check it out tonight. To answer your question, I use the gh command-line to check PRs and switch context. It's very quick and effective. No need to split the warning part. |
|
Somehow, my AI managed to change this PR's title and description. Sorry for any confusion this may have caused! I am reviewing this PR as I am writting these lines. |
|
I do not know if woodworkers have multiple equipments that have volume concerns or not. Some 3D printer folks have more than one printer. If desired a list of volumes with a description label could be added and the user could select the volume on the canvas. But to be honest, I am happy just to have one reference volume :) --- thanks for all the help. this was my first github collaboration so I hope I did everything correctly? |
|
We could definitely support multiple volumes, yes! And it's probably better to do it now so we won't have to maintain backward compatibility with a legacy single-object format instead of an array of values after release.
Yes, of course! And the beauty of the MIT license is that the code doesn't belong exclusively to its creator. Everyone is free to use, modify, and build upon it. You don't need to ask for permission. Just submit your pull requests! If they align with the maintainer's vision for the parent project, they'll be merged. Otherwise, you'll still have the features you want in your own fork, and you can continue syncing it with the upstream repository to benefit from future updates. Maybe you want to fork BenchUp and make it TrainsUp ;-). |


Implements #69.
A dashed wireframe box for a 3D printer's build volume, or for a woodworking machine's working area (a planer's capacity, a CNC's cutting envelope). It is a reference only: it is never saved with the project, exported, copied or selected.
Viewport
Settings → Tools → Printer and tool volume
Choices worth a look
GeneralSettings, so it never reaches.bup, an export, copy, select-all or the selection. Opening a project on a machine without a printer does not inherit someone else's build volume.SceneKeydoes not include the volume, so the shape cache is bypassed while the box is shown; otherwise a stale box survives a toggle on large models. The box is painted in both the resident and non-resident render paths.Testing
28 new tests (14 in
printer_volume.rs, 10 inapp_tests.rs, 4 insettings.rs). They cover framing on toggle-on with the camera staying put on toggle-off, warning gating, memo invalidation, the shortcut through real key events, the settings modal path, unit conversion, clamped preferences and isolation from save, export, copy and selection.cargo test --locked -p benchup-app --lib— 1163 pass, 23 fail. Those 23 are exactly the set that fails on pristinemain(5922466: 1135 pass, 23 fail), so they are pre-existing and unrelated (Chinese strings, the dimension input overlay render audit, move/copy arrays, tool rail separators, Follow Me). Nothing new fails; the 28 new tests all pass.cargo test --locked -p benchup-core— 336 pass.cargo check --locked -p benchup-app --target wasm32-unknown-unknown— clean.en_US,es_419,it_IT,pt_BR,vi_VN,zh_CN); a test asserts each label exists in all of them.Open questions