Octree-based cutting simulation

Here's an initial test of octree-based cutting simulation:

If you turn up the resolution to eleven, where it starts to be useful and not so grainy, the calculation of the tool-swept volume, which we subtract from the stock at each move, becomes too slow.
See also octree operations.

Download a short clip with a depth=10 tree: OUTPUT (it's also on youtube, but a 2s clip on youtube doesn't work very well: http://www.youtube.com/watch?v=G0RYS9FcqR0)

some screenshots:

Line filter for opencamlib

When generating toolpaths with drop-cutter ("axial tool-projection", if you like fancy words) the path ends up being composed of lots of short linear segments. It makes sense to filter this list of points and take out any middle points that lie on a straight line between neighboring points. Here's a first attempt at such a line-filter.

The lower points is the raw output from drop cutter, while the filtered points are offset vertically for clarity. There are 6611 CL-points in the raw data, but only 401 CL-points after filtering.

The next step is to come up with an arc-filter which detects circular arcs in the list of CL-points. All CNC-machines have G2/3 circular arc motion in the principal planes (xy, xz, yz). Then the number of moves will go even further down from 401 points.

This is just something to live with, having chosen the triangulated model approach to CAM. First we have pure and exact shapes in CAD which get tessellated into zillions of tiny triangles, from these we generate a sampled toolpath consisting of lots and lots of points, and finally we filter to get back those "pure" "exact" and "nice" line-segments and arcs.
line-filter

The relevant part of the code looks like this. It might be a bit prettier to use the remove_if STL algorithm? Also, there's no check that p1 actually lies between p0 and p2.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    typedef std::list<clpoint>::iterator cl_itr;
    cl_itr p0 = clpoints.begin();
    cl_itr p1 = clpoints.begin();
    p1++;
    cl_itr p2 = p1;
    p2++;
    for(  ; p2 != clpoints.end(); ) {
        Point p = p1->closestPoint(*p0, *p2);
        if ( (p- *p1).norm() < tol )  { // p1 is to be removed
            p1 = clpoints.erase(p1);
            p2++;
        } else {
            p0++;
            p1++;
            p2++;
        }
    }

full code here.

Lathe tool-post and tools

My order from RDG tools arrived today. The quick change tool post if T00, or Myford-size, for 12 or 12.7 mm tools, and included three holders. I also got a pack of five extra holders for a total of eight. There's a set of seven 12mm carbide-insert turning tools, and an internal threading tool for metric (60 degree) threads.

toolpost_and_tools

The order with ER11 and ER25 straight-shank collet chucks including sets of collets from CTC hasn't arrived yet. Since it comes from Hong Kong it will probably go through customs and I will have to pay VAT...

Lathe parting tool

I've ordered a bunch of tooling from RDG (http://www.rdgtools.co.uk/), Chronos (http://www.chronos.ltd.uk/), and CTC (http://www.ctctools.biz/) for the lathe. There's at least one more of these deep-discount tool stores: http://www.arceurotrade.co.uk/. These stores sell tools of mostly Chinese origin, but I think they will do just fine for hobby use, and the price-level certainly is only a fraction of what European tooling costs. If anyone knows more of these let me know!

The first things to arrive were a set of center drills and this Glanze parting tool from Chronos. I've settled on only a "Myford-size" T00 tool-post which has holders for max. 13 mm tools.

Lathe chuck

The lathe-project I bought in November is slowly moving forward. I got an Optimum/Quantum 100mm 3-jaw chuck for it today. Turns out the spindle needs to be disassembled to attach the chuck, so this was an opportunity to look at how the spindle is built.

The front bearing seat is machined into the spindle box, while the back bearing seat is a separate bolted on part. The front bearing has a nice 2-part aluminium chip-guard which protects the bearing from coolant and chips. A chip/dust-guard for the back bearing would probably be a good idea too. The spindle is held in place with a nut against the back bearing that tightens the whole assembly. This nut will probably need a set-screw or something else to secure it rigidly (rapid accelerations, changes of direction etc. might otherwise loosen it?). The chuck attaches with three M8 hex bolts, and the 20mm ones which came with the chuck are a bit short - need to buy 3pcs 25mm M8 hex bolts. For now everything is dripping with anti-corrosion spray, but for use the bearings will require either grease or oil (oil is better for higher RPM?). Also, I need to source a timing-belt and 1:1 pulleys to transmit ca 2kW @ 3000-3500RPM from the spindle-servo up to the spindle. Any suggestions?

Composite cutters for ocl

People who, unlike me, actually know something about programming often talk about design patterns. One common idea is to compose objects out of other objects.

I was able to add four new APT-tool like cutter classes to ocl with about 5-lines of code for each cutter (sans the bugfixing, taking much longer, that also took place simultaneously 🙂 ).

These show CL-points resulting from the vertexDrop() function, which results in a shape that looks like the cutter, but inverted.

Other combinations of the basic shapes (cylinder, sphere, torus, cone) are fairly easy to add now also if someone actually needs them.

Drop-Cutter examples

I've experimented with using OpenMP to calculate drop-cutter toolpaths on a quad-core machine. These now run reasonably fast. There are obvious lurking bugs with BallCutter and BullCutter still...

Code is here: code.google.com/p/opencamlib/ (if you know C++, computational geometry, and cnc-machining, or are willing to learn, this project needs your help!)

See also: styrofoam spider

FinnTEC 2010

FinnTEC fills the Helsinki convention center every two years with manufacturing technology and related stuff. I couldn't find anything too revolutionary, a lot of 4- or 5-axis machining centers running programs where they didn't machine anything, just hovered the tool above the workpiece. The 3D printers which print ABS-plastic are becoming more common. The price for one I looked at was 13 keur, not too bad.

See also FinnTEC 2008