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

Accept multiple paths and distinguish between inner paths and the outer path.

- cameo/path.h, cameo/path.c (path_replace): replace a path in a list of
  paths with a different path
- cameo/path.h, cameo/path.c (path_find_leftmost): find the leftmost path
  in a list of paths
- cameo/path.h, cameo/path.c (path_free): move freeing of points to separate
  function free_points, for sharing with path_replace
- cameo/cameo.c (main): move path processing to new function process_paths
- cameo/cameo.c (process_paths): treat the leftmost path a outside path and
  process it last. Treat all others as inside paths.
This commit is contained in:
Werner Almesberger
2010-11-01 17:23:19 -03:00
parent d465acbeb5
commit 17afa3e2bb
3 changed files with 74 additions and 18 deletions

View File

@@ -29,9 +29,11 @@ struct path {
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 */