1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 07:54:38 +02:00
cae-tools/cameo/path.h
Werner Almesberger b47ef755ec Dogbone notches are now optional and can be set in the gnuplot file.
- cameo/cameo.c (main): use getopt
- cameo/cameo.c (main, usage, process_path): option -d to enable dog-bone
  notches (they're now disabled by default)
- cameo/path.h (struct path), cameo/path.c (path_new, path_from): added
  attribute "notch" to enable notches for a path
- cameo/gnuplot.c (gnuplot_read, gnuplot_do_write): read and write the
  #%notch hint
2010-11-01 19:20:44 -03:00

42 lines
1.1 KiB
C

/*
* path.h - Toolpath operations
*
* Written 2010 by Werner Almesberger
* Copyright 2010 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
* 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 */
int outside; /* non-zero to mark path as an outside edge */
int notch; /* non-zero to enable dog-boning for path */
struct path *next;
};
struct path *path_new(double r_tool);
void path_add(struct path *path, double x, double y, double z);
void path_replace(struct path *old, struct path *new);
struct path *path_reverse(const struct path *path);
int path_tool_is_left(const struct path *path);
struct path *path_offset(const struct path *path, int left, int notch);
struct path *path_find_leftmost(struct path *path);
void path_free(struct path *path);
#endif /* !PATH_H */