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

68 Commits

Author SHA1 Message Date
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
Werner Almesberger
f635ac93fc solidify/batcvr.sfy: found a better inclination for the top face 2010-09-26 12:59:49 -03:00
Werner Almesberger
a3f17c504b Added auxiliary projections to help mis-levelling with more confidence.
- solidify/level.c (xz, draw_xz, motion_notify_event, level): show a
  projection on a xz plane at the cursor position
- solidify/level.c (zy, draw_zy, motion_notify_event, level):  show a
  projection on a zy plane at the cursor position
2010-09-26 12:57:10 -03:00
Werner Almesberger
2997c6b441 Adjust button size when switching between views.
- solidify/solidify.c (gui): expand buttons to available size
2010-09-26 09:37:01 -03:00
Werner Almesberger
34117153cb Project description files can now begin with comment lines.
- solidify/project.h (struct project), solidify/project.c (make_project,
  load_project, save_project): allow project descriptions to begin with
  any numer of comment lines and preserve them across sessions
2010-09-26 06:11:02 -03:00
Werner Almesberger
d9ddd52427 For convenience, record maximum Z size in the face structure.
- solidify/face.h (struct face), solidify/face.c (read_file): keep the mesh's
  maximum Z size in sz, similar to sx and sy
- solidify/povray.c (povray_face): use f->sz insead of calculating it
2010-09-26 06:11:02 -03:00
Werner Almesberger
17824f4cb4 Added remaining transformations to POV-Ray output. Added example. Cleaned up
main.pov

- solidify/povray.c (povray_face): added inclination of the z0 plane
- solidify/povray.c (povray_face): added overlap transform (rotation and
  shift)
- solidify/povray.c (povray_face): added comments to all the POV-Ray
  commands
- solidify/batcvr.sfy: battery cover example (almost looks good)
- solidify/main.pov: added second light source slightly below the xy plane
- solidify/main.pov: use "object" instead of "union" to place the part
- solidify/main.pov: make material less transparent (50% -> 20%)
- solidify/main.pov: added second battery cover, showing edge and bottom
2010-09-25 17:47:50 -03:00
Werner Almesberger
e08bd77d51 Yet another overlap display correction. Avoid truncation on save-load cycle.
- solidify/overlap.c (merge_matrix): don't shrink the offset vector
- solidify/project.c (read_face_data): the value to assign to f->z_ref
  needs rounding or truncation will go wrong from time to time
2010-09-25 06:43:21 -03:00
Werner Almesberger
e8d6837065 Initial commit. For older history, see project ben-scans.
http://projects.qi-hardware.com/index.php/p/ben-scans/
2010-09-25 04:46:16 -03:00