Changeset 5700
- Timestamp:
- 10/21/09 22:11:17 (4 years ago)
- Location:
- developers/werner/cncmap
- Files:
-
- 3 added
- 2 edited
-
README (modified) (2 diffs)
-
rect/rect.c (modified) (1 diff)
-
zscan (added)
-
zscan/Makefile (added)
-
zscan/zscan.c (added)
Legend:
- Unmodified
- Added
- Removed
-
developers/werner/cncmap/README
r5613 r5700 1 When milling a surface, we have the following parameters that depend on 2 machine configuration and the piece: 3 4 - piece location and orientation: the "lower left" edge of the piece is 5 usually not at the origin. Also, the piece may be slightly rotated. 6 7 - z coordinates of the piece's surface: even a nominally level piece 8 can be bent. The machine itself may not be perfectly level. And last 9 but not least, there is a fixed but (initially) unknown offset 10 introduced by the milling bit. 11 12 The "cncmap" package provides a set of tools for determining these 13 parameters and transforming a 2D plot into an accurate surface 14 1 15 The "cncmap" package consists of the following tools: 2 16 … … 5 19 6 20 rect: find a rectangle defined by three corner points and print its corners 7 in a normalized form. 21 in a normalized form, such that they are three adjacent corners of the 22 rectangle, with the first corner between the two others, the second point 23 "right" when looking from the first point towards the opposite corner, and 24 the third point "left". 25 26 zscan: scan the surface of a rectangular area with the contact sensor and 27 generate a z map. -
developers/werner/cncmap/rect/rect.c
r5613 r5700 85 85 lr_calc(&z0, &zx, &zy); 86 86 87 /* 88 * Reorder the points such that "o" becomes the corner, "a" and "b" 89 * define the sides of the rectangle, and the angle from "a" to "b" is 90 * as close to 90 degrees as possible, in a counter-clockwise 91 * direction. 92 * 93 * If no angle can be found that's reasonably close to 90 degrees, we 94 * give up. 95 */ 96 87 97 best_angle = 0; 88 98 for (o = 0; o != 9; o += 3) {
Note: See TracChangeset
for help on using the changeset viewer.
