mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2025-04-21 12:27:27 +03:00
cameo: new command "stats" to print path statistics
- README: documented the "stats" command - lang.l, lang.y: added "stats" command - path.h (path_stats), path.c (path_stats): calculate and print path statistics
This commit is contained in:
10
cameo/lang.y
10
cameo/lang.y
@@ -2,8 +2,8 @@
|
||||
/*
|
||||
* lang.y - Toolpath adaptation language
|
||||
*
|
||||
* Written 2010 by Werner Almesberger
|
||||
* Copyright 2010 by Werner Almesberger
|
||||
* Written 2010-2011 by Werner Almesberger
|
||||
* Copyright 2010-2011 by Werner Almesberger
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -187,7 +187,7 @@ static struct path **classify(struct path **anchor, struct path *path)
|
||||
|
||||
%token TOK_ALIGN TOK_ARRAY TOK_CLEAR TOK_DRILL TOK_EMPTY
|
||||
%token TOK_MILL TOK_OFFSET TOK_OPTIMIZE TOK_REMAINDER TOK_RESET
|
||||
%token TOK_ROTATE TOK_TRANSLATE TOK_Z
|
||||
%token TOK_ROTATE TOK_STATS TOK_TRANSLATE TOK_Z
|
||||
%token TOK_APPEND TOK_GERBER TOK_GNUPLOT TOK_EXCELLON TOK_WRITE
|
||||
%token TOK_DOG TOK_INSIDE
|
||||
|
||||
@@ -253,6 +253,10 @@ command:
|
||||
rotate(paths, $2);
|
||||
rot += $2;
|
||||
}
|
||||
| TOK_STATS
|
||||
{
|
||||
path_stats(paths);
|
||||
}
|
||||
| TOK_TRANSLATE dimen dimen
|
||||
{
|
||||
translate(paths, $2, $3, 0);
|
||||
|
||||
Reference in New Issue
Block a user