Author Topic: Duplicate Co-ordinates after G2 - Bad Drawing  (Read 245 times)

Offline electrosteam

  • Ewok
  • *
  • Posts: 6
    • View Profile
Duplicate Co-ordinates after G2 - Bad Drawing
« on: July 30, 2021, 00:23:37 am »
I have been experimenting with G42, cutter compensation, to establish the cut on my mill.

I instructed CB to generate code for the profile of a pocket with Tool Diameter = 0.

When I tried to run the code on LinuxCNC with the tool diameter set in the Tool Table, I got error messages and the code would not run.
Inspected the code and discovered that a number of G2 moves had the target co-ord repeated on the next line with a G1.

Generally, the repeated c-ords were slightly different, more or less digits of precision and roundings, all trivial differences.
Removed all the duplicated lines and the code ran fine.

I know that LinuxCNC calculates line-by-line the tool path using simple mathematics to allow for tool diameter.

Previous efforts along the same lines did not suffer the duplicates.
I assume LinuxCNC saw the trivial differences as intended tool movements and the tool path mathematics failed,

Can anyone shed any light on what I did in CB to initiate these duplicates ?

Keep well,
John (in Lockdown Sydney).

« Last Edit: August 06, 2021, 23:32:02 pm by electrosteam »

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1502
    • View Profile
Re: Duplicate Co-ordinates after G2
« Reply #1 on: July 30, 2021, 04:20:18 am »
Hi John

With a profile mop, to get CB to generate a cut along the center of the geometry line you would
for example set the cutter dia to 6 mm and then in the roughing clearance set -3.

When programming by hand and depending on whether you are climb or conventional milling
you may want to use cutter compensation, but with cam programs generally not.
Are your parts not coming out 'on size'.
A just out of lock down Victorian.

Dave

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8486
    • View Profile
Re: Duplicate Co-ordinates after G2
« Reply #2 on: July 30, 2021, 15:15:08 pm »
Or, you may 'engrave' that part, even though you may be using a flat endmill.  CamBam knows the difference, but your milling machine or router could care less.

Engrave centers the tool on the line, automatically.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4774
    • View Profile
Re: Duplicate Co-ordinates after G2
« Reply #3 on: July 30, 2021, 15:39:28 pm »
It sounds to me like the arcs in your profile polyline had multiple points very close together.
Double click the polyline to see the points.

Also I don't understand, "I instructed CB to generate code for the profile of a pocket with Tool Diameter = 0."

Are you using the word "profile" to mean the "perimeter" of a pocket ? or do you mean a Profile machining operation applied to an existing pocket ?
« Last Edit: July 30, 2021, 15:43:36 pm by EddyCurrent »
Made in England

Offline electrosteam

  • Ewok
  • *
  • Posts: 6
    • View Profile
Re: Duplicate Co-ordinates after G2
« Reply #4 on: July 30, 2021, 23:57:55 pm »
Eddy, you are onto it, thanks.

I use LibreCad, and on close examination, I find that the tangent into the curve misses by about 1/10 micron (0.0001 mm), and goes past by about 3 microns.
I will investigate this further.
Many drawings have been done in the past trouble free, I suspect too many copies and mirrors when I did the drawing.
Goes to show that joining related elements into a 'Block" before multiple copy/paste/mirror etc would be worthwhile.

The "EDIT-JOIN" selection in Cambam was set at 0.01 to make the polyline.
This shows that CB cannot correct for sloppy drawings !

Today's task is to redraw the shape and then re-program in CamBam to confirm that was the problem.

The shape was a pocket in 12 mm steel.
I had drilled out most of the interior and my interest lay in learning about G42 and its ability to step sideways to the final desired line.
So I guess "perimeter" would be a closer description.
But it really is a profiling operation to an existing (very rough) pocket.
My "instruction" to CB was only to mean my selection of the options and parameters.

My work flow was to set G42 in LinuxCNC with a Tool Table entry of 11.9 mm (corner curves are Radius 6 mm), but load a 8 mm cutter.
The go round the (drilled) pocket observing the cut, theoretically (11.9-8)/2 = 1.95 mm clear of the final line.
Then progressively reset the Tool Table entry to 11.5, 11, 10.5, 10, 9.5, 9, 8.5, 8.2, 8.
Perhaps too conservative, but it worked a treat.

Keep well,
John.
« Last Edit: July 31, 2021, 06:27:50 am by electrosteam »