1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 04:23:55 +02:00
cae-tools/cameo
2013-09-20 18:47:39 -03:00
..
templates cameo/templates/mkmk-simple: support new edge file names 2013-08-06 19:15:48 -03:00
test cameo: add two test cases (exhibiting brokenness) 2012-05-01 23:48:32 -03:00
above.fig cameo: consider inside/outside also when checking corner points 2012-03-20 23:05:42 -03:00
area-poly2d.c cameo/: move conversion between poly2d and "struct path" from area-poly2d.c to poly2d.c 2012-06-12 15:04:40 -03:00
area.c cameo: consider inside/outside also when checking corner points 2012-03-20 23:05:42 -03:00
area.h cameo: "area" now works on Z layers individually (untested) 2012-03-19 00:26:41 -03:00
cameo.c cameo/: make tool_comp_paths output paths in the order processed 2011-09-05 07:54:29 -03:00
COPYING.GPLv2 Introducing cameo, a toolbox of CAM operations. 2010-11-01 14:58:29 -03:00
excellon.c cameo/excellon.c: recognize G90 code (absolute mode) 2012-04-01 19:26:46 -03:00
excellon.h cameo: migrated Excellon reader from drl2gp 2010-12-15 03:27:55 -03:00
fped2d2z.pl cameo/fped2d2z.pl: new option -t Zmax to set the height of the workpiece 2012-08-22 13:51:16 -03:00
gerber.c cameo/gerber.c: crudely support some cases of G03 2013-09-20 18:47:39 -03:00
gerber.h cameo: migrated Excellon reader from drl2gp 2010-12-15 03:27:55 -03:00
gnuplot.c cameo: also connect paths from gnuplot files 2011-12-16 04:36:17 -03:00
gnuplot.h cameo: "array" did not affect subsequently loaded files 2010-12-15 06:37:17 -03:00
lang.l cameo/: new command "flip" to flip paths on the X or Y axis 2012-08-23 09:04:44 -03:00
lang.y cameo/: new command "flip" to flip paths on the X or Y axis 2012-08-23 09:04:44 -03:00
Makefile cameo/: move conversion between poly2d and "struct path" from area-poly2d.c to poly2d.c 2012-06-12 15:04:40 -03:00
ops.c cameo/ops.c (tool_comp_paths): don't crash if path list is empty 2013-09-20 17:36:16 -03:00
ops.h cameo/: new commands "remove" and "keep" for path filtering (untested) 2012-06-12 12:32:08 -03:00
path.c cameo/path.c: new function path_is_inside which calls p2d_contains_poly 2012-06-12 15:04:59 -03:00
path.h cameo/path.c: new function path_is_inside which calls p2d_contains_poly 2012-06-12 15:04:59 -03:00
poly2d.c cameo/: move conversion between poly2d and "struct path" from area-poly2d.c to poly2d.c 2012-06-12 15:04:40 -03:00
poly2d.h cameo/: move conversion between poly2d and "struct path" from area-poly2d.c to poly2d.c 2012-06-12 15:04:40 -03:00
README cameo/: new command "flip" to flip paths on the X or Y axis 2012-08-23 09:04:44 -03:00
shape.c cameo/shape.c: removed global "path" variable (where did that madness come from ?) 2011-09-05 05:49:23 -03:00
shape.h cameo/: new gnuplot tag #%id= with generator-assigned identifier 2011-09-05 05:46:25 -03:00
util.h Introducing cameo, a toolbox of CAM operations. 2010-11-01 14:58:29 -03:00
zstack.pl cameo/zstack.pl: don't output lower layers at higher Z 2012-03-20 23:13:35 -03:00

CAM Engineering and Operation
=============================

Cameo is a collection of CAM tools that convert between various file
formats and adapt the toolpath.

This is a work in progress. The plan is to integrate all the utilities
currently floating around in
http://svn.openmoko.org/developers/werner/cncmap/
into a single program and to better share common functionality.

This work is distributed under the terms of the GNU GENERAL PUBLIC
LICENSE, Version 2:

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

For your convenience, a copy of the complete license has been included
in the file COPYING.GPLv2.


Toolpath adaptation language
----------------------------

Loading paths:

  gerber <diameter> [<filename>]
  gnuplot <diameter> [<filename>]
  excellon [<filename>]
  clear

"gerber", "gnuplot", and "excellon" each add paths from a file to the
list of paths already loaded. "clear" removes all paths.

If the a file name is omitted, standard input is read. The diameter is
the default tool diameter.

Note that "clear" preserves the translation set with "align", "array",
and "translate". This way, multiple files can be processed with the same
translation.


File output:

  write [<filename>]
  append [<filenname>]

Writes all loaded paths in gnuplot format to the specified file. If the
file name is omitted, "write" writes to standard output.

"append" is like "write", except that it appends to an existing file.

File names can contain spaces and any printable characters, but no leading
or trailing spaces. It is not possible to place a comment after a file
name or at a place where a file name could be.

E.g.,

  write foo.gp   # wrong

but

  write foo.gp
  # right


Units:

  mm
  mil
  <number>mm
  <number>mil

The words "mm" and "mil" set the input to the specified unit. The
default unit is millimeter. If a number is followed by "mm" or "mil"
without intervening space, the unit is overridden for this number,
without affecting the default input unit.

Note that "mm" and "mil" only affect dimensions in the command file
and have no effect on the interpretation of toolpath files.


Filtering:

   remove <x0> <y0> <x1> <y1>
   keep <x0> <y0> <x1> <y1>

"remove" removes all paths that have at least one vertex inside the
specified rectangle. "keep" keeps only paths that have all vertices
in the rectangle.


Horizontal adjustments:

  align <ref> <x> <y>
  align <ref> <x0> <y0> <x1> <y1>
  array <x-step> <y-step> <x-index> <y-index>
  translate <x> <y>
  rotate <angle>
  flip <axis> [<center>]
  reset

"translate" shifts the currently loaded paths by the specified distance.
"align" is a more sophisticated form of "translate", which moves a
reference point in the bounding box of the currently loaded paths either
to a specified location (if used with three arguments) or to the
respective point in a rectangle (if used with five arguments).

The reference point is specified with a number as follows:

7-----8-----9
|           |
4     5     6
|           |
1-----2-----3

"1" is the lower left corner, "5" is the center, and so on.

"array" is used when cutting several copies of the same piece. The first
two arguments define the step between pieces while the second two
arguments define how many steps in each direction are taken. A step size
can be specified as the total distance, or as the border to add to the
respective dimension of the bounding box of the current path. In the
latter case, the border size is prefix with a plus sign. Example:

array 37mm 19mm 0 1
array +3mm +3mm 0 1

"align" moves the toolpath to an absolute position while "array" and
"translate" move relative to the current position. The total translation
is remembered also across "clean", so that an alignment can be applied to
multiple toolpaths.

"rotate" rotates the currenly loaded paths by the specified number of
degrees in a counter-clockwise direction. Like translations, rotations
are accumulated and are automatically applied to files loaded later.
Note that rotation is applied before translation. Therefore, using
"rotate" after "translate", "array", or "align" may yield unexpected
results.

"flip" flips X/Y coordinates on the respective axis ("x" or "y"). If
the center is omitted, the piece is flipped on (xymin+xymax)/2.

"reset" sets translation and rotation to zero. The way "reset" is currently
implemented, it does not affect the currently loaded toolpath. (But it's
better to use it only with "clean".)


Vertical adjustment:

  z [<z0>] <z0-pos>


Tool compensation:

  offset [dog] [inside]

"offset" offsets the toolpaths by the tool radius. By default, it offsets
the outermost toolpath to the outside and all other toolpaths to the
inside. This can be overridden with the #%outside directive in a gnuplot
file or the "inside" option to "offset". "inside" has precedence over
"#%outside".

Concave corners on an outside path are normally cut such that the corner
is round, leaving material at and near the corner point. The option "dog"
changes this to cutting a "dogbone" hole such that material is also
removed up to the corner point.


Area clearing:

  area <overlap>

WARNING: sometimes produces inaccurate results with toolpaths that eat
into the workpiece. Always check the toolpath before machining !

Generate toolpaths to mill (remove) the area enclosed by the current
path. If there are multiple paths, the area in the outermost is removed
but the areas covered by enclosed paths are left intact. If they contain
paths of their own, these are milled again, and so on.

"area" also mills along the outlines of the paths which is similar to
what "offset" does.

The overlap is the distance by which the areas cleared by parallel paths
should overlap.

If the current paths have different Z coordinates, each level is
processed separately.


Path reversal:

  reverse

Reverses all paths. This can be used to reverse tool direction.


Drill/mill conversion:

  drill <min-diameter> <max-diameter>
  drill <min-diameter>,<max-diameter>
  mill <diameter> <step>
  remainder
  empty

"drill" and "mill" search for paths that can be processed with the
specified tool and generate the corresponding toolpaths. After "drill"
or "mill", only the toolpaths for this tool remain. The paths that
have been converted are removed and the paths for which the tool is
unsuitable are moved to a separate list, the remainder list.

The two parameters of "drill" can be separated by whitespace or by a
comma. The latter form can be convenient when passing the diameter
range around in shell scripts.

"remainder" clears the list of paths and sets the list of paths to
the remainder list. Note that "clear" does not affect the remainder
list.

"empty" does nothing if the list of paths is empty and makes cameo
exit with an error if there are paths in the list. This can be used
to ensure that all paths in a file have been converted.

Example:

  excellon example.drl
  drill 7mil 13mil
  write drill.gp
  remainder
  mill 0.8mm 0.01mm
  write mill.gp
  remainder
  empty

In this example, we first load a drill file. Then we generate drill
commands for all simple holes with a diameter between 7 mil and 13 mil
and write the toolpaths to the file "drill.gp". Next, we retrieve the
remaining paths, generate toolpaths for a 0.8 mm endmill, and write
them to the file "mill.gp". Finally, we check that all paths have been
processed.


Tool path optimization:

  optimize

Try to reduce the movements made between paths by reordering the paths.
Note that this disturbs the order generated by "offset" and should thus
not be used on paths that are to be executed in a specific sequence.


Statistics:

  stats

Prints the number of paths and segments, plus their total length.