GeomCombination Editor
A GeomCombination is several geometries treated as one, and it has two faces: an inline editor that renders every child's own editor at once, and a Control-Tree panel that manages the list only and puts each child on its own node. There is no selection model on either — every child carries its own remove button.
Layout
The inline editor
- Add bar — a child-kind picker beside an Add button, and a Clear all button.
- One card per child, each with a
#nindex badge, the child's type name, its own remove button, and — in the card body — that child's full editor, rendered recursively. All children are editable at once.
The Control-Tree panel
Deliberately shallow: a list of read-only rows with Add, a per-row remove and Clear all, and a
standing hint that an Item child node is where a child is actually edited. No editor is embedded
here; each child is its own Item node — .../item-{index} — under this one.
Adding a Child
Pick the kind first, then Add; the request carries the kind.
Five kinds may be children — Box3d, Cylindroid, StlFile, TransformationGeom and a nested
GeomCombination, so combinations nest arbitrarily deep. CubeTreeFile and ExtendedCylinder are
accepted by neither switch.
Behavior
- A type switch rewires the slot, not just the alias. Changing a child's kind goes through
SetItemAt, which replaces the entry in StlSources itself. - The aggregate STL is cached, and a child's own controller does not invalidate it. Editing a
child through its own endpoints leaves the combination returning the mesh it had already built, so
both faces call
CleanCachebefore bubbling the change, and compose that call into the ancestor chain. This is the behavioural fact the rest of the page depends on. - Removing a child does not renumber the ones after it. Item keys are minted as
{key}-item-{index}and the remove endpoint leaves later indices pointing at the old aliases, which is why every structural change rebuilds the branch and re-mints them. - Clear all is posted directly, with no confirmation.
Source Code Path
See HiNC App Anatomy for git repository links.
HiNC-2025-webservice (Quasar CLI SPA):
wwwroot-src/src/components/geom/GeomCombinationEditor.vue— the inline face: the Add bar, the per-child cards, and the recursive editor in each. Type switches route throughSetItemAt, a cache clean precedes everychangedbubble, and item aliases are released on refresh and unmount.wwwroot-src/src/components/controlTree/GeomCombinationTreePanel.vue— the Control-Tree face: list management only, emitting a structure change so the host re-mints the item aliases.wwwroot-src/src/components/controlTree/itemTypes.ts— registers the kind against that panel with a child builder that mints oneItemnode per element, and declares the five container kinds a child may be.wwwroot-src/src/components/geom/geometryEditors.ts— maps theGeomCombinationkind to the inline editor.wwwroot-src/src/components/geom/GeometryEditor.vue— the recursive kind picker each child card embeds.wwwroot-src/src/components/controlTree/GeometrySlotPanel.vueandwwwroot-src/src/components/controlTree/SoleEditorPanel.vue— anItemnode's picker and, once a kind is chosen, that kind's editor.wwwroot-src/src/components/geom/TransformationGeomEditor.vue— the nesting host: a combination is an allowed inner geometry.wwwroot-src/src/components/controlTree/useControlTreeHost.ts,wwwroot-src/src/pages/MechBuilderPage.vueandwwwroot-src/src/components/toolhouse/UpperBeamDiv.vue— the slots that admit the kind: the fixture geometry, the workpiece raw geometry, a mechanism anchor's geometry and the cutter upper beam. The workpiece's target geometry deliberately does not.wwwroot-src/src/api/geometry.ts—getGeomCombination,addGeomCombinationItem,setGeomCombinationItemAt,removeGeomCombinationItemAt,clearGeomCombination,cleanGeomCombinationCacheandindexGeomCombinationItemAt, with the child-kind and combination types and the create entry.wwwroot-src/src/api/index-service.ts— the index release the editor uses to drop item aliases.wwwroot-src/src/i18n/en/geom.ts— thecombination.*strings, andwwwroot-src/src/i18n/en/tree.ts— the tree panel's own strings and theItemnode label.Geom/GeomCombinationController.cs— REST endpoints at/api/GeomCombination/*:New,Get,GetCount,AddItem,SetItemAt,RemoveItemAt,Clear,CleanCache,IndexItemAtandGetItemTypeAt.AddItemandSetItemAtshare one five-arm kind switch and both clean the cache.Geom/TransformationGeomController.cs,Mech/FixtureController.cs,Mech/WorkpieceController.cs,Mech/MechBuilder/GeneralMechanismController.csandMech/CutterController.cs— the container-aware create switches behind each host'sonCreate.
See Also
- Geometry Editor — the switchboard that offers this kind, and the panel each child card embeds