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 | ||
---|---|---|
138 | 138 | removed up to the corner point. |
139 | 139 | |
140 | 140 | |
141 | Drill/mill substitution: | |
141 | Drill/mill conversion: | |
142 | 142 | |
143 | 143 | drill <min-diameter> <max-diameter> |
144 | 144 | mill <diameter> <step> |
145 | 145 | remainder |
146 | 146 | empty |
147 | ||
148 | "drill" and "mill" search for paths that can be processed with the | |
149 | specified tool and generate the corresponding toolpaths. After "drill" | |
150 | or "mill", only the toolpaths for this tool remain. The paths that | |
151 | have been converted are removed and the paths for which the tool is | |
152 | unsuitable are moved to a separate list, the remainder list. | |
153 | ||
154 | "remainder" clears the list of paths and sets the list of paths to | |
155 | the remainder list. Note that "clear" does not affect the remainder | |
156 | list. | |
157 | ||
158 | "empty" does nothing if the list of paths is empty and makes cameo | |
159 | exit with an error if there are paths in the list. This can be used | |
160 | to ensure that all paths in a file have been converted. | |
161 | ||
162 | Example: | |
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 | ||
173 | In this example, we first load a drill file. Then we generate drill | |
174 | commands for all simple holes with a diameter between 7 mil and 13 mil | |
175 | and write the toolpaths to the file "drill.gp". Next, we retrieve the | |
176 | remaining paths, generate toolpaths for a 0.8 mm endmill, and write | |
177 | them to the file "mill.gp". Finally, we check that all paths have been | |
178 | processed. |
cameo/lang.y | ||
---|---|---|
247 | 247 | |
248 | 248 | remain = paths; |
249 | 249 | paths = NULL; |
250 | walk = &paths; | |
250 | walk = &remain; | |
251 | 251 | while (*walk) |
252 | 252 | walk = |
253 | 253 | classify(walk, try_drill(*walk, $2, $3)); |
... | ... | |
258 | 258 | |
259 | 259 | remain = paths; |
260 | 260 | paths = NULL; |
261 | walk = &paths; | |
261 | walk = &remain; | |
262 | 262 | while (*walk) |
263 | 263 | walk = classify(walk, try_mill(*walk, $2, $3)); |
264 | 264 | } |
cameo/shape.c | ||
---|---|---|
39 | 39 | m[3] = m[0]; |
40 | 40 | |
41 | 41 | 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); | |
43 | 43 | tmp = x*m[0]+y*m[1]; |
44 | 44 | y = x*m[2]+y*m[3]; |
45 | 45 | x = tmp; |
Branches:
master