2010-11-01 19:58:29 +02:00
|
|
|
/*
|
|
|
|
* path.h - Toolpath operations
|
|
|
|
*
|
2011-02-13 07:25:32 +02:00
|
|
|
* Written 2010-2011 by Werner Almesberger
|
|
|
|
* Copyright 2010-2011 Werner Almesberger
|
2010-11-01 19:58:29 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef PATH_H
|
|
|
|
#define PATH_H
|
|
|
|
|
|
|
|
|
|
|
|
struct point {
|
|
|
|
double x, y, z; /* mm */
|
|
|
|
struct point *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct path {
|
|
|
|
struct point *first, *last;
|
|
|
|
double r_tool; /* mm */
|
2010-11-01 23:50:24 +02:00
|
|
|
int outside; /* non-zero to mark path as an outside edge */
|
2010-11-02 00:15:35 +02:00
|
|
|
int notch; /* non-zero to enable dog-boning for path */
|
2011-09-05 11:46:25 +03:00
|
|
|
const char *id; /* identifier assigned by generator */
|
2010-11-01 19:58:29 +02:00
|
|
|
struct path *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-09-05 11:46:25 +03:00
|
|
|
struct path *path_new(double r_tool, const char *id);
|
2010-11-01 19:58:29 +02:00
|
|
|
void path_add(struct path *path, double x, double y, double z);
|
|
|
|
struct path *path_reverse(const struct path *path);
|
2010-11-01 20:43:37 +02:00
|
|
|
int path_tool_is_left(const struct path *path);
|
|
|
|
struct path *path_offset(const struct path *path, int left, int notch);
|
2011-09-05 13:54:29 +03:00
|
|
|
const struct path *path_find_leftmost(const struct path *path);
|
2010-11-01 19:58:29 +02:00
|
|
|
void path_free(struct path *path);
|
2010-12-13 22:45:33 +02:00
|
|
|
struct path *path_connect(struct path *path);
|
2011-02-13 07:25:32 +02:00
|
|
|
void path_stats(const struct path *path);
|
2010-11-01 19:58:29 +02:00
|
|
|
|
|
|
|
#endif /* !PATH_H */
|