1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2025-04-21 12:27:27 +03:00

ptrude/: path extrusion, work in progress

This commit is contained in:
Werner Almesberger
2011-07-28 22:31:25 -03:00
parent 4ae218c6dc
commit d4c96f129d
8 changed files with 574 additions and 0 deletions

28
ptrude/path.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef PATH_H
#define PATH_H
#include <stdio.h>
struct vertex {
double x, y;
double r; /* minimum bend radius; 0 = use previous value */
double d; /* max. distance of corner from ideal arc; 0 = prev */
const char *tag;
struct vertex *next;
};
struct path {
struct vertex *vertices;
struct vertex **last;
};
void free_path(struct path *path);
struct path *round_path(const struct path *path, double r, double d);
struct path *load_path(FILE *file);
void save_path(FILE *file, const struct path *path);
#endif /* !PATH_H */