mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2025-01-09 01:40:15 +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)
|
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;
|
p->next = NULL;
|
||||||
if (path->last)
|
if (path->last)
|
||||||
path->last->next = p;
|
path->last->next = p;
|
||||||
|
Loading…
Reference in New Issue
Block a user