mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 23:59:34 +02:00
cameo/path.c (path_add_point): ignore duplicate points
This commit is contained in:
parent
b47ef755ec
commit
ffc908af19
@ -88,6 +88,12 @@ static int path_is_closed(const struct path *path)
|
||||
|
||||
static void path_add_point(struct path *path, struct point *p)
|
||||
{
|
||||
if (path->last &&
|
||||
path->last->x == p->x && path->last->y == p->y &&
|
||||
path->last->z == p->z) {
|
||||
free(p);
|
||||
return;
|
||||
}
|
||||
p->next = NULL;
|
||||
if (path->last)
|
||||
path->last->next = p;
|
||||
|
Loading…
Reference in New Issue
Block a user