Repository navigation
twinspindlekins: a mill-turn whose two spindles are two primary types - #4942
Open
grandixximo wants to merge 3 commits into
Open
grandixximo wants to merge 3 commits into
grandixximo wants to merge 3 commits into
Conversation
A head on X Y Z tilts the tool on B between a main spindle turning its part on C and a sub spindle facing it along Z and turning its own part on W, an ANGULAR axis. Type 0 works in the frame of the main spindle's part and orients the tool with C and B, type 1 in the frame of the sub spindle's part, the main one turned half a turn about X so its Z too points at the tool, and orients it with W and B; both are primary, so G12.1 picks the spindle and a program reads the same on either part. Type 2 is the identity and the machine frame. Written as pure functions of the parameter block, with work and tool frames and the orienting letters declared, so the interpreter solves the tilted work plane on either spindle. The joints read the gauge line with B at 0 and the tool length goes along the tool, as on 5axiskins. tests/kins-params checks both working types against realtime.
A vismach sim of twinspindlekins, the spindle line across the screen, with a demo program that drills a ring of tilted holes into the part in the main spindle and then into the part in the sub spindle through one subroutine. It names no rotary: G53.3 turns the ones the type in force orients with, and the report reads them as #<_kins_orient_1> and #<_kins_orient_2>, C and B on one spindle, W and B on the other, with their angles as #<_orient_rot1> and #<_orient_rot2>. tests/twinspindle checks the orienting axes of each type, that the same tilted hole solves and is reached on either spindle, the tip on the hole and the tool along its axis, and that the demo program runs.
Like the five axis sims: the INI sets MACHINE_MOVES_IN_MACHINE_FRAME with a comment, and the README says so, so G53 puts the slides in the same place on either spindle's type whatever the tool and the head angle. The demo program and tests/twinspindle (its own test.ini) use no G53, G28 or G30 off the machine frame type.
BsAtHome
reviewed
Dec 1, 2026
Comment on lines
+3
to
+4
| net :jx joint.0.pos-fb twinspindlegui.jx | ||
| net :jy joint.1.pos-fb twinspindlegui.jy |
Comment on lines
+107
to
+110
| # a table and a head, two primaries: one rotary turns the tool, so no | ||
| # pair, and that one names the pose | ||
| run "twinspindlekins coordinates=XYZBCW" \ | ||
| "setp twinspindlekins.pivot-length 120 |
Contributor
There was a problem hiding this comment.
Adding these to the same test will make it slower to run. The old version is already almost 9 seconds and adding to it will just make it slower.
Wouldn't it be better to split these tests so that they can run in parallel?
Comment on lines
+16
to
+17
| PROGRAM = os.path.abspath("../../configs/sim/axis/vismach/twinspindle/twin-spindle-holes.ngc") | ||
|
|
Contributor
There was a problem hiding this comment.
This cannot run on an installed system? How are you sure that you have access to this file?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split out of #4889 as Bertho asked; it needs the orienting axes that went in there.
twinspindlekinsis a mill-turn: a head on X Y Z tilts the tool on B between a main spindle turning its part on C and a sub spindle facing it along Z, turning its part on W. Type 0 works in the main spindle's part frame and orients with C and B, type 1 in the sub spindle's part frame and orients with W and B. Both are primary, so G12.1 picks the spindle and the same program runs on either part. Type 2 is the identity and the machine frame.The vismach sim
configs/sim/axis/vismach/twinspindledrills a ring of tilted holes into the part in each spindle through one subroutine that names no rotary: G53.3 turns whichever pair the type in force orients with. The INI setsMACHINE_MOVES_IN_MACHINE_FRAME, as the five axis sims do.Tests:
tests/kins-paramschecks both working types against realtime.tests/twinspindle(new, for the new module) checks the orienting axes of each type, that the same tilted hole solves and is reached on either spindle with the tip on the hole and the tool along its axis, and that the demo program runs.