diff --git a/cameo/README b/cameo/README index 42ce688..724cdb2 100644 --- a/cameo/README +++ b/cameo/README @@ -155,6 +155,22 @@ changes this to cutting a "dogbone" hole such that material is also removed up to the corner point. +Area clearing: + + area + +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. + + Drill/mill conversion: drill diff --git a/cameo/area.c b/cameo/area.c index baa252b..3d2ff19 100644 --- a/cameo/area.c +++ b/cameo/area.c @@ -313,12 +313,12 @@ static void fill_path(const struct path *paths, const struct path *path, } -struct path *area(const struct path *path, double r_tool, double overlap) +struct path *area(const struct path *path, double overlap) { struct path *res = NULL; if (!path) return NULL; - fill_path(path, path_find_leftmost(path), r_tool, overlap, &res); + fill_path(path, path_find_leftmost(path), path->r_tool, overlap, &res); return res; } diff --git a/cameo/area.h b/cameo/area.h index 5f1c907..d68de2f 100644 --- a/cameo/area.h +++ b/cameo/area.h @@ -18,6 +18,6 @@ #include "path.h" -struct path *area(const struct path *path, double r_tool, double overlap); +struct path *area(const struct path *path, double overlap); #endif /* !AREA_H */ diff --git a/cameo/lang.y b/cameo/lang.y index 5757934..677bcf8 100644 --- a/cameo/lang.y +++ b/cameo/lang.y @@ -328,11 +328,11 @@ command: walk = classify(walk, try_drill(*walk, $2, $4)); } - | TOK_AREA dimen opt_comma dimen + | TOK_AREA dimen { struct path *tmp; - tmp = area(paths, $2/2, $4); + tmp = area(paths, $2); clear_paths(); paths = tmp; } diff --git a/cameo/test/doit b/cameo/test/doit index 1b2c199..aa0599c 100755 --- a/cameo/test/doit +++ b/cameo/test/doit @@ -1,6 +1,6 @@ #!/bin/sh ../cameo <