Automatically eliminate gouging script

More
09 Jun 2022 00:09 - 09 Jun 2022 00:13 #244789 by thadwald
Hi
I'm looking for a script that will run through a gcode file and "fix" gouging issues when using G41 tool radius offset so that the interpreter no longer throws the gouging error message.
Either that or a script that will apply a tool radius offset to gcode.
Any help would be appreciated.

I'll add that my gcode is fairly simple--something like a C-shaped curve.

 
Last edit: 09 Jun 2022 00:13 by thadwald.

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

More
09 Jun 2022 12:30 #244802 by Todd Zuercher
It may help if you posted a copy of the problem piece of g-code and the size of the offset you're trying to use.

Running g-code using large radial offsets (such as a tool radius) can be problematic on any cnc control. You need to be sure that your g-code shape is even possible considering the radial offset and tool diameter used, plus appropriate lead-in and lead-out moves must be programed. It is often easier to generate your g-code for the tool center of your intended diameter tool, and only use the radial offsets for tool wear compensation.

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

More
10 Jun 2022 05:19 - 10 Jun 2022 05:23 #244845 by thadwald
The issue is that I am trying to solve a problem using existing tools, instead of building custom tools.

The gcode is automatically generated by measuring a profile with a scanning CMM and parsing the output file to place a G1 on each line. The irregular surface finish of the measured profile together with measurement errors creates line that has a rough look to it when viewed closely. The overall precision of the profile is within my tolerances and I can easily smooth the profile with G64. But the small irregularities are significant enough to make it impossible to "touch" each line segment with the cutting tool.

I am currently looking into the dxf2gcode project, to see if I could either use it as-is or borrow the cutter compensation code.

Not to complain but I was surprised to learn that cutter comp doesn't have an "ignore gouging" or, better yet, a "avoid invalid geometry" mode. Maybe this is because I do not yet appreciate how involved the process is.
Last edit: 10 Jun 2022 05:23 by thadwald.

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

More
10 Jun 2022 17:08 #244887 by Todd Zuercher
If I were doing this, I'd probably just import the code into the CAD/CAM software I use at work and either run a smoothing operation on it, or do an outline and/or inline of the original path to smooth it, then generate the tool path I wanted. But I don't know what software you have access to.

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

More
10 Jun 2022 17:36 #244890 by thadwald
I need to automate the entire process.

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

More
15 Jun 2022 09:39 #245167 by andypugh
Conveting noisy XY data into smooth curves is a fairly involved task. But I would expect that there are standard routines out there to do the task.

I feel that it would be best to convert the data to valid geometry first.

Maybe this helps? stackoverflow.com/questions/20618804/how...rve-in-the-right-way

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

More
17 Jun 2022 05:19 - 17 Jun 2022 05:23 #245303 by thadwald
Thank you for the link. I may have to do some smoothing to my profile.
I actually ran into some issues with profiles that are "impossible" to machine--even with perfect measurements. I need the cutter to follow these the best that it possibly can, without gouging. This is exactly the same problem as you would run into when generating a tool path for a pocket roughing tool.

I *think* I solved this problem by using a polygon clipping tool. I got this idea by inspecting the Kiri:moto project and finding out how they do it. It turns out they use a C++ clipper library. This one:
www.angusj.com/delphi/clipper.php
Someone wrote a python wrapper for it  here:
github.com/fonttools/pyclipper
and with a simple 
pip3 install pyclipper
I have the clipper library ready to use.
With this library, I feed the point cloud into the array and expand or contract it.  It returns a new set of points. It appears to do exactly what I want; cull those points that are impossible to reach.
Last edit: 17 Jun 2022 05:23 by thadwald.

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

More
17 Jun 2022 23:34 #245359 by andypugh

With this library, I feed the point cloud into the array and expand or contract it.  It returns a new set of points. It appears to do exactly what I want; cull those points that are impossible to reach.

Sounds like one of those fin projects that is fascinating at the time, you really understand it, and then 3 years later have _no_ idea how it worked or what you did. 

Make notes :-)
 

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

More
18 Jun 2022 01:12 #245370 by thadwald

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

Time to create page: 0.074 seconds
Powered by Kunena Forum