Welcome, Guest. Please login or register. April 19, 2014, 07:47:55 am

Login with username, password and session length

Pages: [1]
Author Topic: Inefficient and unexpected moves during machining 3D profile  (Read 731 times)
Storm Trooper
Offline Offline

Posts: 134

View Profile
« on: October 04, 2011, 04:20:56 am »

The g-code generate by this STL file, and subsequent CB file, are mystifying.  The g-code causes moves that are unwanted and inefficient.

The following movements are in inches.

On line N5 of the g-code there is this: G0 Z0.25, which is dropping Z axis to its clearance height.  However, then on line N11 the router moves to G1 X 12.6172 Y 0.37, then on line N12 the Z-axis drops to -0.2-inches, then on line N13 the X-axis moves to 12.6-inches, then on line N14 the router moves back to X 0.3828 at a Z-axis depth of -0.2-inches.

This series of moves make no sense. And to have plunge the router bit too far into the stock with no reason.  These first few moves make even less sense when on line N17 the initial cutting depth for shaping the piece being machined is Z -0.071.

Why does the Z-axis drop to -0.20-inches on line N12?

Then comes a series of moves at the end of this move, which are repeated at each end of each traverse of the X-axis, where the cutter is move a slight bit on the Y-axis, then plunged into the stock, then withdrawn, to then travel back to the other end of the X-axis, only to make this plunge again.  This can be seen in lines N18 though and including line N23.  While some of these movements are necessary to move the cutter into position to move back to the beginning of the X-axis, the plunge moves make no sense and are inefficient.

Then beginning on line N361 there is the repeat of the first moves above G1 X12.5, however on line N362 the Z-axis plunges to -0.40-inches, then on line N366 the Z-axis plunges to -0.60-inches, then on line N367 the cutter moves to X12.6-inches, then on line N368, moves at this depth to X0.3828.  Why the cutter is plunged into the stock to this depth only to move to the beginning one the X-axis makes not sense.

Where do all these moves, both the deep cuts along the X-axis and the plunge moves at each end of the X-axis, come from and how can they be eliminated?

What is being machined is a short piece of thick molding that will be curved handles for a small box.  The stock to be machined will be the proper height [distance on the Y-axis] so machining this dimension is unnecessary.

These individual handles will be cut on a table saw so the ends are angled as they need to be fit into the box platform.  Making short thick pieces of molding is a common machining activity so I want it to be as efficient as possible.

Also, the vertical curvaceous shape of the handle is a bezier curve.  Using bezier curves is the basis for any curve in my designs so the ability for me to understand how Cam Bam deals with bezier curves in both horizontally [profiles and pockets] and vertically [3D profile] is important.

PS.  I hope that going line by line is not being too picky, but I know no other manner in which to explain the problem.

* leg blank for small dresser valet_001.stl (33.36 KB - downloaded 64 times.)
* leg blank for small dresser valet_001.cb (31.82 KB - downloaded 49 times.)
* leg blank for small dresser valet_001.Part1 [3DSurface1].nc (15.83 KB - downloaded 57 times.)
CNC Jedi
Offline Offline

Posts: 1948

Coding Jedi

View Profile WWW
« Reply #1 on: October 04, 2011, 10:45:20 am »

The thing to bear in mind, by default, the 3D machining routines will try to make the full model you supply.
So in this example it will try to cut the outsides of the shape as well as the top curves.
This is why you get the plunge moves at either end - as it cuts the outsides of the shapes.

To avoid cutting the outsides, the easiest way is to set a negative Boundary Margin.
In the attached example, I set a Boundary Margin of -0.2, so the toolpaths are restricted to an area within the top surface.

The horizontal scanline routines are not terribly efficient for use with roughing out a shape.
They are designed to scan backwards and forwards over every part of the model, decreasing the Z by the depth increment if multiple passes are used.  This results in higher areas being recut as you go deeper which is often a waste of time.

So the other thing I have done in the attached file is to introduce another 3D machinining operation that uses a waterline roughing pass.  Waterline toolpaths are a lot more efficient for roughing as they will only cut stock once.
The waterline roughing pass also has a -0.2 boundary, so the toolpaths don't try to cut outside the shape.
The roughing pass has a Roughing Clearance of 0.05 which will leave this amount of stock uncut, for a finishing
pass to then clear.

The horizontal scanline pass can then have it's depth increment set to 0, so it acts as a finishing pass, just covering the surface once and giving you a good finish.
I set the toolprofile for the finishing pass as a ballnose and reduced the stepover to 0.2 which should help give you a better finish as well.

Bezier surfaces, are currently treated the same way as all 3D meshes.  Being imported as STL or 3DS means they will be represented by a number of triangular facets.  The more faces, the more accurately the surface will approximate the original curves.  The number of faces should be defined when you export the the model from your CAD program.

The 3D operations will either calculate slices through the model (for the waterlining methods), or test height points along scanlines for the horizontal and vertical methods.  Keeping the Resolution and Step Over parameters of the 2D operations small will result in the most accurate scanline toolpaths but can result in large processing times.

3D surfaces currently can not be used with the 2D machining operations (profiles and pockets), although it is possible to create plane slices from them with CamBam which will produce polylines that can be used for 2D machining.

I hope this informations helps.

* leg blank for small dresser valet_001-10B.cb (34.62 KB - downloaded 72 times.)
Storm Trooper
Offline Offline

Posts: 134

View Profile
« Reply #2 on: October 04, 2011, 12:11:37 pm »

Not only does this solve the immediate problem, your explanation also gave a description of the conceptual basis of what Cam Bam does in 3D machining.  It was like a light went on.

As always, I greatly appreciate your time you've taken to give this detailed and illuminating  explanation.

To the point:  Dude, you're the best.

Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.166 seconds with 17 queries.

Copyright © 2008 HexRay Ltd. | Sitemap