diff --git a/cameo/path.c b/cameo/path.c index 2abd18d..dfdb92f 100644 --- a/cameo/path.c +++ b/cameo/path.c @@ -1,8 +1,8 @@ /* * path.c - Toolpath operations * - * Written 2010-2011 by Werner Almesberger - * Copyright 2010-2011 Werner Almesberger + * Written 2010-2012 by Werner Almesberger + * Copyright 2010-2012 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 @@ -17,6 +17,7 @@ #include #include "util.h" +#include "shape.h" #include "path.h" @@ -316,6 +317,9 @@ struct path *path_offset(const struct path *path, int left, int notch) int dog; assert(path_is_closed(path)); + if (path->first == path->last) + return circle(path->first->x, path->first->y, path->first->z, + path->r_tool, path->r_tool, 0.1, path->id); new = path_from(path); prev = path->first; for (p = path->first->next; p; p = p->next) {