Table of Contents

Namespace Hi.NcMech.Xyzabc

Classes

GeneralXyzabcMachineTool

An XYZABC machine tool: a mechanism that owns its key assembly, its root anchor and the solids hung on its anchors, and names which of its own elements play the machine's roles — the table and tool mount anchors (TableMount, ToolMount) and the six axis branches (AxisX … AxisC). The axis and mount transformers are the ones on those branches; the transformer properties only delegate to them.

The roles are the user's to set: each is a property taking any anchor (a mount) or inner branch (an axis) of the machine's own assembly, or null to unbind. A machine built from chain code, adopted from a topology or read from a legacy file resolves them by name: the direct child anchors w and t, and the branches X,Y,Z,A,B,C (for a mount the first anchor of that name, for an axis the last branch). When no element carries the exact name, the one element whose name matches ignoring letter case is bound, with a message; several such elements bind none, with a message; a mount nothing matches stays unbound, with a message, and the machine still loads.

The spindle (Spindle) is a ninth role, found by topology rather than by name: the branch arriving at the anchor the tool mount hangs from (S in [B][S][t]), taken only when it carries a DynamicRotation whose axis runs along the tool mount's Z axis (IsSpindleOnToolAxis()) and it plays no axis role. A machine whose spindle branch carries anything else — the NoTransform most machines were built with, a gauge-line StaticTranslation — leaves the role unbound and plays as it always did; a rotation off the tool axis is reported and left unbound too, as turning it would swing the tool around.

Reading takes, in this order, the embedded topology (<Asmb>, <Root>, <AnchorToSolid>, see MechanismXml), a legacy <GeneralMechanism> (inline or a side file), the legacy <XyzabcChain> wrapper (a mechanism-backed or a chain-code chain, inline or a side file), or a bare <ChainCode>. Writing always embeds the topology in one MechanismXml section; there is no separate element for any transformer. The nine roles are written next to it, each under its own element name (<TableMount>, <ToolMount>, <AxisX> … <AxisC>, <Spindle>) naming the element by Guid, an unbound role as an empty element. On reading an embedded file, a role element naming an element by Guid binds it (a Guid the topology lacks leaves the role unbound, with a message; a spindle off the tool axis is bound as recorded, with a message); a role element absent — a file written before the roles were persisted — falls back to the name convention above (the topology rule for the spindle), and so does an empty mount element (nothing was bound when the file was written, a state no machine runs in); an empty axis or spindle element leaves the role unbound silently, so a role unbound on purpose stays so even when a branch carries its letter.

Interfaces

IXyzabcMachineTool

An XYZABC machine tool: a machining chain (IMachiningChain, so an IMechanism with its two mount anchors) whose machine coordinates are the six axes of IXyzabcAxes, displayable, named, and carrying its collision pairs; besides the members of the interfaces it combines, it names the spindle's rotation, which is not a machine coordinate.