mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-23 04:58:38 +02:00
cameo/: experimental command "outside" to detect real outer borders
Should be merged into tool_comp_paths later.
This commit is contained in:
parent
378aab025f
commit
072b7804ee
@ -49,6 +49,7 @@ NUM -?[0-9]+\.?[0-9]*
|
||||
<INITIAL>mill return TOK_MILL;
|
||||
<INITIAL>offset return TOK_OFFSET;
|
||||
<INITIAL>optimize return TOK_OPTIMIZE;
|
||||
<INITIAL>outside return TOK_OUTSIDE;
|
||||
<INITIAL>remainder return TOK_REMAINDER;
|
||||
<INITIAL>remore return TOK_REMOVE;
|
||||
<INITIAL>reset return TOK_RESET;
|
||||
|
16
cameo/lang.y
16
cameo/lang.y
@ -188,7 +188,8 @@ static struct path **classify(struct path **anchor, struct path *path)
|
||||
|
||||
|
||||
%token TOK_ALIGN TOK_AREA TOK_ARRAY TOK_CLEAR TOK_DRILL TOK_EMPTY
|
||||
%token TOK_KEEP TOK_MILL TOK_OFFSET TOK_OPTIMIZE TOK_REMAINDER
|
||||
%token TOK_KEEP TOK_MILL TOK_OFFSET TOK_OPTIMIZE
|
||||
%token TOK_OUTSIDE TOK_REMAINDER
|
||||
%token TOK_REMOVE TOK_RESET
|
||||
%token TOK_REVERSE TOK_ROTATE TOK_STATS TOK_TRANSLATE TOK_Z
|
||||
%token TOK_APPEND TOK_GERBER TOK_GNUPLOT TOK_EXCELLON TOK_WRITE
|
||||
@ -256,6 +257,19 @@ command:
|
||||
{
|
||||
paths = optimize_paths(paths);
|
||||
}
|
||||
| TOK_OUTSIDE
|
||||
{
|
||||
struct path *a;
|
||||
struct path *b;
|
||||
|
||||
for (a = paths; a; a = a->next) {
|
||||
for (b = paths; b; b = b->next)
|
||||
if (a != b && path_is_inside(a, b))
|
||||
break;
|
||||
if (!b)
|
||||
a->outside = 1;
|
||||
}
|
||||
}
|
||||
| TOK_REVERSE
|
||||
{
|
||||
struct path *tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user