|
From: Luca T. <no...@gi...> - 2026-10-11 09:41:06
|
Branch: refs/heads/master Home: https://github.com/LinuxCNC/linuxcnc Commit: 91f28b6844b048f4d0436dcd8053848c45ed9392 https://github.com/LinuxCNC/linuxcnc/commit/91f28b6844b048f4d0436dcd8053848c45ed9392 Author: Luca Toniolo <107...@us...> Date: 2026-10-02 (Fri, 02 Oct 2026) Changed paths: M docs/src/config/python-interface.adoc M docs/src/gcode/g-code.adoc A docs/src/gcode/images/g68-2-plane.svg M docs/src/gcode/overview.adoc M lib/python/preview_helpers.py M lib/python/rs274/glcanon.py M lib/python/rs274/interpret.py M src/emc/nml_intf/canon.hh M src/emc/nml_intf/emc.cc M src/emc/nml_intf/emc.hh M src/emc/nml_intf/emc_nml.hh M src/emc/nml_intf/emcops.cc M src/emc/rs274ngc/Submakefile M src/emc/rs274ngc/gcode_renderer.cc M src/emc/rs274ngc/gcode_renderer.hh M src/emc/rs274ngc/gcodemodule.cc M src/emc/rs274ngc/gcodemodule.hh M src/emc/rs274ngc/interp_array.cc M src/emc/rs274ngc/interp_check.cc M src/emc/rs274ngc/interp_convert.cc M src/emc/rs274ngc/interp_find.cc M src/emc/rs274ngc/interp_internal.cc M src/emc/rs274ngc/interp_internal.hh M src/emc/rs274ngc/interp_namedparams.cc M src/emc/rs274ngc/interp_remap.cc M src/emc/rs274ngc/interp_setup.cc A src/emc/rs274ngc/interp_workplane.cc M src/emc/rs274ngc/interp_write.cc M src/emc/rs274ngc/rs274ngc_interp.hh M src/emc/rs274ngc/rs274ngc_pre.cc M src/emc/sai/saicanon.cc M src/emc/task/emccanon.cc M src/emc/task/emctaskmain.cc M src/emc/usr_intf/axis/extensions/emcmodule.cc M src/emc/usr_intf/axis/scripts/axis.py M src/emc/usr_intf/halui.cc M tests/gcode-renderer/programs.py M tests/gcode-renderer/test_transform.py A tests/interp/g68-frame/expected A tests/interp/g68-frame/g68.ngc A tests/interp/g68-frame/test.sh A tests/interp/g68-words/expected A tests/interp/g68-words/test.sh A tests/remap/g68-override/expected A tests/remap/g68-override/r682.ngc A tests/remap/g68-override/r684.ngc A tests/remap/g68-override/r69.ngc A tests/remap/g68-override/test.ini A tests/remap/g68-override/test.ngc A tests/remap/g68-override/test.sh A tests/workplane-preview/compose.ngc A tests/workplane-preview/expected A tests/workplane-preview/move.ngc A tests/workplane-preview/test-ui.py A tests/workplane-preview/test.ini A tests/workplane-preview/test.sh Log Message: ----------- interpreter: add the tilted work plane, G68.2, G68.4 and G69 A frame composed inside the offset chain, so the blocks between a definition and its cancel are programmed in the tilted plane while G54 itself is untouched: world = TLO + G5x + Rz(rotation_xy) * (G92 + O + R * program) O and R are the plane's origin and rotation in the coordinate system active when it was defined; rotary and UVW words do not pass through it. G68.2 takes the Fanuc forms: three angles about the axes Q names (P0 Euler, P1 fixed axes), three points over up to four blocks (P2, the origin on the first point, shifted by Q0 along the plane's own axes, R on any one block), two vectors over two blocks (P3, the X direction kept as given and the normal squared to it, refused 5 degrees or more off square, as Fanuc does), each with an R about the plane's own Z. G68.4 composes any of those onto the active plane. G69 cancels; so do init, M2 and M30. An abort cancels it and tells canon even when the read ahead had already cancelled: status carries the plane the executed canon stream last set, and an abort throws the queued G69 away, so the two disagree until canon is told. An explicit G69 tells canon either way. The state tag restore that runs before it drops the read ahead's plane when the tag brings back another coordinate system, which that plane would refuse, leaving the interpreter in the read ahead's work offset while the machine is in the tag's. Canon gains SET_G68_FRAME and the frame stage in rotate_and_offset_pos() and its inverse, so positions, probe results and arcs follow the plane. Task status carries g68_offset, g68_rotation and g68_active; the python canons, AXIS and halui apply it. While a plane is active G92, G52, G10 L2/L20/L10/L11 and a coordinate system change are refused, since each defines the system the plane sits on. Each form takes only the words it reads; any other (I J K with P2, R off its block, X Y Z on the P3 Q2 block, A B C U V W anywhere) is refused rather than ignored. A P2 or P3 definition left unfinished in MDI is dropped when a program is opened. The previews restate the plane in effect on the machine as a full G68.2 block from status, on the machine's coordinate system, since the bare code in the active G-codes cannot carry it. A REMAP of G68.2, G68.4 or G69 still takes over the built-in code, so configs that bring their own, like the nutating TWP sims, keep working. Tests: tests/interp/g68-words, tests/remap/g68-override, tests/workplane-preview. Both reported by Sigma1912. Commit: e1d17578f2265cdbbbc8e77115c4730a5d31be5b https://github.com/LinuxCNC/linuxcnc/commit/e1d17578f2265cdbbbc8e77115c4730a5d31be5b Author: Luca Toniolo <107...@us...> Date: 2026-10-03 (Sat, 03 Oct 2026) Changed paths: M docs/src/gcode/g-code.adoc M lib/python/rs274/glcanon.py M lib/python/rs274/glcanon_scene.py M src/emc/rs274ngc/gcode_renderer.cc M src/emc/rs274ngc/gcode_renderer.hh M tests/gcode-renderer/canon.py M tests/glcanon/test.sh A tests/glcanon/test_workplane.py Log Message: ----------- glcanon: draw the tilted work planes a program defines Where a program's G68.2 planes sit is the hardest thing to check by reading it, so the preview draws each: a rectangle lying in the plane over the moves made under it, with a margin, the plane's X, Y and Z at the centre of the rectangle in the machine axis colours, and a cross at the plane's origin, which need not lie in the rectangle: a program drilling a sphere puts every origin at the centre and works out on the surface. The rectangle sits at the plane's Z where the program reaches it and otherwise at the nearest end of the Z range worked in, so a drilling cycle shows its holes; a plane nothing moved under gets a square a tenth of the program. A plane restated in a loop is one plane. The plane in effect on the machine, what status reports the last executed G68.2 set, is drawn over the others in its own colour, so the plane the program is in stands out; an MDI plane shows the same way. The renderer already receives every plane through set_g68_frame(); it records each as a WorkPlaneRecord, origin and axes through its transform like a move endpoint, every move under it extends the extents, and the records reach the canon with the rest of the program, as glcanon_scene.WorkPlane. WorkPlanePart draws them in the program's frame through gcode.display_points(), the GEOMETRY transform for points that are not a parse's, gated by show_workplane, colours 'workplane' and 'workplane_active'. Suggested by Sigma1912. tests/glcanon/test_workplane.py, on parsed programs; docs in the G68.2 section. Commit: 420b1189b55861aff49b91d9c45932e068c319b5 https://github.com/LinuxCNC/linuxcnc/commit/420b1189b55861aff49b91d9c45932e068c319b5 Author: Luca Toniolo <107...@us...> Date: 2026-10-03 (Sat, 03 Oct 2026) Changed paths: M configs/sim/axis/vismach/5axis/table-rotary_spindle-rotary-nutating/python/remap.py Log Message: ----------- nutating sim remap: build the G68.2 planes the way Fanuc and the native code do The sim's remap and the native G68.2 built different planes from the same program in four places, and the remap refused one program the native code accepts; the remap's G68.2 and G68.4 now follow the native code, which follows the Fanuc 0i-F operator manual (B-64604EN-2, 5.7.1): - R turned the plane about the work Z; it now turns it about the plane's own Z, in every form. - The three-point form (P2) took Q0's X Y Z as the origin in the work coordinates. The origin is now the first point, and Q0, which may be left out, shifts it along the plane's own axes. R may be given on any one block; R on two blocks is refused, as natively, since the manual does not say which would win. - The two-vector form (P3) read the X vector as a point and subtracted the origin from it, and it took Q0 and Q1 where Fanuc takes Q1 and Q2. It now takes Q1 and Q2, reads I J K as a direction, keeps X as given, squares the normal to it and refuses vectors 5 degrees or more off square, or a zero vector. - G68.4 refused to build on a plane that was defined but not yet activated with G53.n. Like the native code, it now needs only a defined plane. Commit: 669e3ea5234aa69ae593c23948bf11aa25c2119d https://github.com/LinuxCNC/linuxcnc/commit/669e3ea5234aa69ae593c23948bf11aa25c2119d Author: Luca Toniolo <107...@us...> Date: 2026-10-03 (Sat, 03 Oct 2026) Changed paths: M docs/src/gcode/g-code.adoc M src/emc/rs274ngc/interp_convert.cc M src/emc/rs274ngc/interp_internal.hh M src/emc/rs274ngc/interp_setup.cc M src/emc/rs274ngc/interp_workplane.cc M src/emc/rs274ngc/rs274ngc_interp.hh M tests/interp/g68-frame/expected M tests/interp/g68-frame/g68.ngc M tests/interp/g68-words/expected M tests/interp/g68-words/test.sh Log Message: ----------- interpreter: G52 in a tilted work plane shifts the plane along its own axes The Fanuc 0i-F operator manual (B-64604EN-2, 5.7.1.2) puts the local coordinate system inside the feature coordinate system: G52 given during tilted working plane indexing translates the plane along the plane's own X, Y and Z, and a new G68.2 while a G52 shift is in effect is an alarm. G52 was refused inside a plane until now; it now does that, which completes the chain: world = TLO + G5x + Rz(rotation_xy) * (G92 + O + R * (L + program)) L is kept apart from G92: G52 and G92 share their storage and their parameters, and a G52 given before the plane, which stays under it in G92, must not move with it. G52 in a plane takes X, Y and Z only, each word replacing its part of L as G52 does, writes no parameters, and is dropped by G69. G68.2 and G68.4 are refused while L is not zero, as on Fanuc. Canon and status carry the plane with L applied to its origin, so nothing outside the interpreter changes. G92 and the rest stay refused in a plane. Raised by Sigma1912. Commit: 36950db65d0aef76e6222b550aadb5181d61deb0 https://github.com/LinuxCNC/linuxcnc/commit/36950db65d0aef76e6222b550aadb5181d61deb0 Author: Luca Toniolo <107...@us...> Date: 2026-10-03 (Sat, 03 Oct 2026) Changed paths: M docs/src/config/ini-config.adoc M docs/src/gcode/g-code.adoc M docs/src/gcode/m-code.adoc M src/emc/nml_intf/canon.hh M src/emc/rs274ngc/gcodemodule.cc M src/emc/rs274ngc/interp_convert.cc M src/emc/rs274ngc/interp_internal.hh M src/emc/rs274ngc/interp_setup.cc M src/emc/rs274ngc/interp_workplane.cc M src/emc/rs274ngc/rs274ngc_interp.hh M src/emc/rs274ngc/rs274ngc_pre.cc M src/emc/sai/saicanon.cc M src/emc/task/emccanon.cc A tests/workplane-retain/clear.ini A tests/workplane-retain/end.ngc A tests/workplane-retain/expected A tests/workplane-retain/g55.ngc A tests/workplane-retain/g55plane.ngc A tests/workplane-retain/readahead.ngc A tests/workplane-retain/slow.ngc A tests/workplane-retain/test-ui.py A tests/workplane-retain/test.ini A tests/workplane-retain/test.sh Log Message: ----------- interpreter: [RS274NGC]RETAIN_WORK_PLANE keeps the tilted work plane through M2 and an abort An operator who sets the plane up in MDI and runs a program that does not set one loses it at the program's M2 and at every abort. Fanuc has the same default and parameter 5400#2 D3R to keep the plane through a reset; RETAIN_WORK_PLANE = 1 is that switch. It is off by default: a plane left over from an earlier job turns every move of the next one. A restart still clears the plane, as a power cycle does on Fanuc, and nothing is written to the var file. At M2 and M30 the plane stays where it is in the coordinate system, and the coordinate system changes under it as the end of a program changes it (G54 unless DISABLE_AUTO_G54, G92 cleared with DISABLE_G92_PERSISTENCE); the current point is taken through the chain so the tool does not move. After an abort the interpreter's plane is the read ahead's, which may be a later plane, a later G69, or none, so the plane kept is the one the machine was in: GET_EXTERNAL_G68_FRAME() reads it from status, which follows the executed commands. It answers no plane if the read ahead has left the coordinate system under it different from the machine's, and sai and the preview answer that there is no machine to ask, so the interpreter keeps its own. A G52 given in the plane survives when the machine was still in the plane the interpreter has; otherwise status, which only has the shifted origin, folds it into the origin. With the setting on, an ON_ABORT_COMMAND runs inside the plane. tests/workplane-retain runs the same cases with and without the setting: M2, an abort with the read ahead in the next plane, past a G55, in a plane on G55, and with a G52 in the plane, each checked by moving to the plane's origin afterwards. Raised by Sigma1912. Commit: 9106761aabd614472a5a799b312f0940324d31a6 https://github.com/LinuxCNC/linuxcnc/commit/9106761aabd614472a5a799b312f0940324d31a6 Author: Luca Toniolo <107...@us...> Date: 2026-10-03 (Sat, 03 Oct 2026) Changed paths: M docs/src/gcode/g-code.adoc M src/emc/rs274ngc/interp_convert.cc M src/emc/rs274ngc/interp_internal.hh M src/emc/rs274ngc/interp_workplane.cc M tests/interp/g68-frame/expected M tests/interp/g68-frame/g68.ngc M tests/workplane-retain/expected M tests/workplane-retain/test-ui.py Log Message: ----------- interpreter: a change of coordinate system in a tilted work plane takes the plane along G54 to G59.3 were refused while a plane was active. Fanuc refuses them too by default, but with parameter 1205#6 3TW set the work offset changes and the plane keeps its shift relative to it (0i-F operator manual B-64604EN-2, 5.7.1.2); the manual's example is the same tilted feature on several fixtures, one G68.2 and a G55, G56, G57 before each. A program written for the default never changes the system in a plane, since it would alarm, so allowing it only gives the refusal a meaning and needs no setting. The plane's origin and rotation stay as they are in the coordinate system, so the plane moves with the work offset and turns with its XY rotation. The current point goes through the whole chain before and after, the plane included, so the tool does not move; canon and status need nothing new, since they already compose the plane inside the work offset. G92, G10 L2/L20/L10/L11 stay refused: they change the system under the plane rather than select another. An ON_ABORT_COMMAND that cycles work offsets now runs inside a plane kept by RETAIN_WORK_PLANE. tests/interp/g68-frame switches from G55 to a G56 turned 90 degrees and checks the plane origin lands where it should; tests/workplane-retain checks the same on a running machine. Commit: 56ac1b64a016ef605600c2a470349163186aef09 https://github.com/LinuxCNC/linuxcnc/commit/56ac1b64a016ef605600c2a470349163186aef09 Author: Luca Toniolo <107...@us...> Date: 2026-10-11 (Sun, 11 Oct 2026) Changed paths: M configs/sim/axis/vismach/5axis/table-rotary_spindle-rotary-nutating/python/remap.py M docs/src/config/ini-config.adoc M docs/src/config/python-interface.adoc M docs/src/gcode/g-code.adoc A docs/src/gcode/images/g68-2-plane.svg M docs/src/gcode/m-code.adoc M docs/src/gcode/overview.adoc M lib/python/preview_helpers.py M lib/python/rs274/glcanon.py M lib/python/rs274/glcanon_scene.py M lib/python/rs274/interpret.py M src/emc/nml_intf/canon.hh M src/emc/nml_intf/emc.cc M src/emc/nml_intf/emc.hh M src/emc/nml_intf/emc_nml.hh M src/emc/nml_intf/emcops.cc M src/emc/rs274ngc/Submakefile M src/emc/rs274ngc/gcode_renderer.cc M src/emc/rs274ngc/gcode_renderer.hh M src/emc/rs274ngc/gcodemodule.cc M src/emc/rs274ngc/gcodemodule.hh M src/emc/rs274ngc/interp_array.cc M src/emc/rs274ngc/interp_check.cc M src/emc/rs274ngc/interp_convert.cc M src/emc/rs274ngc/interp_find.cc M src/emc/rs274ngc/interp_internal.cc M src/emc/rs274ngc/interp_internal.hh M src/emc/rs274ngc/interp_namedparams.cc M src/emc/rs274ngc/interp_remap.cc M src/emc/rs274ngc/interp_setup.cc A src/emc/rs274ngc/interp_workplane.cc M src/emc/rs274ngc/interp_write.cc M src/emc/rs274ngc/rs274ngc_interp.hh M src/emc/rs274ngc/rs274ngc_pre.cc M src/emc/sai/saicanon.cc M src/emc/task/emccanon.cc M src/emc/task/emctaskmain.cc M src/emc/usr_intf/axis/extensions/emcmodule.cc M src/emc/usr_intf/axis/scripts/axis.py M src/emc/usr_intf/halui.cc M tests/gcode-renderer/canon.py M tests/gcode-renderer/programs.py M tests/gcode-renderer/test_transform.py M tests/glcanon/test.sh A tests/glcanon/test_workplane.py A tests/interp/g68-frame/expected A tests/interp/g68-frame/g68.ngc A tests/interp/g68-frame/test.sh A tests/interp/g68-words/expected A tests/interp/g68-words/test.sh A tests/remap/g68-override/expected A tests/remap/g68-override/r682.ngc A tests/remap/g68-override/r684.ngc A tests/remap/g68-override/r69.ngc A tests/remap/g68-override/test.ini A tests/remap/g68-override/test.ngc A tests/remap/g68-override/test.sh A tests/workplane-preview/compose.ngc A tests/workplane-preview/expected A tests/workplane-preview/move.ngc A tests/workplane-preview/test-ui.py A tests/workplane-preview/test.ini A tests/workplane-preview/test.sh A tests/workplane-retain/clear.ini A tests/workplane-retain/end.ngc A tests/workplane-retain/expected A tests/workplane-retain/g55.ngc A tests/workplane-retain/g55plane.ngc A tests/workplane-retain/readahead.ngc A tests/workplane-retain/slow.ngc A tests/workplane-retain/test-ui.py A tests/workplane-retain/test.ini A tests/workplane-retain/test.sh Log Message: ----------- Merge pull request #4600 from grandixximo/twp-plane interp: the tilted work plane, G68.2, G68.4 and G69 Compare: https://github.com/LinuxCNC/linuxcnc/compare/85f75dfde431...56ac1b64a016 To unsubscribe from these emails, change your notification settings at https://github.com/LinuxCNC/linuxcnc/settings/notifications |