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

58 Commits

Author SHA1 Message Date
Werner Almesberger
7a64e425da cameo: completed support for dril/mill conversions
- README: changed the term "drill/mill substitution" to "drill/mill
  conversion"
- README: described the drill/mill conversion commands
- lang.y: "drill" and "mill" worked on the wrong (empty) list
- ops.c (half_circle): fixed transcription error
2010-12-15 06:13:40 -03:00
Werner Almesberger
b1652fc50a cameo: adding support for dril/mill substitutions (in progress)
- Makefile (OBJS): added shape.o
- README: added section for drill/mill substitutions
- lang.l, lang.y: added commands "drill", "empty", "mill", "remainder", and
  "reset"
- lang.y (clear_paths): moved freeing of all paths from "clean" to shared
  function clear_paths
- ops.h, ops.c (try_drill, try_mill): helper functions for "drill" and
  "mill" commands
- shape.h. shape.c (slot, circle): functions to generate toolpaths for
  basic shapes
2010-12-15 04:56:58 -03:00
Werner Almesberger
848eb2a209 cameo: migrated Excellon reader from drl2gp
- Makefile (OBJS): added excellon.o
- README: added brief description of Excellon input
- excellon.h, excellon.c: adaptation of KiCad drill file reader from
  ../drl2gp/drl2gp.c
- lang.l, lang.y: added command "excellon" to read KiCad drill files
- gerber.h: removed stray newline
2010-12-15 03:27:55 -03:00
Werner Almesberger
26dc02ea57 cameo: fixed processing of omitted file names, documented file name usage
- README: document that file names can contain almost anything
- lang.l: reset the scanner state on \n, so that we stop looking for a
  file name if the file name has simply been omitted
2010-12-15 00:45:49 -03:00
Werner Almesberger
3ae3d6cdd3 cameo: cleaned up and documented the tool compensation
- README, lang.l, lang.y: renamed the "tool" command to "offset"
- README: documented "offset"
- ops.h, ops.c (tool_comp_paths), cameo.c (main), lang.y: added
  parameter to tool_comp_paths to treat all paths as internal
- lang.l, lang.y: added option "inside" to the "offset" command
- lang.y: "offset" can now take multiple options in any order
2010-12-14 23:37:31 -03:00
Werner Almesberger
68d5eff7cd cameo: split numbers into dimensions and "bare" numbers
- lang.l, lang.y (MIL2MM): moved unit conversion from lang.l to lang.y
- lang.l, lang.y: instead of returning dimensions and numbers as NUMBER,
  return as NUM_EXP_<unit> for numbers with an explicit unit, and as
  NUM_IMP_<unit> if the unit is implied
- lang.y (dimen): perform unit conversion as needed
- lang.y (number): never convert and only accept implicit dimensions
- lang.y: change all uses of NUMBER to "dimen", except for the
  multipliers in "array", where we can now use "number"
- lang.y: removed comment about "array" only working in metric mode
2010-12-14 19:50:53 -03:00
Werner Almesberger
f36f7048e6 cameo: documented X/Y translation commands, some small improvements
- README: described the X/Y translation commands
- lang.y: print an error if the lower bound if larger than the upper bount
  in an "align" command
- lang.y: mention that "array" doesn't work as expected if in imperial mode
2010-12-14 19:17:34 -03:00
Werner Almesberger
ddcf5191db cameo: various scanner and parser fixes
- README, lang.y: changed depth parameter of "z" command to position
  (sign changes)
- lang.l: defer FILENAME after "gerber" and "gnuplot", so that we don't
  mis-read the number
- lang.l, lang.y: return the reference point after "align" as new token
  REF, not as NUMEBER, so that we can catch syntax errors that would
  cause scanner and parser to become unsynchronized
- lang.l: accept negative numbers
- lang.l: added support for comments beginning with #
2010-12-14 16:49:26 -03:00
Werner Almesberger
fe50addf65 cameo: added invocation with an optional script
- cameo.c (usage, main): third form of invocation: cameo [script]
- cameo.c (run_script, main): run yyparse
2010-12-14 16:17:29 -03:00
Werner Almesberger
86c27dbe7c cameo: call tool compensation from script
- README, lang.l, lang.y: added option "dog" to "tool" command
- lang.y: call tool_comp_paths
2010-12-14 14:20:19 -03:00
Werner Almesberger
2bf4559f3f cameo: moved tool compensation from cameo.c to ops.c
- Makefile (OBJS): added ops.o
- cameo.c, ops.h, ops.c (process_path, process_paths): moved from cameo.c
  to ops.c
- ops.h, ops.c (process_paths), cameo.c (main): renamed process_paths to
  tool_comp_paths
- ops.c (process_path, tool_comp_paths): renamed process_path to
  tool_comp_1
2010-12-14 14:15:52 -03:00
Werner Almesberger
c8b62c2864 cameo/lang.y (align): completed alignment function 2010-12-14 14:04:35 -03:00
Werner Almesberger
1f63ef6391 cameo: changed dog_bone from global variable to argument
- cameo.c (dog_bone, main): moved global variable to "main"
- cameo.c (process_path, process_paths, main): pass dog_bone as argument
2010-12-14 13:54:00 -03:00
Werner Almesberger
f80a01a9c0 cameo: adding toolpath adaptation language (in progress)
- README: added description of toolpath adaptation language (in progress)
- Makefile (OBJS): added lex.yy.o and y.tab.o
- Makefile (SLOPPY): relaxed compiler warnings for files generated by
  flex/yacc
- Makefile (clean): added lex/yacc intermediate files
- Makefile: added lex and yacc (bison) to build process
- Makefile: added rules for lex/yacc intermediate files
- lang.l, lang.y: toolpath adaptation language (in progress)
2010-12-14 13:41:37 -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
f6cf2e1b9b Merge branch 'master' of projects.qi-hardware.com:cae-tools 2010-12-09 03:49:46 -03:00
Werner Almesberger
c411262880 drl2gp: added README and a copy of the GPLv2 2010-12-09 03:48:18 -03:00
Werner Almesberger
60002575b9 drl2gp.c: implemented drill file filtering, some code restructuring 2010-12-09 03:40:21 -03:00
Werner Almesberger
6f040f6a74 drl2gp.c: implemented drill file filtering, some code restructuring 2010-12-09 03:10:39 -03:00
Werner Almesberger
b75611a750 drl2gp.c: detect and report errors when writing to standard output 2010-12-08 09:09:21 -03:00
Werner Almesberger
a865854a19 drl2gp.c: added parsing of INCH/METRIC in header 2010-12-08 06:12:16 -03:00
Werner Almesberger
32f36ccbc4 drl2gp.c: added milling of slots (more to come) 2010-12-08 05:52:58 -03:00
Werner Almesberger
49a42cb500 drl2gp: drilling and circle milling work, various fixes (more to come) 2010-12-08 05:26:42 -03:00
Werner Almesberger
1ab262247f drl2gp: convert KiCad drill file (Excellon) to gnuplot (in progress) 2010-12-07 21:14:49 -03:00
Werner Almesberger
d31bd957ac cameo/gnuplot.c (gnuplot_do_write): only write r_tool hint if non-zero 2010-11-02 08:15:41 -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
Werner Almesberger
7ea7db84f9 Added the license (GPLv2+)
- solidify/README: added pointer to GPLv2(+)
- solidify/COPYING.GPLv2: a copy of the GPL
2010-09-29 13:56:50 -03:00
Werner Almesberger
c8b0a51364 solidify/README: some documentation 2010-09-29 13:50:03 -03:00
Werner Almesberger
5595c746cd solidify/template.pov: corrected aspect ratio (1.42 instead of 1.33) 2010-09-28 23:14:05 -03:00
Werner Almesberger
733332da8c The bottom face can now be shifted and rotated as well.
- solidify/overlap.h, solidify/overlap.c (edit_top, overlap_edit): select
  the face to rotate and shift
- solidify/overlap.c (scroll_event): select face to manipulate based on
  edit_top
- solidify/solidify.c (a_b, gui_buttons): new button B+A to select the
  bottom face for editing
- solidify/solidify.c clicked): call overlap_edit to select face to edit
2010-09-28 22:03:02 -03:00
Werner Almesberger
5fd9b33e5a Increased some borders/gaps for better visual appearance.
- solidify/level.c (level): increase gap between table cells from 2 to 4
  pixels for better visual separation of projections
- solidify/style.h (OVERLAP_BORDER): increased from 10 to 30 pixels
2010-09-28 20:51:57 -03:00
Werner Almesberger
f2963b9e2a Added a thin black border above and below the projections.
- solidify/style.h (PROJECTION_BORDER): number of pixels to leave dark above
  and below the face
- solidify/level.c (draw_xz, draw_zy, level): increase projection z size by
  twice the border width
- solidify/level.c (draw_xz, draw_zy): offset z coordinates by the border
2010-09-28 20:33:40 -03:00
Werner Almesberger
761002e0e5 Scale z axis in projection displays to obtain 1:1 aspect ratio.
- solidify/level.c (draw_xz, draw_zy): use f->sz-1 instead of zm as maximum
  value
- solidify/level.c (draw_xz, draw_zy, level): scale z axis by step size
  ratio
2010-09-28 20:24:56 -03:00
Werner Almesberger
46704e6b0e Changed the style of projection displays from lines to filled surfaces, to
make it easier to discern where is up and where is down.

- solidify/gui_util.h, solidify/gui_util.c (hpoint, vpoint, alpha, aa_line):
  draw horizontal or vertical lines with anti-aliases beginning and end
- solidify/level.c (draw_xz, draw_zy): instead of drawing thin lines for z
  and z0, show a filled surface of the difference
2010-09-28 20:01:01 -03:00
Werner Almesberger
fd7b7223ab Move draw_circle from util.c to gui_util.c
- solidify/util.h, solidify/util.c (draw_circle), solidify/gui_util.h,
  solidify/gui_util.c: moved draw_circle from util.c to gui_util.c
- solidify/util.c: this file is now empty. Remove it.
- solidify/level.c, solidify/overlap.c: include gui_util.h instead of
  util.h
- solidify/Makefile: replace util.o with gui_util.o
2010-09-28 08:58:28 -03:00
Werner Almesberger
abb945e76b Added expose events for auxiliary projections.
- solidify/level.c (expose_event, level): renamed expose_event to
  expose_event_xy, for consistency with new expose event handlers
- solidify/level.c (expose_event_xz, expose_event_zy, level): added expose
  event handlers for the auxiliary projections
- solidify/level.c (level): the drawing areas receive an expose event when
  becoming visible, so there's no need to explicitly initilize them
2010-09-28 07:12:20 -03:00
Werner Almesberger
6acca4ea4a Correct z0 for z vs. xy scale differences. Now things work as planned !
- solidify/face.h (z0_scale, fx_to_angle, fy_to_angle, fx_from_angle,
  fy_from_angle): correct for z vs. xy scale differences
- solidify/overlap.c (merge_matrix): correct z0 shrinkage for z vs. xy
  scale differences
2010-09-27 02:39:25 -03:00
Werner Almesberger
1638123771 Cleaned up z0 plane input/output. Note: need to change fx in all .sfy files !
- solidify/face.h (fx_to_angle, fy_to_angle, fx_from_angle, fy_from_angle):
  helper functions to get/set the z0 plane inclination
- solidify/povray.c (povray_face), solidify/project.c (read_face_data,
  save_face_data): use helper functions to get/set z0 plane
- solidify/project.c (read_face_data, save_face_data): don't negate fx
2010-09-27 01:19:21 -03:00
Werner Almesberger
12f5aa2188 Cleaned up POV-Ray file handling. New use: solidify -p project
- solidify/Makefile (pov, disp, main.pov): call the main POV-Ray file
  $(NAME).pov, not main.pov
- solidify/Makefile: generate $(NAME).inc
- solidify/solid.h, solidify/povray.c (povray_face, povray): accept file
  name as argument and write to the specified file instead of stdout
- solidify/povray.c (height_field): added file error handling
- solidify/povray.c (height_field, povray): removed useless matrix argument
- solidify/solidify.c (usage, main): new invocation "-p project" to generate
  POV-Ray output. Removed old isatty() hack.
- solidify/Makefile: updated to use solidify -p to generate POV-Ray output
2010-09-27 00:54:57 -03:00
Werner Almesberger
1c183e077a Moved batcvr.sfy over to ben-scans. Removing it here. 2010-09-26 22:05:41 -03:00
Werner Almesberger
ffb0d99a69 Make new/run/pov/disp are now configurable when invoking make.
Example:
make NAME=lcdframe D=0.8 TOP=front BOTTOM=back new

- solidify/Makefile (new, run, pov, disp): test run targets can now be
  configured by setting make variables on the command line
- solidify/main.pov: renamed to template.pov and changed all occurrences of
  "batcvr" to "NAME"
- solidify/Makefile: generate main.pov from template.pov
2010-09-26 20:11:57 -03:00
Werner Almesberger
5170410012 Correct direction of x inclination of z0.
- solidify/povray.c (povray_face), solidify/project.c (read_face_data): x
  inclination of the z0 plane was reversed in POV-Ray output and in the
  project file
2010-09-26 19:24:53 -03:00
Werner Almesberger
32a4d4ae85 Rendering improvements. http://downloads.qi-hardware.com/people/werner/tmp/main.png
- solidify/Makefile: use povray +P, to keep showing the image when done
- solidify/main.pov: moved lower light source from x- to x+ and lowered it a
  bit more
- solidify/main.pov: doubled the intensity of the ambient light
- solidify/main.pov: rotate the part in xy and add a thin red plane to help
  with assessing the accuracy of z0 inclination (the top of the battery
  cover turned out to be very difficult to get right with solidify alone)
- solidify/main.pov: added a third view of the part
2010-09-26 13:01:01 -03:00