EMC2 Filters

I hacked together a few python-scripts that can be run as "filters" in EMC2. They are opened/run from AXIS and produce G-code into EMC2.

The first one is ttt2ngc which simply demonstrates my C++ port of Chris Radek's truetype-tracer. The original code is a rather monolithic C-program while my C++ port is divided into smaller files and offers python-bindings and more options (for example arc, cubic, conic output can be turned on/off independently).

The seconds script is ttt2offset which takes ttt-geometry, builds a VD, and produces offsets. By reversing the list of points from ttt either inwards or outwards offsets can be produced. Currently the toolpaths are machined in the order they are produced, i.e. in order of increasing offset value. An improvement would be to order the loops so that for e.g. pocketing the innermost loop is machined first, and rapid-traverses are minimized.

 

The third script is ttt2medial. Here the VD is filtered down to an (approximate) medial-axis, and the edges of the medial axis are chained together into a toolpath. The chaining-algorithm could probably be improved much, again to minimize rapid-traverses.

If this is run with a V-shaped cutter with a 90-degree angle we can push the cutter into the material by an amount equal to the clearance-disk radius of the edge. This is a "V-carving" toolpath which should produce a cut-out very similar to the outline of the font. For added effect choose a material with  contrasting surface and interior colors.

It would be interesting to know if this v-carving g-code is anywhere near to correct. If someone has a cutting-simulator, or is adventurous enough to run this on an actual machine, I'd be very interested in the results! (here is the g-code: emc2_vcarve.ngc)

Here is a metric version. The max depth is around -3mm, so a 10mm diameter 90-degree V-cutter should be OK. The text should be roughly 100mm long: emc2_vcarve_mm_ver2.ngc

Disclaimer: This is experimental code. Warnings, Errors, and Segfaults are common.

5 thoughts on “EMC2 Filters”

  1. I guess dimensions are in inches. Can you also do metric version about this code for millimetre guys?
    I could test it within couple days.

  2. Jari: I've added a metric version. Would be nice to see some screenshots or a video if you can run this G-code in the simulator.

  3. I ran a simulation on your nc code - looks like you still have a ways to go.
    (in particular the 'e' needs work)

    I'd post a blender file, xyz pts file and obj file of the simulation but don't know how to do that here.

    5xj@5xj.com

  4. I simulated your v-carve and it looks good to me. Link to an STL of the surface produced by the simulation below:

    http://www.cauldrondevelopment.com/pub/emc2_vcarve.stl.bz2

    The scale might be a little off on your g-code. I ran this with a 90 degree 1" dia. tool. The suggested 10mm did not yield good results.

    Could do higher res but the MC algorithm creates a lot of triangles. This took just under 18 sec to generate.

    Here's a screenshot:

    http://www.cauldrondevelopment.com/pub/emc2_vcarve.png

  5. Joseph, Thanks! The simulation looks nice. I did not know about OpenSCAM, is it a recent project of yours?

    I'm in the middle of refactoring the openvoronoi, so the latest code is a bit broken, but hopefully it will come out of that process more robust than ever...

    Anders

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.