1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2025-04-21 12:27:27 +03:00

cameo: new command "reverse" to reverse all paths

Experimentally used to reverse tool direction in the smoothing pass.
This commit is contained in:
Werner Almesberger
2012-03-21 20:31:29 -03:00
parent c422be5543
commit c59e39356b
5 changed files with 36 additions and 6 deletions

View File

@@ -189,7 +189,7 @@ static struct path **classify(struct path **anchor, struct path *path)
%token TOK_ALIGN TOK_ARRAY TOK_CLEAR TOK_DRILL TOK_EMPTY TOK_AREA
%token TOK_MILL TOK_OFFSET TOK_OPTIMIZE TOK_REMAINDER TOK_RESET
%token TOK_ROTATE TOK_STATS TOK_TRANSLATE TOK_Z
%token TOK_REVERSE TOK_ROTATE TOK_STATS TOK_TRANSLATE TOK_Z
%token TOK_APPEND TOK_GERBER TOK_GNUPLOT TOK_EXCELLON TOK_WRITE
%token TOK_DOG TOK_INSIDE TOK_ANY
@@ -255,6 +255,14 @@ command:
{
paths = optimize_paths(paths);
}
| TOK_REVERSE
{
struct path *tmp;
tmp = reverse_paths(paths);
clear_paths();
paths = tmp;
}
| TOK_ROTATE number
{
rotate(paths, $2);