mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2025-04-21 12:27:27 +03:00
ptrude/: functions for path stretching and calculation of proportional length
This commit is contained in:
@@ -22,6 +22,14 @@ struct vertex {
|
||||
double d; /* max. distance of corner from ideal arc; 0 = prev */
|
||||
const char *tag;
|
||||
struct vertex *next;
|
||||
|
||||
/*
|
||||
* "len" is set by path_set_len to the distance to the next vertex, or
|
||||
* 0 if this is the last vertex in the path. round_path adjusts "len"
|
||||
* such that it corresponds to the length of the same part of the
|
||||
* original path.
|
||||
*/
|
||||
double len;
|
||||
};
|
||||
|
||||
struct path {
|
||||
@@ -32,7 +40,9 @@ struct path {
|
||||
|
||||
void free_path(struct path *path);
|
||||
|
||||
double path_set_length(struct path *path);
|
||||
struct path *round_path(const struct path *path, double r, double d);
|
||||
struct path *stretch_path(const struct path *path, double d);
|
||||
|
||||
struct path *load_path(FILE *file);
|
||||
void save_path(FILE *file, const struct path *path);
|
||||
|
||||
Reference in New Issue
Block a user