QCAD/CAM helical hole milling script

Discussions around the CAM Add-On of QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Indicate the post processor used.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
Deejay
Junior Member
Posts: 15
Joined: Mon Dec 30, 2024 10:25 am

QCAD/CAM helical hole milling script

Post by Deejay » Mon Jan 13, 2025 11:32 am

Hi everyone,

I missed a feature in QCAD/CAM to mill helical holes (using a spiral path).
So I wrote a simple QCAD/CAM script named CamHelixHole to generate according G-code.
Now I can present version 2.0 with some new features.

Overview of all features:
  • Generating G-code for helical hole milling directly in QCAD/CAM from your drawing
  • All necessary parameters like speeds and feeds, infeed, cutting depth, etc. can be specified in a dialog
  • Makes use of CAM tools that are already setup in QCAD/CAM
  • Uses 3 G-code template files that can be customized to fit for your own machine
  • Generated toolpath can be on, outside or inside the holes contour
  • Direction of the toolpath can be changed: Climb or conventional milling
  • Selectable tool changer option
  • Support for Tabs to hold cutouts in place
  • Optimization of processing order (to reduce toolpath length and machine time)
  • Optional use of named parameters / variables in Gcode to allow easy parameter adjustments
  • Support for english and german language
  • Readme / Manual as HTML file with description of all options
The use of O-codes from version 1.0 was removed for a broader support of different machine controllers. For the same reason, the use of named parameters is now in version 2.0 optional. If your machine controller software does not support it, you can just disable it.
.
screenshot_dialog_en.jpg
Screenshot of CamHelixHole configuration dialog
screenshot_dialog_en.jpg (53.49 KiB) Viewed 62395 times
bild_beitrag1.jpg
Example from QCAD/CAM to G-code in LinuxCNC
bild_beitrag1.jpg (92.16 KiB) Viewed 62395 times
Installation:
Download the file CamHelixHole_Vx.x.zip and extract it.
Make sure that all files are located in the subdirectory "scripts\Cam\CamHelixHole" of your QCAD/CAM installation folder
(for example: C:\Program Files\QCADCAM\scripts\Cam\CamHelixHole).
After restarting QCAD/CAM, there should be an additional menu item "Create helical hole" in the "CAM" menu in QCADs menu bar.
Additionally, there is a new icon for the script in the CAM toolbar.

You will find a manual / readme in the 'doc' sub-directory for further details about the usage, the G-code template files and all options.

Please note: The script is only for QCAD/CAM. It does not work with the QCAD community edition nor with QCAD Pro without CAM!

Disclaimer:
This script / software was developed for the author's own use and was made available for free use. The author assumes no liability for the correctness, accuracy or completeness of the software and there are no guarantees of any kind (e.g. for certain functions, etc.). No claims can be made against the author (for example to correct errors or similar). Furthermore, any liability for harm, damages or consequential damages arising in connection with or through the use of this software is excluded.
Use at your own risk.
Be sure to check the generated G-code before starting the machine!


Feel free to adjust the script to your needs.

Regards
Deejay
Attachments
CamHelixHole_V2.0.zip
CamHelixHole Version 2.0 Zip-File
(221.16 KiB) Downloaded 600 times
Last edited by Deejay on Mon Jan 20, 2025 7:16 pm, edited 1 time in total.

CVH
Premier Member
Posts: 4955
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD/CAM helical hole milling script for LinuxCNC

Post by CVH » Mon Jan 13, 2025 12:24 pm

Hi, thanks for sharing this.

Rather making a 'circular groove' or cutting out a 'circular shape'.
For that last usage I see an issue with clamping down the inside, the left-over.
One must assure that this remains steady until the cutter is retracted and that it is not grabbed by the cutter for the final part, a circle.
It is thus a tricky or even dangerous approach without a vacuum table or a 'sticky' retaining surface.

To mill a shallow hole, the inner portion must be surfaced out at intervals.
Plunging down is indeed best done with a helical motion.

The different algorithms to optimize the order raise some questions.
I think there are good, fast and valid TSP or 'Traveling salesman problem' algorithms available.
About sure that this is implemented under QCAD/CAM to reduce traversing between ends-starts of paths. :wink:
# EDIT # The "ant" approach is a worthy one, QCAD/CAM probably uses NN.
Deejay wrote:
Mon Jan 13, 2025 11:32 am
This means there is no toolpath generated in QCAD and so you will not see it in the CAM simulation.
As explained Off-Forum:
It can not be implemented as a QCADCAM toolpath for a very different reason.
Toolpaths generate CAM-entities that will be exported at due time.
Then:
- An Arc is a flat shape at a certain Z-level, the Z coordinate of the center, start and end point are identical.
- A G2/3 to a different Z-level is interpolated at driver level as a helical motion.
- Not supported but a 3D Arc is also not a part of a helical shape.

The only way to represent something helical is a Polyline with bulging segments that mimics Arc segments.
Then two consecutive vertices can have different Z coordinates AND the segment can have a bulge factor different from zero.
But :!:
A) Rendered incorrectly (See example)
B) '3D polyline with arc segments flattened to 2D' on saving.
If these things would be fixed then the Polyline approach would be a valid representation of a helical toolpath.

Regards,
CVH

Deejay
Junior Member
Posts: 15
Joined: Mon Dec 30, 2024 10:25 am

Re: QCAD/CAM helical hole milling script

Post by Deejay » Mon Jan 20, 2025 7:20 pm

Hi everyone!

Version 2.0 of my script is now available.
You will find all information and the new files in the first posting.

Regards
Deejay

CVH
Premier Member
Posts: 4955
Joined: Wed Sep 27, 2017 4:17 pm

Re: QCAD/CAM helical hole milling script

Post by CVH » Wed Jan 22, 2025 5:53 am

Supporting retaining TABs, nice. :D

Hint:
Instead of going straight up before and straight down after a TAB it would be better to ramp up and ramp down.
These motions are again helical what is better for your cutter.
Typically faster and a smoother operation as there is no change in FEED.

Regards,
CVH

Post Reply

Return to “QCAD/CAM”