Matrix2D and drawing coordinate transformation

Matrix2D and drawing coordinate transformation

Anonymous
Not applicable
455 Views
2 Replies
Message 1 of 3

Matrix2D and drawing coordinate transformation

Anonymous
Not applicable
I'm trying to get the coordinates of points in a drawing view based on an arbitrary datum. Here's the information I have:

View center point

location of points in question (in model, sheet, and view space)

location of datum (in model, sheet, and view space)

The goal is to develop X and Y distances from the datum to the points in question. This seems like something the Matrix2D object would be good for, but I can't find anything in the API help other than the basic definition of the object.

Does anyone know how (or if) to use the Matrix2D object in a case like this? Or is there an easier way?
0 Likes
456 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Well, I think I have something that will work for this. I create two Vector2d objects using the Datum and point in question, both in sheet space. Then I subtract the two vectors, and pull the X and Y components of this vector for the X and Y locations.

I think this will work so long as all views are somewhere on the drawing sheet (i.e. in all positive sheet space).

Any other suggestions on how to do this? I'm really curious about the Matrix2d object.
0 Likes
Message 3 of 3

Anonymous
Not applicable
I think you're making the problem harder than it needs to be. As long as
you have the points in the same space, let's say sheet space for example,
then you just have to subtract the x and y components to determine their
relative position.

For example, let's say the datume is at (1,2) and a point is at (5,4). Just
subtract the x component of the datum from the x component of the point and
do the same for the y components. This give you 4 for x and 2 for y.
That's the offset distance for that point from the datum. If a point is at
(0,0) then the offset will be -1,-2.

Creating and subtracting the vectors does basically the same thing but has
more overhead that you don't need.

A matrix is usually used to define the position and orientation of an object
and to define an change in position and/or orientation. It doesn't really
help in this case.
--
Brian Ekins
Autodesk Inventor API

wrote in message news:5269117@discussion.autodesk.com...
Well, I think I have something that will work for this. I create two
Vector2d objects using the Datum and point in question, both in sheet space.
Then I subtract the two vectors, and pull the X and Y components of this
vector for the X and Y locations.

I think this will work so long as all views are somewhere on the drawing
sheet (i.e. in all positive sheet space).

Any other suggestions on how to do this? I'm really curious about the
Matrix2d object.
0 Likes