1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 21:58:38 +02:00
Commit Graph

15 Commits

Author SHA1 Message Date
Werner Almesberger
639b0fa2d6 cameo/: make tool_comp_paths output paths in the order processed 2011-09-05 07:54:29 -03:00
Werner Almesberger
828763b747 cameo/path.c (path_replace): free the old ID 2011-09-05 06:20:12 -03:00
Werner Almesberger
a42a18fef3 cameo/: new gnuplot tag #%id= with generator-assigned identifier
Excellon and Gerber store the file name there.
2011-09-05 05:46:25 -03:00
Werner Almesberger
dfc53c781a cameo: new command "stats" to print path statistics
- README: documented the "stats" command
- lang.l, lang.y: added "stats" command
- path.h (path_stats), path.c (path_stats): calculate and print path
  statistics
2011-02-13 02:25:32 -03:00
Werner Almesberger
6947b3a5d1 cameo: allow for rounding errors KiCad produces with a metric grid
- cameo/path.c (path_is_closed): use points_eq instead of open-coding the
  comparison
- cameo//path.c (EPSILON_MM, points_eq): consider two points as equal if
  their projections on the xy plane are less than EPSILON_MM apart and
  their z positions don't differ by more than the same distance
2011-01-31 19:36:59 -03:00
Werner Almesberger
4b717cadc6 cameo/path.c (path_connect): corrected logic when merging B->A 2011-01-05 23:07:34 -03:00
Werner Almesberger
8999b3016a cameo: added KiCad Gerber input and path merging
- Makefile (OBJS): added gerber.o
- cameo.c (usage, main): new option -g to process input a KiCad Gerber
- gerber.h, gerber.c (gerber_read): parse Gerber files as generated by KiCad
- path.h, path.c (path_reverse_inplace, points_eq, attr_eq, path_connect):
  merge sets of paths with equal endpoints into single paths
2010-12-13 17:45:33 -03:00
Werner Almesberger
ffc908af19 cameo/path.c (path_add_point): ignore duplicate points 2010-11-01 19:34:51 -03:00
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
Werner Almesberger
d77b4c8570 Added override (in gnuplot file) for inside/outside path detection.
- cameo/cameo.c (process_paths): explain the inside/outside path detection
  heuristics
- cameo/path.h (struct path), cameo/path.c (path_new): added attribute
  "outside" to explicitly mark paths as outside edges
- cameo/path.c (path_from): new function to make a path that takes the
  attributes of another path
- cameo/path.c (path_reverse, path_offset): use path_from instead of
  path_new
- cameo/gnuplot.c (gnuplot_read, gnuplot_do_write): read and write the
  #%outside hint
2010-11-01 19:20:26 -03:00
Werner Almesberger
17afa3e2bb 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.
2010-11-01 17:23:19 -03:00
Werner Almesberger
d465acbeb5 Enable more compiler warnings. Some cleanup.
- cameo/Makefile (CFLAGS): added more warning flags
- cameo/path.h (path_direction): removed unused prototype
- cameo/path.c (angle): renamed to angle_3 to keep it from getting shadowed
  by local variable
2010-11-01 16:56:09 -03:00
Werner Almesberger
5c9e7d5e52 Corrected math for offsets to work also for angles different from 90 degrees.
- cameo/path.c (offset_point): calculation assumed the normals were
  linearly independent. Replaced it with corrected version.
2010-11-01 16:42:32 -03:00
Werner Almesberger
54d8549fa2 cameo: detect and adjust handedness
- cameo/path.h, cameo/path.c (offset_point, path_offset): added "left"
  argument to indicate the handedness
- cameo/path.h, cameo/path.c (path_tool_is_left): new function to determine
  which way the path turns
- cameo/cameo.c: auto-detect handedness and instruct path_offset accordingly
2010-11-01 15:43:37 -03:00
Werner Almesberger
0bc780611d Introducing cameo, a toolbox of CAM operations. 2010-11-01 14:58:29 -03:00