Root/
| 1 | CAM Engineering and Operation |
| 2 | ============================= |
| 3 | |
| 4 | Cameo is a collection of CAM tools that convert between various file |
| 5 | formats and adapt the toolpath. |
| 6 | |
| 7 | This is a work in progress. The plan is to integrate all the utilities |
| 8 | currently floating around in |
| 9 | http://svn.openmoko.org/developers/werner/cncmap/ |
| 10 | into a single program and to better share common functionality. |
| 11 | |
| 12 | This work is distributed under the terms of the GNU GENERAL PUBLIC |
| 13 | LICENSE, Version 2: |
| 14 | |
| 15 | This program is free software; you can redistribute it and/or modify |
| 16 | it under the terms of the GNU General Public License as published by |
| 17 | the Free Software Foundation; either version 2 of the License, or |
| 18 | (at your option) any later version. |
| 19 | |
| 20 | For your convenience, a copy of the complete license has been included |
| 21 | in the file COPYING.GPLv2. |
| 22 | |
| 23 | |
| 24 | Toolpath adaptation language |
| 25 | ---------------------------- |
| 26 | |
| 27 | Loading paths: |
| 28 | |
| 29 | gerber <diameter> [<filename>] |
| 30 | gnuplot <diameter> [<filename>] |
| 31 | excellon [<filename>] |
| 32 | clear |
| 33 | |
| 34 | "gerber", "gnuplot", and "excellon" each add paths from a file to the |
| 35 | list of paths already loaded. "clear" removes all paths. |
| 36 | |
| 37 | If the a file name is omitted, standard input is read. The diameter is |
| 38 | the default tool diameter. |
| 39 | |
| 40 | Note that "clear" preserves the translation set with "align", "array", |
| 41 | and "translate". This way, multiple files can be processed with the same |
| 42 | translation. |
| 43 | |
| 44 | |
| 45 | File output: |
| 46 | |
| 47 | write [<filename>] |
| 48 | write_gerber [<filename>] |
| 49 | append [<filenname>] |
| 50 | |
| 51 | Writes all loaded paths in gnuplot or Gerber format to the specified file. |
| 52 | If the file name is omitted, "write" writes to standard output. |
| 53 | |
| 54 | "append" is like "write", except that it appends to an existing file. |
| 55 | |
| 56 | File names can contain spaces and any printable characters, but no leading |
| 57 | or trailing spaces. It is not possible to place a comment after a file |
| 58 | name or at a place where a file name could be. |
| 59 | |
| 60 | E.g., |
| 61 | |
| 62 | write foo.gp # wrong |
| 63 | |
| 64 | but |
| 65 | |
| 66 | write foo.gp |
| 67 | # right |
| 68 | |
| 69 | |
| 70 | Units: |
| 71 | |
| 72 | mm |
| 73 | mil |
| 74 | <number>mm |
| 75 | <number>mil |
| 76 | |
| 77 | The words "mm" and "mil" set the input to the specified unit. The |
| 78 | default unit is millimeter. If a number is followed by "mm" or "mil" |
| 79 | without intervening space, the unit is overridden for this number, |
| 80 | without affecting the default input unit. |
| 81 | |
| 82 | Note that "mm" and "mil" only affect dimensions in the command file |
| 83 | and have no effect on the interpretation of toolpath files. |
| 84 | |
| 85 | |
| 86 | Filtering: |
| 87 | |
| 88 | remove <x0> <y0> <x1> <y1> |
| 89 | keep <x0> <y0> <x1> <y1> |
| 90 | |
| 91 | "remove" removes all paths that have at least one vertex inside the |
| 92 | specified rectangle. "keep" keeps only paths that have all vertices |
| 93 | in the rectangle. |
| 94 | |
| 95 | |
| 96 | Horizontal adjustments: |
| 97 | |
| 98 | align <ref> <x> <y> |
| 99 | align <ref> <x0> <y0> <x1> <y1> |
| 100 | array <x-step> <y-step> <x-index> <y-index> |
| 101 | translate <x> <y> |
| 102 | rotate <angle> |
| 103 | flip <axis> [<center>] |
| 104 | reset |
| 105 | |
| 106 | "translate" shifts the currently loaded paths by the specified distance. |
| 107 | "align" is a more sophisticated form of "translate", which moves a |
| 108 | reference point in the bounding box of the currently loaded paths either |
| 109 | to a specified location (if used with three arguments) or to the |
| 110 | respective point in a rectangle (if used with five arguments). |
| 111 | |
| 112 | The reference point is specified with a number as follows: |
| 113 | |
| 114 | 7-----8-----9 |
| 115 | | | |
| 116 | 4 5 6 |
| 117 | | | |
| 118 | 1-----2-----3 |
| 119 | |
| 120 | "1" is the lower left corner, "5" is the center, and so on. |
| 121 | |
| 122 | "array" is used when cutting several copies of the same piece. The first |
| 123 | two arguments define the step between pieces while the second two |
| 124 | arguments define how many steps in each direction are taken. A step size |
| 125 | can be specified as the total distance, or as the border to add to the |
| 126 | respective dimension of the bounding box of the current path. In the |
| 127 | latter case, the border size is prefix with a plus sign. Example: |
| 128 | |
| 129 | array 37mm 19mm 0 1 |
| 130 | array +3mm +3mm 0 1 |
| 131 | |
| 132 | "align" moves the toolpath to an absolute position while "array" and |
| 133 | "translate" move relative to the current position. The total translation |
| 134 | is remembered also across "clean", so that an alignment can be applied to |
| 135 | multiple toolpaths. |
| 136 | |
| 137 | "rotate" rotates the currenly loaded paths by the specified number of |
| 138 | degrees in a counter-clockwise direction. Like translations, rotations |
| 139 | are accumulated and are automatically applied to files loaded later. |
| 140 | Note that rotation is applied before translation. Therefore, using |
| 141 | "rotate" after "translate", "array", or "align" may yield unexpected |
| 142 | results. |
| 143 | |
| 144 | "flip" flips X/Y coordinates on the respective axis ("x" or "y"). If |
| 145 | the center is omitted, the piece is flipped on (xymin+xymax)/2. |
| 146 | |
| 147 | "reset" sets translation and rotation to zero. The way "reset" is currently |
| 148 | implemented, it does not affect the currently loaded toolpath. (But it's |
| 149 | better to use it only with "clean".) |
| 150 | |
| 151 | |
| 152 | Vertical adjustment: |
| 153 | |
| 154 | z [<z0>] <z0-pos> |
| 155 | |
| 156 | |
| 157 | Tool compensation: |
| 158 | |
| 159 | offset [dog] [inside] |
| 160 | |
| 161 | "offset" offsets the toolpaths by the tool radius. By default, it offsets |
| 162 | the outermost toolpath to the outside and all other toolpaths to the |
| 163 | inside. This can be overridden with the #%outside directive in a gnuplot |
| 164 | file or the "inside" option to "offset". "inside" has precedence over |
| 165 | "#%outside". |
| 166 | |
| 167 | Concave corners on an outside path are normally cut such that the corner |
| 168 | is round, leaving material at and near the corner point. The option "dog" |
| 169 | changes this to cutting a "dogbone" hole such that material is also |
| 170 | removed up to the corner point. |
| 171 | |
| 172 | |
| 173 | Area clearing: |
| 174 | |
| 175 | area <overlap> |
| 176 | |
| 177 | WARNING: sometimes produces inaccurate results with toolpaths that eat |
| 178 | into the workpiece. Always check the toolpath before machining ! |
| 179 | |
| 180 | Generate toolpaths to mill (remove) the area enclosed by the current |
| 181 | path. If there are multiple paths, the area in the outermost is removed |
| 182 | but the areas covered by enclosed paths are left intact. If they contain |
| 183 | paths of their own, these are milled again, and so on. |
| 184 | |
| 185 | "area" also mills along the outlines of the paths which is similar to |
| 186 | what "offset" does. |
| 187 | |
| 188 | The overlap is the distance by which the areas cleared by parallel paths |
| 189 | should overlap. |
| 190 | |
| 191 | If the current paths have different Z coordinates, each level is |
| 192 | processed separately. |
| 193 | |
| 194 | |
| 195 | Path reversal: |
| 196 | |
| 197 | reverse |
| 198 | |
| 199 | Reverses all paths. This can be used to reverse tool direction. |
| 200 | |
| 201 | |
| 202 | Drill/mill conversion: |
| 203 | |
| 204 | drill <min-diameter> <max-diameter> |
| 205 | drill <min-diameter>,<max-diameter> |
| 206 | mill <diameter> <step> |
| 207 | remainder |
| 208 | empty |
| 209 | |
| 210 | "drill" and "mill" search for paths that can be processed with the |
| 211 | specified tool and generate the corresponding toolpaths. After "drill" |
| 212 | or "mill", only the toolpaths for this tool remain. The paths that |
| 213 | have been converted are removed and the paths for which the tool is |
| 214 | unsuitable are moved to a separate list, the remainder list. |
| 215 | |
| 216 | The two parameters of "drill" can be separated by whitespace or by a |
| 217 | comma. The latter form can be convenient when passing the diameter |
| 218 | range around in shell scripts. |
| 219 | |
| 220 | "remainder" clears the list of paths and sets the list of paths to |
| 221 | the remainder list. Note that "clear" does not affect the remainder |
| 222 | list. |
| 223 | |
| 224 | "empty" does nothing if the list of paths is empty and makes cameo |
| 225 | exit with an error if there are paths in the list. This can be used |
| 226 | to ensure that all paths in a file have been converted. |
| 227 | |
| 228 | Example: |
| 229 | |
| 230 | excellon example.drl |
| 231 | drill 7mil 13mil |
| 232 | write drill.gp |
| 233 | remainder |
| 234 | mill 0.8mm 0.01mm |
| 235 | write mill.gp |
| 236 | remainder |
| 237 | empty |
| 238 | |
| 239 | In this example, we first load a drill file. Then we generate drill |
| 240 | commands for all simple holes with a diameter between 7 mil and 13 mil |
| 241 | and write the toolpaths to the file "drill.gp". Next, we retrieve the |
| 242 | remaining paths, generate toolpaths for a 0.8 mm endmill, and write |
| 243 | them to the file "mill.gp". Finally, we check that all paths have been |
| 244 | processed. |
| 245 | |
| 246 | |
| 247 | Tool path optimization: |
| 248 | |
| 249 | optimize |
| 250 | |
| 251 | Try to reduce the movements made between paths by reordering the paths. |
| 252 | Note that this disturbs the order generated by "offset" and should thus |
| 253 | not be used on paths that are to be executed in a specific sequence. |
| 254 | |
| 255 | purge [<length>] |
| 256 | |
| 257 | Remove all corners where the area of the corresponding parallelogram is |
| 258 | inferior to the square of the length parameter. This is particularly |
| 259 | useful for removing artefacts that cold upset later processing steps. |
| 260 | If the length omitted, a default of 1 um is used. |
| 261 | |
| 262 | |
| 263 | Statistics: |
| 264 | |
| 265 | stats |
| 266 | |
| 267 | Prints the number of paths and segments, plus their total length. |
| 268 |
Branches:
master
