Date: | 2012-03-21 05:00:12 (11 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | 6d70656ab2b280c9b77676a0d2f72928bdee88b8 |
Message: | cameo/path.c (path_offset): handle also degenerate polygons of only
one point To do: use a square, not a circle. Also, extend this to degenerate polygons consisting of two points. |
Files: |
cameo/path.c (3 diffs) |
Change Details
cameo/path.c | ||
---|---|---|
1 | 1 | /* |
2 | 2 | * path.c - Toolpath operations |
3 | 3 | * |
4 | * Written 2010-2011 by Werner Almesberger | |
5 | * Copyright 2010-2011 Werner Almesberger | |
4 | * Written 2010-2012 by Werner Almesberger | |
5 | * Copyright 2010-2012 Werner Almesberger | |
6 | 6 | * |
7 | 7 | * This program is free software; you can redistribute it and/or modify |
8 | 8 | * it under the terms of the GNU General Public License as published by |
... | ... | |
17 | 17 | #include <assert.h> |
18 | 18 | |
19 | 19 | #include "util.h" |
20 | #include "shape.h" | |
20 | 21 | #include "path.h" |
21 | 22 | |
22 | 23 | |
... | ... | |
316 | 317 | int dog; |
317 | 318 | |
318 | 319 | assert(path_is_closed(path)); |
320 | if (path->first == path->last) | |
321 | return circle(path->first->x, path->first->y, path->first->z, | |
322 | path->r_tool, path->r_tool, 0.1, path->id); | |
319 | 323 | new = path_from(path); |
320 | 324 | prev = path->first; |
321 | 325 | for (p = path->first->next; p; p = p->next) { |
Branches:
master