fix(demos): DemoBuildMachineTool puts the spindle's pivot on the tool-mount offset

CreateFromChainCode now seeds S with a DynamicRotation about -Z through S's origin (the spindle
role); the sample moves the tool mount to (-72.40, 72.40, 176.44) right after, so it moves the
spindle's pivot there too -- otherwise turning the spindle would swing the tool around S's origin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 16:42:52 +08:00
co-authored by Claude Fable 5.1
parent 46bfea4a87
commit a03aa1c1ff
+3
View File
@@ -43,6 +43,9 @@ namespace Sample.MachineTool
"[O][Y][X][C][w];[O][Z][B][S][t]");
if (dst.ToolMountTransformer is StaticTranslation st)
st.Trans = new vec3d_t(-72.40, 72.40, 176.44);
//the spindle turns the tool about its own axis: the rotation's pivot
//sits on the tool mount's origin, where the offset above moved it.
dst.SpindleTransformer.Pivot = new vec3d_t(-72.40, 72.40, 176.44);
dst.TransformerB.Pivot = new vec3d_t(-72.4, -177.4, 225.94);
Dictionary<string, Solid> solidMap = new Dictionary<string, Solid>()
{