Repository navigation
Right-click the axis gizmo to show or hide the coordinate frame - #151
Open
Myuavbug66 wants to merge 1 commit into
Open
Myuavbug66 wants to merge 1 commit into
Myuavbug66 wants to merge 1 commit into
Conversation
… frame Right-clicking the corner gizmo opens an XYZ datum menu with checkable Axes at zero and XYZ planes at zero. The gizmo itself always stays. The Align part editor still shows the whole frame while open. Agents get the same switches as the axes and planes keys of view.set and view.render. Adds manual section with screenshots and a changelog entry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
Right-click the axis gizmo to show or hide the coordinate frame
What it does: right-click the X Y Z gizmo in the corner of a 3D viewport and
tick what you want to see of the coordinate frame at zero:
How to use it
Good to know
the part's zero once it has been aligned.
where to right-click to bring it back.
the switches say, and puts them back as they were when it closes.
axesandplaneskeys ofview.setandview.render.Why
The coordinate frame (the "datum stage") was visible only while the Align part
editor was open, so there was no way to see where zero is on a part during
normal work, and no way to switch it on or off.
How it works
src/viewer/axisGizmo.ts:contains(x, y)tells whether a point is in thegizmo's corner;
hitTestuses it.src/viewer/datumStage.ts: the stage is split into a planes group and anaxes group with
setParts(planes, axes). Labels are switched explicitlybecause the CSS2D renderer ignores a parent's visibility.
src/viewer/SceneManager.ts:stageAligning(the Align editor is open) andstageShown(the person's switches).syncStage()makes the stage match bothand is repeated wherever the model size changes. New
planesShown,setPlanesShown,axesShown,setAxesShownandoverGizmo. Fit to viewcounts the stage only while the Align editor is open, so the switches never
move the camera.
src/ui/Viewer.tsx,src/ui/ContextMenu.tsx,src/styles.css: the menu onthe viewport's
onContextMenu, opened only over the gizmo;MenuItemgainsan optional
checked(rolemenuitemcheckbox,aria-checked, a check mark).src/commands/core/view.ts,mcp/src/commands.json: theaxesandplanesshow keys (regenerated with
UPDATE_MCP_COMMANDS=1).docs/manual.md, an## Unreleasedentry inCHANGELOG.md, and a test intests/commandsView.test.ts.Validation
node scripts/check-plugin-boundary.mjsandnode scripts/check-units.mjs: pass.npm run build(tsc and vite): passes.npm test: passes. On a loaded Windows machinecommandsSessionHoldsandossCreditstimed out in one run; both pass when run alone.npm --prefix mcp test: 149 pass.away from the gizmo; each switch works; the Align part editor shows the whole
frame and removes it on close.
npm run e2e:ciwas not run.Limitations
.scanrulerprojects.