mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2025-01-03 20:20:15 +02:00
cameo: "area" now also adds the outline cuts
"offset" wasn't suitable for alternating inside and outside anyway.
This commit is contained in:
parent
8c4dfc55b6
commit
35c0624dc5
14
cameo/area.c
14
cameo/area.c
@ -267,6 +267,18 @@ printf(" x=%g\n", x);
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void add_outline(const struct path *path, int inside, struct path **res)
|
||||||
|
{
|
||||||
|
struct path *new;
|
||||||
|
int left;
|
||||||
|
|
||||||
|
left = path_tool_is_left(path);
|
||||||
|
new = path_offset(path, inside ? !left : left, 0);
|
||||||
|
new->next = *res;
|
||||||
|
*res = new;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void fill_path(const struct path *paths, const struct path *path,
|
static void fill_path(const struct path *paths, const struct path *path,
|
||||||
double r_tool, double overlap, struct path **res)
|
double r_tool, double overlap, struct path **res)
|
||||||
{
|
{
|
||||||
@ -292,8 +304,10 @@ printf("x[%g:%g] y[%g:%g] n=%d\n", xa, xb, ya, yb, n);
|
|||||||
for (s2 = sub2; *s2; s2++)
|
for (s2 = sub2; *s2; s2++)
|
||||||
fill_path(paths, *s2, r_tool, overlap, res);
|
fill_path(paths, *s2, r_tool, overlap, res);
|
||||||
free(sub2);
|
free(sub2);
|
||||||
|
add_outline(*s, 0, res);
|
||||||
}
|
}
|
||||||
free(sub);
|
free(sub);
|
||||||
|
add_outline(path, 1, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
../cameo <<EOF
|
../cameo <<EOF
|
||||||
gnuplot 3 in.gp
|
gnuplot 3 in.gp
|
||||||
offset inside
|
|
||||||
write out.gp
|
|
||||||
clear
|
|
||||||
gnuplot 3 in.gp
|
|
||||||
area 3 0
|
area 3 0
|
||||||
append out.gp
|
write out.gp
|
||||||
EOF
|
EOF
|
||||||
|
@ -16,14 +16,12 @@
|
|||||||
10 100 0
|
10 100 0
|
||||||
0 0 0
|
0 0 0
|
||||||
|
|
||||||
#%outside
|
|
||||||
50 40 0
|
50 40 0
|
||||||
80 40 0
|
80 40 0
|
||||||
80 70 0
|
80 70 0
|
||||||
50 70 0
|
50 70 0
|
||||||
50 40 0
|
50 40 0
|
||||||
|
|
||||||
#%outside
|
|
||||||
10 30 0
|
10 30 0
|
||||||
30 30 0
|
30 30 0
|
||||||
30 50 0
|
30 50 0
|
||||||
|
Loading…
Reference in New Issue
Block a user