MakerCAM

From ShapeOko
Jump to: navigation, search

Here is a quote from Edward Ford’s blog[1]:

I’ve looked high and low for a nice open source, entry level CAM program. As luck would have it, after YEARS of searching, I found one mentioned in another forum, and tracked it down to find out it had been abandoned but the source was released before said abandonment. It was created by a guy named Jack, and I’m planning to do an entire other blog post explaining how this came to be. For now, just know that Jack’s creation (which he called PartKam), is now available on my github page, and is being hosted at one of my other domains. You can find it here: www.makercam.com. You will find a basic ‘help’ and ‘tutorial’ links at the top of the page.

Overview

MakerCAM is a Computer Aided Manufacturing (CAM) program with some basic vector drawing capabilities.

Local Installation

One can directly download and save a local copy

and then use it w/ a standalone Flash player from Adobe if desired.

Features

(from the programs' about page)

  • arbitrary profiles, pockets, and drilling operations
  • true shape nesting
  • automatic island detection
  • sketch-to-CAD tool for easy prototyping
  • svg import and export --- please note that under certain circumstances, MakerCAM only imports the first path in register at the origin, successive paths are scattered about the canvas. If elements are out of place, combine them with the properly placed path into a single (compound) path (in InkScape this is done by selecting the paths and choosing Path | Combine).

An important limitation of MakerCAM is that it lacks ramping or spiraling in to begin a cut, making no movements long the X- and Y-axes when descending along the Z-axis.[2] Plunge rates and step-down should be adjusted accordingly.

MakerCAM will also process an entire selection and cut it one layer at a time --- this means that if for example, multiple pockets are selected, it will cut one layer of the first, then lift out, move to the next, lower, cut it, lift out, and repeat until it resumes at the next layer of the first path.[3] This is just as slow as it sounds and should be avoided so as to save time, wear and tear and unnecessary movement. There are post-processors which will address this.

Preferences

Most notably, it is necessary to set the scaling of imported files using Edit | Edit Preferences to access SVG Import Default Resolution (px/inch) --- 72 for Adobe Illustrator, 90 for InkScape.

Unfortunately, the default feed and plunge rates are much too fast for a stock, un-tuned machine --- one must always change those values to match the capabilities of one's machine (see Fine Tuning), and the material which one is milling (see Materials (Feeds and Speeds)).

Post-processing

https://github.com/alsliahona/gcode-optimizer

https://github.com/jhessig/metric-gcode-truncator

See also G-Code Utilities.

Operations

  • Profile --- a 2d cut into the material, following a closed path --- the result will be a cut-out piece and a cut in the stock material and may be either inside (the path will define the shape left in the stock material) or outside (the profile will define the shape cut out of the stock material). The depth parameter specifies the depth of cut into the material and should be negative.
  • Tabs --- Tabs are small areas of material which will be left behind when cutting a profile so as to hold the part in place. They can only be placed after a successfully calculated profile operation
    • select the profile, then CAM | add tabs to selected
    • enter spacing for and size of the tabs
    • (optional, possibly buggy feature) drag tabs around to move them, or delete a selected tab by pressing delete or backspace
    • Please note that tab height is in mm, while width is in cm per Tab Bug Further note that endmill diameter is not considered and the actual size of a tab will be reduced by the size of the endmill.[4]
  • Pocket --- removes material from the interior of a path down to the specified depth. Note, that this is limited by bit geometry, so square corners will be rounded, matching the radius of the cutting bit --- it may be that for small paths the bit will not fit w/in the path, so no cut will be made. A potential work-around is to try simplifying the path to a single stroke and using Follow Path below, or consider a V-carving or single path option such as Hershey Text for Inkscape. If selecting multiple paths, the order of the selection may matter --- if islands are not excluded from cutting, try altering the selection order.
  • Follow Path --- moves the cutting tool along the selected path, down to the specified depth without using offsets. Suitable for effects like engraving and provides complete control in one plane (unfortunately, it is not possible to specify more than a single target depth, precluding engraving style control). Note: This operation may fail on paths which have points with identical positioning --- separate them and if desired add small curves or diagonal lines to connect them.[5]
  • Drill --- drills to the specified depth.
    • path center drills a single hole (usually used w/ a circular path approx. the diameter of the desired hole)
    • fill pattern uses the hole spacing parameter to fill the path w/ evenly spaced arrays of holes (usually used w/ a path which covers a large area --- useful for creating a grid of holes for ventilation or a fan)

Elements

In addition to its CAM capabilities, MakerCAM also functions as a vector editor. Vector editors are graphics programs which instead of working with grid arrays of pixels (picture elements), define a graphic using geometric means:

  • point --- an X,Y coordinate
  • line --- the direct path between a pair of points
  • Bézier curves --- a mathematical modeling of a curve defined by an on-curve point, two off-curve points and an on-curve point

These elements allow one to describe (more-or-less) any graphic.

Tools

MakerCAM has five tools which allow one to:

  • hand --- pan around the drawing area
  • pointer (solid black arrow) --- select paths --- drag-select to encompass multiple objects, or shift-click on successive objects to add (or remove) them to the current selection[6]
  • node editor (arrow w/ circle at its tip) --- modify paths
  • pencil --- draw freehand paths
  • fountain pen --- create Bézier curves

Introductory manual for PartKAM here: http://www.cnczone.com/forums/opensource-software/106198-partkam-free-crossplatform-2-5d-cam.html

Drawing a J

Using the Bézier curve tool:

  • click near the top middle (of the work area)
  • click again about 2/3rds of the way straight down from the first click
  • move down and over to the left a bit at a 45 degree angle a bit, click, hold and drag off to the left
  • move up and over left a bit at a 45 degree angle again, click, hold and drag up
  • move left by the desired width of the letter, click and drag down and to the right.
  • move down to the bottom-most point of the letter and move further down by the desired width, click and drag to the right
  • move up and to the right to the beginning of the straight section of the letter, click and hold and drag up
  • move up next to the first point and click
  • move over to the first point and click to close the path.

Use the node editor to adjust as desired.

Terminology and Functionality

Please see the Glossary for definitions of terms:

  • safety height
  • step over
  • step down
  • roughing clearance
  • plunge rate
  • stock surface
  • Nesting --- putting one part inside or nestled up next to another.
    • Draw up an array of parts and set their CAM profile to outside
    • Then, draw up a shape which matches the size of your stock material, with it selected choose Nesting | set selected as material, then choose Nesting | begin nest --- if all the parts fit, MakerCAM will arrange everything so it can be cut out of your stock as efficiently as possible.

In discussing this, cvoinescu noted:

The step down is not the total depth of the pocket, it's how deep to mill in one step. Several steps may be required to achieve the target depth. Basically, the endmill will be removing a step over by step down section of material as it moves. If the pocket is round, one strategy results in a spiral, or spiral-like pattern of arcs, first plunging <step down> in the center then spiralling out step over each turn. Then the machine returns to the center, plunges to twice step down, and does the spiral again, and so on until target depth (actually, target depth less roughing clearance; the finishing pass removes the rest). Other shapes are milled in a similar fashion.[7].

Please note that roughing clearance only makes sense when one is making two passes at a given path --- the first pass (the roughing pass) will specify how much material is to be left by setting roughing clearance to a positive value and will typically be done w/ a minimal value for stepover, a faster value for feed rate, while the second pass (the finishing pass) with zero for roughing clearance, will remove the balance of the material w/ a larger value for stepover, a slower value for feed rate and will leave a finer finish.

Note that when making a roughing cut on a profile one should arrange things so that it is wider than the bit when making the finishing pass so that the machine is forced to make two passes when finishing. This affords room for chip clearance and reduces cutting stresses.[8]

Tutorials

Video

From forum discussion Re: Burned Out and can't get started with CAD

Web

Stair-stepping when making circles

GRBL is limited in the number of characters per line it can handle, which causes it to ignore the end portions of too-long lines --- unfortunately MakerCAM outputs such lines per a forum discussion. Some Communication / Control programs such as Grbl Controller will trim too-long lines on-the-fly.

MakerCAM outputs too many decimals

There are a number of solutions for this, from trimming-on-the-fly to manually editing the G-code (quickly done using a regular expression), to specific software options:

Note that there have been some instances of arcs failing when trimming to 2 digits, 4 is suggested as a reasonable compromise.[10]

Safety height when pocketing

Script to make this more efficient: http://plasma2002.com/gcodetools/ [11]

Alternately, one can just keep track of, and set safety height and stock height appropriately for successive pocketing operations.

Automation

Use AutoHotKey to Automate Populating Fields in MakerCam

Development

Source is available on github.

Bugs

  • (Bug?) Multiple objects in a file are scattered around the canvas on import --- this can be prevented by joining the objects into a single compound path before importing (Path | Combine in Inkscape)
  • (Bug) inaccurate conversion of dimensions when switching measurement systems
  • (Bug) As noted above, the program may become confused and omit paths which have nodes which are stacked one on top of the other.
  • (Bug) stacked paths may result in the calculation of invalid arcs, creating g-code which results in errors
  • (Bug) unable to export to G-code on some versions of the MacOS[12]

Feature/Wish List

  • (Defaults) Make default settings conform to / appropriate for a stock Shapeoko 2 w/ a typical spindle
  • (Interface) Add a second button to the Pocket, Profile and Follow Path Operations ”Calculate and Export” which would allow one to efficiently handle projects w/ a single path
  • (License) port from Flash to non-proprietary system --- perhaps http://paperjs.org/
  • (Interface) Tab height should be set in same unit as width in metric
  • (Usability) G-code export precision is so high, some lines are longer than Grbl can accept
  • (Interface) selected tool is not highlighted
  • (Interface) add mm as a unit option
  • (Interface) the click to close a Bézier path should allow one to continue holding the mouse button down and to reshape the just drawn portion of the path until release
  • (Interface) honour traditional keyboard modifiers (well, the ones Freehand used):
    • shift constrains angle
    • command/control allows moving the just placed on-curve node
    • alt/option releases the far off-path node
  • (Interface) remember/store tool settings
  • an option when creating a pocket to choose the shape which is used for carving the pocket (e.g., if the pocket is a circle, and a semi-circle was chosen for the carving, the shape of the resulting pocket would be a half hemisphere)--- this would allow one to do much more complex shapes --- even better would be an option to do something like to Adobe Illustrator's Mesh Fill which would let one set points w/in a pocket and specify their depths individually, then specify the entry / exit angle(s) for the point and the perimeter and whether they are joined by straight or curved lines
  • (Usability) Support SVG spec completely for import. Files from the commercial program iDraw include paths defined in a way that MakerCAM doesn't understand[13].
  • (Feature) Support import of simple vector .pdfs w/ no text.
  • (Feature) Support import of .dxf files.