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:
@@ -43,6 +43,9 @@ namespace Sample.MachineTool
|
|||||||
"[O][Y][X][C][w];[O][Z][B][S][t]");
|
"[O][Y][X][C][w];[O][Z][B][S][t]");
|
||||||
if (dst.ToolMountTransformer is StaticTranslation st)
|
if (dst.ToolMountTransformer is StaticTranslation st)
|
||||||
st.Trans = new vec3d_t(-72.40, 72.40, 176.44);
|
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);
|
dst.TransformerB.Pivot = new vec3d_t(-72.4, -177.4, 225.94);
|
||||||
Dictionary<string, Solid> solidMap = new Dictionary<string, Solid>()
|
Dictionary<string, Solid> solidMap = new Dictionary<string, Solid>()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user