refactor(demos): build the sample machine tools with GeneralXyzabcMachineTool.CreateFromChainCode and set the buckle and axis transformers through the machine

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-18 20:23:25 +08:00
co-authored by Claude Opus 5
parent 04bffeccaf
commit 65a8cce19e
2 changed files with 9 additions and 10 deletions
@@ -20,10 +20,10 @@ public static class DemoBuildMachineToolWithoutGeometrys
/// <returns>A configured but empty machine tool without solids.</returns>
public static GeneralXyzabcMachineTool GenEmptyMachineTool()
{
CodeXyzabcChain chain = new CodeXyzabcChain("[O][C][w];[O][X][Y][Z][B][S][t]");
if (chain.ToolBuckleTransformer is StaticTranslation st)
GeneralXyzabcMachineTool xyzabcMachineTool = GeneralXyzabcMachineTool.CreateFromChainCode(
"[O][C][w];[O][X][Y][Z][B][S][t]");
if (xyzabcMachineTool.ToolBuckleTransformer is StaticTranslation st)
st.Trans = new Vec3d(-200, 200, 400);
GeneralXyzabcMachineTool xyzabcMachineTool = new GeneralXyzabcMachineTool(chain);
return xyzabcMachineTool;
}
}