Transformer Select Panel
The Transformer Select Panel is the switchboard that picks which ITransformer occupies a transformer-valued slot and edits the one that is there. For the model behind the picker — what each transformer does to a frame — see Handle Transform Matrix by ITransformer.
Surface
The panel's principal home is the branch editor of the Equipment page's Topology column
(Equipment Topology, /equipment), where the editor card of a
selected branch — a machine-tool, fixture or workpiece branch, or the worktable attachment — mounts
it for that branch's transformer. It mounts the embedded form through a parent-aware onCreate
hook, so a kind change lands on the branch itself.
Two Transformer slots remain on Control Trees: the Tool House freeform holder's “Geom To Spindle”
and “Geom To Cutter” (Freeform Holder Panel). The transform on a
geometry is not one of them: the Transform picker beside a geometry
chooses that transformer's kind, and the …/type/transformer row it grows under the geometry's kind
node is a kind node whose panel is that kind's editor from the table below — its picker is the
Transform picker, not this one.
Layout
- Transformer Select Panel
- Transformer Type Dropdown — one dense, outlined
q-selectlisting the kinds this host allows. Its label is the host'slabelprop, falling back to Transformer type. Picking a kind commits immediately; there is no Apply button. - Separator — drawn only when a kind is active.
- Active Kind's Editor — the component the kind maps to in
TRANSFORMER_EDITORS, bound to the IndexService key the picker resolved for the live transformer.
- Transformer Type Dropdown — one dense, outlined
The panel takes a selectorOnly prop that drops everything below the dropdown, which gives it two
forms:
| Form | Where it is used | What renders |
|---|---|---|
| Embedded (default) | the Topology column's branch editor (EquipmentTopologyPanel.vue); the inner-transformer card of TransformationGeomEditor.vue, reached only for a wrapper nested inside a wrapper |
dropdown, separator, and the active kind's editor in one column |
| Selector only | every Control-Tree Transformer slot, through TransformerSlotPanel.vue |
the dropdown alone |
In a Control Tree the picker and the editor sit on two different nodes. buildTransformerChildren()
grows at most one child under the slot, typed with the current kind, and that child's panel is
SoleEditorPanel.vue, which resolves the kind through the same TRANSFORMER_EDITORS map and binds
it to the slot's own key. The builder first probes the slot's key with getIndexType and returns no
child at all when that probe fails or names a type outside the seven kinds, so a slot holding
nothing is a picker with nothing beneath it. Selecting the slot shows the picker; selecting the
child shows the kind's editor.
Transformer Type Dropdown
The dropdown gets and sets the ITransformer behind the bound key. On mount, and
again whenever that key changes, it probes the object's type with getIndexType; picking a different
kind creates the replacement through POST /api/{Kind}/New unless the host supplied an onCreate
hook, in which case that hook runs instead so the owning domain object is rebound alongside the
IndexService entry.
Which kinds it offers is the allowedKinds prop, defaulting to all seven. A Control-Tree slot feeds
it from the node's ctx.allowedKinds; neither Tool House holder slot sets one, so all seven appear
there. The Topology column passes no restriction either — an axis role's transformer requirement is
enforced by the server, which answers AxisTransformerMismatch to a kind the role cannot take.
When the probed kind falls outside allowedKinds, both the active and the selected kind reset to
empty: the dropdown blanks, and the embedded form prints No transformer attached. in place of an
editor. The out-of-list transformer is not rendered.
Transformer Kinds
The web client offers seven kinds, one editor each.
| Kind | Editor | What the editor holds |
|---|---|---|
| StaticTranslation | StaticTranslationEditor.vue |
one Vec3 input, the constant offset |
| StaticRotation | StaticRotationEditor.vue |
axis Vec3 input (with Normalize), angle in degrees, pivot Vec3 input |
| StaticFreeform | StaticFreeformEditor.vue |
a 4×4 matrix grid with Identity and Invert (stored column-major, displayed row-major) |
| DynamicTranslation | DynamicTranslationEditor.vue |
axis Vec3 input (with Normalize) and a step in mm |
| DynamicRotation | DynamicRotationEditor.vue |
axis Vec3 input (with Normalize), angle in degrees, pivot Vec3 input |
| GeneralTransform | GeneralTransformEditor.vue |
a scale field over two embedded sub-transformer cards |
| NoTransform | NoTransformEditor.vue |
an identity-transform notice; no controls |
The picker offers no null entry: identity is expressed by choosing NoTransform.
Note
The GeneralTransform editor is a composition, not a flat form: a scale field,
then the StaticRotation and StaticTranslation editors
embedded in their own bordered cards, titled Rotation sub-transformer and Translation
sub-transformer. It keys the two sub-editors off POST /api/GeneralTransform/IndexRotation and
/IndexTranslation, edits the scale itself, and owns no vector widget — every
vec3d_t field on it comes from the nested editors. The effective transform is
T × R × scale × I.
Key Model
- ITransformer — the interface the slot holds and the dropdown swaps.
- StaticTranslation, StaticRotation, StaticFreeform, DynamicTranslation, DynamicRotation, GeneralTransform and NoTransform — the seven implementations the web picker lists.
- vec3d_t — the axis, pivot and translation fields the static and dynamic editors bind.
Source Code Path
See HiNC App Anatomy for git repository links.
The switchboard and its editors:
wwwroot-src/src/components/topo/TransformerSelectPanel.vue— the picker, the create call and the optional inline editor; propsmodelKey/label/allowedKinds/onCreate/selectorOnly, eventschanged/typeChanged/error.wwwroot-src/src/components/topo/transformerEditors.ts—TRANSFORMER_EDITORS, the single kind → editor map, plusisTransformerKind()andhumanizeTransformerKind().wwwroot-src/src/components/topo/StaticTranslationEditor.vuewwwroot-src/src/components/topo/StaticRotationEditor.vuewwwroot-src/src/components/topo/StaticFreeformEditor.vuewwwroot-src/src/components/topo/DynamicTranslationEditor.vuewwwroot-src/src/components/topo/DynamicRotationEditor.vuewwwroot-src/src/components/topo/GeneralTransformEditor.vuewwwroot-src/src/components/topo/NoTransformEditor.vue
The Control-Tree glue and the two direct embedders:
wwwroot-src/src/components/controlTree/TransformerSlotPanel.vue— the slot's panel: this switchboard in selector-only mode, fedallowedKindsandonCreatefrom the node context.wwwroot-src/src/components/controlTree/SoleEditorPanel.vue— the kind node's panel.wwwroot-src/src/components/controlTree/itemTypes.ts— registersTransformeras a slot type withbuildTransformerChildren, and each of the seven kinds againstSoleEditorPanel.wwwroot-src/src/components/controlTree/toolHouseItemTypes.ts— mints the freeform holder's two Transformer slots.wwwroot-src/src/components/mech/EquipmentTopologyPanel.vue— embeds the panel for the selected branch of the authored equipment; itsonCreateposts the candidate to{owner}/branch/{id}/update-transformerunderapi/mech/equipment-topology.wwwroot-src/src/components/geom/TransformationGeomEditor.vue— embeds it for the inner transformer of a wrapper nested inside a wrapper (older data); a slot's own transform is chosen withwwwroot-src/src/components/geom/GeometryTransformSelect.vueinstead.
The transport and the strings:
wwwroot-src/src/api/transformer.ts— theTransformerKindunion, the per-kind/api/{Kind}/Newcreate endpoints, and the typed wrappers for every update call, including the per-owner vector writes (UpdateTrans,UpdateAxis,UpdatePivot) and the threeNormalizeAxiscalls.wwwroot-src/src/i18n/en/topo.ts— every string on these panels, includingtopo.select.noTransformer. Transformer type names are identity and stay verbatim.
The REST controllers, one per kind:
Mech/Topo/StaticTranslationController.csMech/Topo/StaticRotationController.csMech/Topo/StaticFreeformController.csMech/Topo/DynamicTranslationController.csMech/Topo/DynamicRotationController.csMech/Topo/GeneralTransformController.cs— also servesIndexRotationandIndexTranslation.Mech/Topo/NoTransformController.cs—NewandGet; there is nothing on aNoTransformto update.
See Also
- Equipment Topology — the Equipment page's Topology column, whose branch editor mounts this switchboard for the authored equipment's branches
- Fixture Page — the part whose two placing branches are edited through this switchboard in the Topology column
- Freeform Holder Panel — the Tool House's two remaining Control-Tree Transformer slots
- Transform Picker — the picker that puts one of these kinds, less
NoTransform, on a geometry; the transformer row it grows resolves through this panel's editor map