Date:2010-12-15 10:13:40 (13 years 3 months ago)
Author:Werner Almesberger
Commit:7a64e425da4a6dbecf4991135f2093fcfb47fd47
Message:cameo: completed support for dril/mill conversions

- README: changed the term "drill/mill substitution" to "drill/mill
conversion"
- README: described the drill/mill conversion commands
- lang.y: "drill" and "mill" worked on the wrong (empty) list
- ops.c (half_circle): fixed transcription error
Files: cameo/README (1 diff)
cameo/lang.y (2 diffs)
cameo/shape.c (1 diff)

Change Details

cameo/README
138138removed up to the corner point.
139139
140140
141Drill/mill substitution:
141Drill/mill conversion:
142142
143143  drill <min-diameter> <max-diameter>
144144  mill <diameter> <step>
145145  remainder
146146  empty
147
148"drill" and "mill" search for paths that can be processed with the
149specified tool and generate the corresponding toolpaths. After "drill"
150or "mill", only the toolpaths for this tool remain. The paths that
151have been converted are removed and the paths for which the tool is
152unsuitable are moved to a separate list, the remainder list.
153
154"remainder" clears the list of paths and sets the list of paths to
155the remainder list. Note that "clear" does not affect the remainder
156list.
157
158"empty" does nothing if the list of paths is empty and makes cameo
159exit with an error if there are paths in the list. This can be used
160to ensure that all paths in a file have been converted.
161
162Example:
163
164  excellon example.drl
165  drill 7mil 13mil
166  write drill.gp
167  remainder
168  mill 0.8mm 0.01mm
169  write mill.gp
170  remainder
171  empty
172
173In this example, we first load a drill file. Then we generate drill
174commands for all simple holes with a diameter between 7 mil and 13 mil
175and write the toolpaths to the file "drill.gp". Next, we retrieve the
176remaining paths, generate toolpaths for a 0.8 mm endmill, and write
177them to the file "mill.gp". Finally, we check that all paths have been
178processed.
cameo/lang.y
247247
248248            remain = paths;
249249            paths = NULL;
250            walk = &paths;
250            walk = &remain;
251251            while (*walk)
252252                walk =
253253                    classify(walk, try_drill(*walk, $2, $3));
...... 
258258
259259            remain = paths;
260260            paths = NULL;
261            walk = &paths;
261            walk = &remain;
262262            while (*walk)
263263                walk = classify(walk, try_mill(*walk, $2, $3));
264264        }
cameo/shape.c
3939    m[3] = m[0];
4040
4141    for (a = 0; a < M_PI; a += s) {
42        path_add(path, cx+x, cy+x, z);
42        path_add(path, cx+x, cy+y, z);
4343        tmp = x*m[0]+y*m[1];
4444        y = x*m[2]+y*m[3];
4545        x = tmp;

Archive Download the corresponding diff file

Branches:
master



interactive