Hi Andy,
See below:
On 6/8/2017 4:10 PM, andysontag@... [DynoMotion] wrote:
I'm having a little trouble wrapping my head around
how to implement Geo Correction within Kmotion. Our
machine table isn't exactly square and I'd like to
correct the motion so that when I tell the machine to
make a square, it makes a square instead of a slight
parallelogram.
Could anyone explain what each line of the Geo
Correction File is suppose to do? The example I've seen
is as follows:
2, 2 (I'm assuming this means the grid/table will have 4
points)
>>> Yes 2 rows and 2 cols
1, 1 (X length in inches?, Y length? in inches?) (In
other words this is the theoretical square/rectangle you
will be transforming?)
>>> Yes, or more correctly the grid spacing between the
points in x and y in inches
-.5, -.5 (From what I've read this might be orienting the
theoretical square around an origin. Not sure why one
would need to do this)
>>> Yes. Imagine you have an 11 rows x 11 cols with grid
space 1 inch x 1 inch. This will define a 10 inch x 10 inch array
area. But now where should this area be placed in the infinite xy
plane? We want the geocorrection table to cover the 10x10 inch area
that the machine will use. By default (offset 0,0) the xy origin
will be at the lower left corner of the table. In other words for x
values between 0 and 1 and Y values between 0 and 1 the lower left 1
inch square grid area will apply to control the transformation.
However some machines might home in the center of travel such that
0,0 is in the center of travel and useful machine coordinates might
be from -5 inches to +5 inches. In this case we would want to
offset the coordinates so that coordinates -5 to -4 inches
correspond to the left most Grids so an offset of 5 inches would be
specified. below is the formula used to determine which grid will
be used for the transformation. The row, col is the lower left
point of the grid area. Add +1 to the row and/or col to get the
other 3 points that define the area.
int col = (int)floor((x-GeoOffsetX)/GeoSpacingX);
int row = (int)floor((y-GeoOffsetY)/GeoSpacingY);
BTW outside of the geocorected table area the closest points are
extrapolated out to infinity. So actually with single square grid
(2 rows and 2 cols) that grid expands (interpolates/extrapolates) to
cover the infinite plane.
0, 0, -1, 0, 0 (The first "0, 0" is indicating the
theoretical point to be transformed is X0, Y0?)
>>> no it indicates row 0, col 0 (lower left point in the
Array) Note rows increase in the Y direction and cols in X
(The "-1, 0" is indicating the X0, Y0 should now be moved
to X-1, Y0?)
>>> This means the row 0 col 0 point of the array (may or
may not be X0 Y0 depending on how the array is positioned in the
plane should now correspond to X-1 Y0. The example you are using
might be a bit extreme and confusing as it was created to show a
major (45 degree) rotation and scaling transformation
(The last "0" is the Z position)
>>> correct
0, 1, 0, -1, 0
1, 0, 0, 1, 0
1, 1, 1, 0, 0
The following is my first stab at making a geo correction
file. I have a table that is 96" in X and 48" in Y which
I'm assuming has straight lengths for X and Y and just
needs to be squared a small amount.
2, 2
96, 48
0, 0
>>> this assumes your machine origin is at the lower left
of travel
>>> row 0 col 0 point will have no correction
>>> No. Row0 Col1 would be a shift in X (not Y) to the
lower right of your machine travel.
>>> No. Row1 Col0 would be a shift in Y to the Upper Left
of your machine travel.
>>> Possibly. Row1 Col1 would be a shift in X and Y to the
Upper Right of your machine travel.
HTH
Regards
TK
The numbers I chose are just examples for helping me
understand how to use the file. Once I do I'll be able to
guess and check my way to square, at least I think I will.
Do my numbers seem like they would do what I'm hoping
they will?
Andy
|
|