mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2025-04-21 12:27:27 +03:00
cameo: an attempt at area fill (WIP)
This commit is contained in:
15
cameo/lang.y
15
cameo/lang.y
@@ -2,8 +2,8 @@
|
||||
/*
|
||||
* lang.y - Toolpath adaptation language
|
||||
*
|
||||
* Written 2010-2011 by Werner Almesberger
|
||||
* Copyright 2010-2011 by Werner Almesberger
|
||||
* Written 2010-2012 by Werner Almesberger
|
||||
* Copyright 2010-2012 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
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "path.h"
|
||||
#include "ops.h"
|
||||
#include "area.h"
|
||||
#include "gnuplot.h"
|
||||
#include "gerber.h"
|
||||
#include "excellon.h"
|
||||
@@ -186,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_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_APPEND TOK_GERBER TOK_GNUPLOT TOK_EXCELLON TOK_WRITE
|
||||
@@ -327,6 +328,14 @@ command:
|
||||
walk =
|
||||
classify(walk, try_drill(*walk, $2, $4));
|
||||
}
|
||||
| TOK_AREA dimen opt_comma dimen
|
||||
{
|
||||
struct path *tmp;
|
||||
|
||||
tmp = area(paths, $2/2, $4);
|
||||
clear_paths();
|
||||
paths = tmp;
|
||||
}
|
||||
| TOK_MILL opt_any dimen dimen
|
||||
{
|
||||
struct path **walk;
|
||||
|
||||
Reference in New Issue
Block a user