diff --git a/cameo/README b/cameo/README index 01cb830..eea93a5 100644 --- a/cameo/README +++ b/cameo/README @@ -158,6 +158,7 @@ removed up to the corner point. Drill/mill conversion: drill + drill , mill remainder empty @@ -168,6 +169,10 @@ 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. diff --git a/cameo/lang.y b/cameo/lang.y index efd0e29..d690c0c 100644 --- a/cameo/lang.y +++ b/cameo/lang.y @@ -310,7 +310,7 @@ command: gnuplot_append($2, paths); translate(paths, 0, 0, -zo); } - | TOK_DRILL dimen dimen + | TOK_DRILL dimen opt_comma dimen { struct path **walk; @@ -319,7 +319,7 @@ command: walk = &remain; while (*walk) walk = - classify(walk, try_drill(*walk, $2, $3)); + classify(walk, try_drill(*walk, $2, $4)); } | TOK_MILL dimen dimen { @@ -433,3 +433,7 @@ offset_option: $$ = OO_INSIDE; } ; + +opt_comma: + | ',' + ;