Table of Contents

Box3d Editor

The Box3d editor edits an axis-aligned Box3d 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, MinDimension and CenterDimension, 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 Min and Max are settable on the type; Dim and Center are derived and get-only. 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.
  • Four endpoints ship without a caller. The controller exposes UpdateByMinDimension, UpdateByCenterDimension, IndexDimension and IndexCenter; the shipped SPA calls none of them, because the editor resolves every mode to a plain Update.

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; its readonly prop is what the edit mode drives.
  • wwwroot-src/src/components/geom/geometryEditors.ts — maps the Box3d kind 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 — registers Box3d against 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, resolving Box3d through 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.tsgetBox3d, indexBox3dMin, indexBox3dMax and the create entry. There is deliberately no update wrapper here; the editor posts the update itself.
  • wwwroot-src/src/i18n/en/geom.ts — the box.* and bounds.* strings, and wwwroot-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, IndexMin, IndexMax, IndexDimension, IndexCenter, UpdateByMinDimension and UpdateByCenterDimension.
  • 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