Box3d Editor
The Box3d editor edits a Box3d geometry — the axis-aligned box kind a Geometry slot
holds, whose data is one box3d_t value in its Box property — through four vector
rows, Min, Max, Dimension and Center, of which an Edit Mode selector decides which two are
writable. It is reached wherever a Geometry slot admits the Box3d kind: a Control-Tree kind node
under a Geometry slot, or the geometry switchboard embedded inline.
Layout
- Edit Mode — a selector over three modes. Its internal values are
MinMax,MinDimensionandCenterDimension, labelled “Min / Max”, “Min + Dimension” and “Center + Dimension”. - Min, Max, Dimension, Center — four vector rows, one X / Y / Z input each. The editor captions Dimension “Dimension (Max − Min)” and Center "Center ((Max + Min) / 2)"; the Min and Max captions come from the shared label set rather than the geometry one.
The mode rules each row read-only or editable rather than showing a different set of rows: Min is read-only in Center + Dimension, Max in anything but Min / Max, Dimension in Min / Max, and Center in anything but Center + Dimension.
Key Model
Only the Box value's Min and Max are stored;
Dim and Center are derived and get-only, and the
geometry itself has no corner members — the server replaces its Box value whole. That is why the
other two modes are arithmetic over the same two stored corners rather than a different storage
shape — and that arithmetic happens in the browser, which then posts the resulting Min and Max.
Behavior
- A row commits on blur or Enter, not per keystroke. The vector widget emits only from its blur handlers, suppresses the emit when the parsed value is unchanged, and reverts an unparseable entry to its previous value.
- This editor has no read-only variant. A host that needs one draws its own rows instead — the STL file editor's read-only bounding-box rows are not this editor.
- Two endpoints ship without a caller. The controller exposes
UpdateByMinDimensionandUpdateByCenterDimension; the shipped SPA calls neither, because the editor resolves every mode to a plainUpdate. The corners are never handed out under keys of their own: a box is written whole, through its own key — and that key names the owner's ownBox3dobject, so the update reaches the owner directly.
Source Code Path
See HiNC App Anatomy for git repository links.
HiNC-2025-webservice (Quasar CLI SPA):
wwwroot-src/src/components/geom/Box3dEditor.vue— the editor: the Edit Mode selector, the four vector rows and their per-mode read-only rules, and the client-side arithmetic behind the two derived modes. Its only prop is the IndexService key.wwwroot-src/src/components/widgets/Vec3Input.vue— the X / Y / Z row widget, in standard or single-field text mode; itsreadonlyprop is what the edit mode drives.wwwroot-src/src/components/geom/geometryEditors.ts— maps theBox3dkind to this editor, the single map both the switchboard and the Control Tree resolve through.wwwroot-src/src/components/geom/GeometryEditor.vue— the kind picker that creates a Box3d and, outside selector-only mode, embeds this editor beneath itself.wwwroot-src/src/components/controlTree/itemTypes.ts— registersBox3dagainst the sole-editor panel and lists it among the kinds a container may hold.wwwroot-src/src/components/controlTree/SoleEditorPanel.vue— the kind node's panel, resolvingBox3dthrough the kind map and binding the editor to the node's key.wwwroot-src/src/components/controlTree/GeometrySlotPanel.vue— the Geometry slot's picker, from which a Box3d is chosen.wwwroot-src/src/api/geometry.ts—getBox3dand the create entry. There is deliberately no update wrapper here; the editor posts the update itself.wwwroot-src/src/i18n/en/geom.ts— thebox.*andbounds.*strings, andwwwroot-src/src/i18n/en/common.ts— the shared Min and Max row captions.Geom/Box3dController.cs— REST endpoints at/api/Box3d/*:New,NewWithValue,Get,Update,UpdateByMinDimensionandUpdateByCenterDimension.Common/IndexService.cs— the keyed object store every box key resolves against.
See Also
- Geometry Editor — the switchboard that offers this kind and hosts this editor