Class XyzabcChainCodeConvention
The XYZABC machine's conventions over chain code — what the notation of
ChainCodeUtil itself knows nothing about: the reserved
words w (table mount) and t (tool mount), both required,
X,Y,Z,A,B,C (the axes) and
S (the spindle, when t hangs from it), the default
transformers those branches are seeded with (axes on the root-to-w
path move negative and the others positive; the spindle turns about −Z
through its origin, so a positive angle is the M03 way and the tool turns
in place while the tool mount's offset is zero — a reader or builder that
moves the tool mount off S's origin moves the spindle's pivot with
it; the two mount arrivals carry an editable StaticTranslation;
any other word is a plain component), and the limb order the derived code
lists (table-mount limb first, tool-mount limb second). Reserved words
are matched exactly as written, so a word differing only in letter case
is a plain component. Orientation is topology: a machine lying on its
side is a code whose ground carries the rotation, not a flag.
public static class XyzabcChainCodeConvention
- Inheritance
-
XyzabcChainCodeConvention
- Inherited Members
Fields
DefaultChainCode
The classic 5-axis table-tilting layout used when no chain code is given.
public const string DefaultChainCode = "[O][Z][C][w];[O][Y][X][B][S][t]"
Field Value
SpindleWord
The reserved word of the spindle anchor, the one the tool mount hangs from.
public const string SpindleWord = "S"
Field Value
TableMountWord
The reserved word of the table mount anchor.
public const string TableMountWord = "w"
Field Value
ToolMountWord
The reserved word of the tool mount anchor.
public const string ToolMountWord = "t"
Field Value
Methods
DeriveChainCode(IMechanism)
The semicolon-joined form of DeriveChainCodes(IMechanism).
public static string DeriveChainCode(IMechanism m)
Parameters
mIMechanismThe machine.
Returns
- string
The joined code; empty when the machine has no root.
DeriveChainCodes(IMechanism)
Derives the machine's chain code segments (DeriveChainCodes(IMechanism, Func<IReadOnlyList<Anchor>, int>)) with the table-mount limb first, then the tool-mount limb, then any others.
public static List<string> DeriveChainCodes(IMechanism m)
Parameters
mIMechanismThe machine.
Returns
Seed(string, IReadOnlyList<string>, IMechanism, out Asmb, out Anchor, out Dictionary<Anchor, Solid>)
Seeds a machine's assembly, root and solid dictionary from chain code
segments: the topology by ChainCodeUtil, then the
convention — w and t must be named exactly (a near miss
in letter case is pointed out) and the axis and mount branches get
their default transformers — and finally the transformers (each with
the error-term mark of its branch) and solids of same-named components
carry over from carrySource
(CarryOver(IMechanism, Asmb, Dictionary<Anchor, Solid>)), authored data winning over
the defaults.
public static void Seed(string asmbName, IReadOnlyList<string> segments, IMechanism carrySource, out Asmb asmb, out Anchor root, out Dictionary<Anchor, Solid> anchorToSolid)
Parameters
asmbNamestringName of the assembly to create.
segmentsIReadOnlyList<string>The code segments.
carrySourceIMechanismA previous mechanism whose transformers and solids carry over by component name; null for none.
asmbAsmbThe seeded assembly.
rootAnchorThe root anchor: the code's first component.
anchorToSolidDictionary<Anchor, Solid>The solid dictionary: the carried-over solids, else empty.
Exceptions
- ArgumentException
The code is empty, malformed, disconnected, or lacks a mount.
Seed(string, string, IMechanism, out Asmb, out Anchor, out Dictionary<Anchor, Solid>)
Seeds a machine's assembly, root and solid dictionary from a semicolon-joined chain code; see the list overload.
public static void Seed(string asmbName, string chainCode, IMechanism carrySource, out Asmb asmb, out Anchor root, out Dictionary<Anchor, Solid> anchorToSolid)
Parameters
asmbNamestringName of the assembly to create.
chainCodestringThe joined code, split by SplitSegments(string).
carrySourceIMechanismA previous mechanism whose transformers and solids carry over by component name; null for none.
asmbAsmbThe seeded assembly.
rootAnchorThe root anchor: the code's first component.
anchorToSolidDictionary<Anchor, Solid>The solid dictionary: the carried-over solids, else empty.
Exceptions
- ArgumentException
The code is empty, malformed, disconnected, or lacks a mount.