Ncam and Lathemacros conflict
- tuxcnc
- Offline
- Elite Member
-
Less
More
- Posts: 215
- Thank you received: 39
07 Aug 2026 14:30 #348532
by tuxcnc
Ncam and Lathemacros conflict was created by tuxcnc
You can install ncam and lathemacros together, but only lathemacros will works properly.
The cause is use the same names for different subroutines:(I removed results not matter.)
You can recognize ncam's files by "(author : Fernand Veilleux)" comment, thats lack in lathemacro's.
Ncam (Python 3.0)) works properly and generates good g-code, but LinuxCNC uses subroutines that found first...
This causes horrible and confusing errors, like :But actually there is no error in ncam.ngc, but only wrong subroutine file is used...
The solution is very simple (rename subroutines and change some lines in python sources), but this must be done by the authors, not by users...
The cause is use the same names for different subroutines:
root@HP-15:~/linuxcnc/configs/sim-lathe# ls -ln *.ngc
-rw-r--r-- 1 0 0 1182 2026-01-07 boring.ngc
-rw-r--r-- 1 0 0 595 2026-01-07 facing.ngc
-rw-r--r-- 1 0 0 1151 2026-01-07 radius.ngc
-rw-r--r-- 1 0 0 1037 2026-01-07 threading.ngc
-rw-r--r-- 1 0 0 1184 2026-01-07 turning.ngc
root@HP-15:~/linuxcnc/configs/sim-lathe/ncam/lib/lathe# ls -ln *.ngc
-rw-r--r-- 1 0 0 1891 04-20 18:51 boring.ngc
-rw-r--r-- 1 0 0 1491 04-20 18:51 facing.ngc
-rw-r--r-- 1 0 0 3781 04-20 18:51 radius_od.ngc
-rw-r--r-- 1 0 0 3334 04-20 18:51 threading.ngc
-rw-r--r-- 1 0 0 4678 04-20 18:51 turning.ngcYou can recognize ncam's files by "(author : Fernand Veilleux)" comment, thats lack in lathemacro's.
Ncam (Python 3.0)) works properly and generates good g-code, but LinuxCNC uses subroutines that found first...
This causes horrible and confusing errors, like :
G-code error in ncam.ngc
Near line 101 of
~/linuxcnc/nc_files/ncam.ngc
Negative word usedThe solution is very simple (rename subroutines and change some lines in python sources), but this must be done by the authors, not by users...
Please Log in or Create an account to join the conversation.
- tuxcnc
- Offline
- Elite Member
-
Less
More
- Posts: 215
- Thank you received: 39
17 Aug 2026 20:09 - 17 Aug 2026 20:12 #348821
by tuxcnc
Replied by tuxcnc on topic Ncam and Lathemacros conflict
I see no one is interested... But I did it for myself, so I'll share it.
I decided to change github.com/andypugh/LatheMacros/tree/Py3_GTK3 because it contains errors and is dangerous.
In short, the author used the modal codes g95 and g96, which is fine, but he did not cancel them at the end of the subroutine.
After completing the cycle, LinuxCNC remains with active G95 and G96 codes, and believe me, 100 mm/min and 100 mm/rev are not the same and making a move in MDI, for example, may end in a disaster.
Since the archive contains a very large LatheMacro.svg file and I wanted to keep everything as a whole, I had to cut the tbz archive into smaller pieces so that I could post them here as attachments.
You cannot unpack these files normally, you have to do it like this:
I decided to change github.com/andypugh/LatheMacros/tree/Py3_GTK3 because it contains errors and is dangerous.
In short, the author used the modal codes g95 and g96, which is fine, but he did not cancel them at the end of the subroutine.
After completing the cycle, LinuxCNC remains with active G95 and G96 codes, and believe me, 100 mm/min and 100 mm/rev are not the same and making a move in MDI, for example, may end in a disaster.
Since the archive contains a very large LatheMacro.svg file and I wanted to keep everything as a whole, I had to cut the tbz archive into smaller pieces so that I could post them here as attachments.
You cannot unpack these files normally, you have to do it like this:
cat LatheMacros-Py3_GTK3_renamed.a* | tar xzvf -Attachments:
Last edit: 17 Aug 2026 20:12 by tuxcnc. Reason: unknown error
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.157 seconds