Author Topic: This could use a bit of work  (Read 41087 times)

Offline Doanwannapickle

  • Storm Trooper
  • ***
  • Posts: 100
    • View Profile
This could use a bit of work
« on: June 27, 2007, 03:37:28 am »
I ran into a bit of strange behavior with circles.  Best explained with files.

1) Create a circle - see circle1.dxf .  Create a Cambam file ~ see circle1.cb.  The file has two outside profile operations.  The first operation takes two Z passes with a 1/8" end mill set to .200 path width, .3 stepover and leave .005 stock.  Depth increment is .190 and final depth is .300. 

The second profile uses the same 1/8" end mill set to finish off the .005 stock in one .300 deep pass.

The first op is conventional and the second op is climb.

2) circle2.dxf is identical to circle1.dxf.  In CamBam the circle is converted to a polyline.  The same roughing and finishing templates are applied to the two profile operations.  See circle2.cb.

3) circle3.dxf is again identical but this time the circle is converted to a polyline in my cad program.  Again the same templates are applied to the two MOPs.

If you create .tap files from these .cb's, here's what you'll find.  The circle creates the cleanest sequence but won't climb mill.  The polyline created in CamBam (circle2), makes all the passes in profile one, then jumps from quadrant 1 to quadrant 3 to make the finish pass.  I does climb mill.  Circle3, the polyline created in cad, behaves like circle2 but the jump is between quad 1 and quad 2.

Of course I had to discover this strange behavior as I was bragging it up and demo'ing it to a client.  Sigh.   :-\

All for now,
Walt

Offline 10bulls

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 2163
  • Coding Jedi
    • View Profile
    • www.cambam.info
Re: This could use a bit of work
« Reply #1 on: June 27, 2007, 09:21:37 am »
My apologies, I discovered the climb problem with circles myself recently.  That will be fixed next release.  (The toolpath generation for circles didn't seem to get updated after the milling direction logic was added). But the other problem is new to me.

In your .cb files you had both ops to be climb, so I set the 1st to be conventional then reran the g-code and did indeed see what you described.

What I notice is that for some reason when climb milling the toolpath starts at the second point last point in the polyline rather than the first.  So when you do a conventional followed by a climb (or vice versa) it does indeed jump between different starting points.
I will look into this and make sure climb milling also starts from point 1.

One other point to make, there is a difference between your CAD circle to polyline logic and CamBam's.  I was originally breaking circles into 2 180 degree arcs (like your CAD), but this would occaisionally cause arc problems.  If you have 2 points and a bulge defining the arc, it can be ambiguous which direction the arc goes.  For 180 degree arcs, it just takes one rounding error in the wrong direction and the arc will go the other way.  To play it safe I now use 3 arc segments for circles.

Of course I had to discover this strange behavior as I was bragging it up and demo'ing it to a client.  Sigh.   :-\
Reminds me of the time we had just put in a new server rack at an office in London.  To demonstrate the robustness of the UPS system to the clients (MD, head of finance etc), my boss (with a theatrical flourish) unplugged the mains.  You can guess the rest.

More great feedback Walt, thanks again!
« Last Edit: June 27, 2007, 11:32:05 am by 10bulls »

Offline 10bulls

  • Administrator
  • CNC Jedi
  • *****
  • Posts: 2163
  • Coding Jedi
    • View Profile
    • www.cambam.info
Re: This could use a bit of work
« Reply #2 on: June 27, 2007, 09:34:06 am »
Just a quick update...

The root of the problem lies with the Polyline->Reverse logic.
To change between conventional / climb toolpaths I use the polyline reverse routine (where necessary). 

If you have polyline points 1,2,3,4
Reverse will change this to 4,3,2,1

What it really should do is 1,4,3,2 (so point 1 is always the same).
(Ah, except for open polylines where 4,3,2,1 is good)

This will be fixed next release.

Offline Doanwannapickle

  • Storm Trooper
  • ***
  • Posts: 100
    • View Profile
Re: This could use a bit of work
« Reply #3 on: June 27, 2007, 14:25:52 pm »

This will be fixed next release.


Thank You  ;D