LatheEasyStep – experimental QtVCP macro for step-by-step lathe programming

  • aDm1N
  • aDm1N's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 Dec 2025 12:19 - 15 Dec 2025 12:51 #340123 by aDm1N
Hi all,

I want to share an experimental QtVCP macro I am currently working on:
LatheEasyStep.

It is embedded into the QtDragon lathe panel and aims to simplify
lathe programming by replacing manual G-code writing with a structured,
step-by-step workflow (facing, contouring, parting, threading, drilling,
keyways, etc.).

Each operation is configured in its own tab with tool, spindle, feed,
coolant and geometry parameters. The macro then generates a complete
lathe program, including comments and basic safety moves.

Important notes:
- This project is NOT finished.
- The G-code generation still needs restructuring and improvement.
- I built the first working version with the help of AI, then refined it
  manually. I am very aware that this often leads to suboptimal structure,
  which is exactly why I am asking for feedback.

What I am especially looking for:
- Suggestions for a cleaner G-code generation architecture
- Common LinuxCNC lathe pitfalls I should explicitly handle
- Ideas for improving safety, validation, and workflow
- General QtVCP / QtDragon best practices

The project is GPL licensed and available here:
github.com/peter-pan08/LatheEasyStep

Critical feedback is explicitly welcome. I am more interested in doing it
right than doing it quickly.

Thanks in advance!

 
Attachments:
Last edit: 15 Dec 2025 12:51 by aDm1N. Reason: add pic
The following user(s) said Thank You: tommylight, besriworld

Please Log in or Create an account to join the conversation.

More
15 Dec 2025 13:53 #340127 by cmorley
This should be moved to the Qtvcp section.
Looks promising! Keep is updated! If you get stumped with the programming i can try to help.

Please Log in or Create an account to join the conversation.

  • aDm1N
  • aDm1N's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
15 Dec 2025 14:15 #340128 by aDm1N
I've never moved anything in a forum before, how do I do that?

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
15 Dec 2025 14:22 #340129 by tommylight

This should be moved to the Qtvcp section..

Done.
Thank you.

Please Log in or Create an account to join the conversation.

More
19 Dec 2025 13:38 #340302 by Surmetall
Hi,
this looks really cool, thanks for sharing! I’ll definitely be testing it once my lathe is ready.

I really like the idea of solid onboard solutions. If this works well, you could do around 90% of lathe parts without external CAM, which would be a real improvement.

It reminds me a bit of Native CAM. Do you know it?
If so, I’d be interested in what made you decide to develop a completely new macro. From my point of view, Native CAM on the turning side is mainly missing proper G71 support and a polyline tool (which already exists in Native CAM Mill).

This is not meant as criticism, I generally find new developments very exciting. I’m not a programmer myself and can’t really judge the effort involved, which is why I’m asking.

Either way, very promising project. Looking forward to seeing how it develops

greetings 
Tom

Please Log in or Create an account to join the conversation.

More
20 Dec 2025 02:56 #340328 by cmorley
I note you use the qtpy abstraction layer. This is not pulled in for our linuxcnc package, so could trip some people up. I would suggest adding a descriptive warning to the terminal if the module is not found.

Please Log in or Create an account to join the conversation.

  • aDm1N
  • aDm1N's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
20 Dec 2025 09:50 #340339 by aDm1N
I'm still working on it. At the moment it is only partially useable. At the moment I am working on ensuring that the contour is implemented correctly. Especially with regard to circular arches. Thread already looks good. The goal is that 100% can be done on the machine. After I have implemented this with the contour, the goal is that a correction is included, depending on which tool is chosen. Means that the cutting geometry is included in the movement depending on which tool is chosen. If possible, the information should come from the Tool.db. In addition, a warning if the chipping with the tool is not possible. I can't say how quickly I can do it, but I'll try until I have a working solution. Anyone who has ever worked on Siemens controllers should certainly get along with the panel, because my experience with the machines certainly shows similarities.
The following user(s) said Thank You: Surmetall

Please Log in or Create an account to join the conversation.

More
20 Dec 2025 12:59 #340344 by Surmetall
Awesome, I’m really looking forward to your tool, and I think if this works out it’ll be an absolute game changer for lathes!I find all of this really interesting feel free to keep the camera running while testing and upload it somewhere. I’m pretty sure I’m not the only one watching this with excitement.A very cool project to make use of the time between the holidays.

Please Log in or Create an account to join the conversation.

  • aDm1N
  • aDm1N's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
22 Dec 2025 21:58 - 22 Dec 2025 22:01 #340401 by aDm1N
So, it seems I've managed to get the contour pretty well right. It's coming along slowly. It took me quite a while to get it to this point.
{
  "op_type": "contour",
  "params": {
    "start_x": 0.0,
    "start_z": 0.0,
    "coord_mode": 0.0,
    "segments": [
      {
        "mode": "xz",
        "x": 15.0,
        "z": 0.0,
        "x_empty": false,
        "z_empty": false,
        "edge": "radius",
        "edge_size": 5.0,
        "arc_side": "auto",
        "arc_side_raw": ""
      },
      {
        "mode": "xz",
        "x": 15.0,
        "z": -15.0,
        "x_empty": false,
        "z_empty": false,
        "edge": "none",
        "edge_size": 0.0,
        "arc_side": "auto",
        "arc_side_raw": ""
      }
    ],
    "name": "radius"
  },
  "primitives": [
    {
      "type": "line",
      "p1": [
        0.0,
        0.0
      ],
      "p2": [
        10.0,
        0.0
      ]
    },
    {
      "type": "arc",
      "p1": [
        10.0,
        0.0
      ],
      "p2": [
        15.0,
        -4.999999999999999
      ],
      "c": [
        10.0,
        -5.0
      ],
      "ccw": false
    },
    {
      "type": "line",
      "p1": [
        15.0,
        -4.999999999999999
      ],
      "p2": [
        15.0,
        -15.0
      ]
    }
  ]
}
{
  "op_type": "contour",
  "params": {
    "start_x": 0.0,
    "start_z": 0.0,
    "coord_mode": 0.0,
    "segments": [
      {
        "mode": "xz",
        "x": 15.0,
        "z": 0.0,
        "x_empty": false,
        "z_empty": false,
        "edge": "chamfer",
        "edge_size": 5.0,
        "arc_side": "auto",
        "arc_side_raw": ""
      },
      {
        "mode": "xz",
        "x": 15.0,
        "z": -15.0,
        "x_empty": false,
        "z_empty": false,
        "edge": "none",
        "edge_size": 0.0,
        "arc_side": "auto",
        "arc_side_raw": ""
      }
    ],
    "name": "Fase"
  },
  "primitives": [
    {
      "type": "line",
      "p1": [
        0.0,
        0.0
      ],
      "p2": [
        10.0,
        0.0
      ]
    },
    {
      "type": "line",
      "p1": [
        10.0,
        0.0
      ],
      "p2": [
        15.0,
        -5.0
      ]
    },
    {
      "type": "line",
      "p1": [
        15.0,
        -5.0
      ],
      "p2": [
        15.0,
        -15.0
      ]
    }
  ]
}
Attachments:
Last edit: 22 Dec 2025 22:01 by aDm1N.
The following user(s) said Thank You: Surmetall

Please Log in or Create an account to join the conversation.

More
26 Dec 2025 17:54 - 26 Dec 2025 18:49 #340532 by RotarySMP
Do you already know Andy's lathe macros?
forum.linuxcnc.org/41-guis/26550-lathe-macros
The graphical interface is fantastic.

Rather than reinventing the wheel, have you considered what it is which you are adding with you macros? Maybe you can coordinate with Andy to make them even more awesome.
Cheers,
Mark
Last edit: 26 Dec 2025 18:49 by RotarySMP.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.321 seconds
Powered by Kunena Forum