Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to measure from a specified axis system in VB?

Status
Not open for further replies.

solid7

Mechanical
Jun 7, 2005
1,403
US
I just want to return a measurement in an alternate axis system. All of my code currently goes back to global. I don't seem to be able to specify what axis system to take measures from.

 
Replies continue below

Recommended for you

I've already done the matrix math. I transformed an axis system relative to another axis system. (which both must, necessarily, be relative to absolute) End user now wants a measure of the origin point of axis system 2, relative to axis system 1. This is due to a confusion of the nature of transformations.

 
This is due to a confusion of the nature of transformations.

Honestly, I've no idea what you mean by that.

There's no such API in VB. Period.
It can be done with math. Do you need help with calculations?
 
I mean that they initially asked me for a vector based transformation. (TU=V) That requires the use of the absolute coordinates as identity. But clearly what they were asking for, was an euler angle rotation from axis to axis.

I do not need help with the computations.

At this point, I'm just kinda dumbfounded why we have an API that exposes position matrix, but not transformation matrix.

 
At this point, I'm just kinda dumbfounded why we have an API that exposes position matrix, but not transformation matrix

Oh, I see now, thanks for clearing that up.

And the answer is: because VB API is free.
Surely CATIA has fully functional matrix API, but it's located in the paid part - the CAA.

As for API exposition policy (whether a function should go to Automation or CAA). I totally agree that it's often illogical. For instance, there are a ton of properties that can be read but not set. There's no reason for that other than to promote CAA.

 
To follow up on my previous - the answer was found simply, by finding the dot product of the second axis system matrix, and the inverse matrix from the first coordinate system, back to identity. This preserves the relationship between the coordinate systems, but gives the relative measurement, regardless of basis.

I actually built my own matrix math program, that scales up to M(4, R) and finds the the inverse using the adjugate method. Simple arithmetic, no dependencies. Although if one is so inclined, MIT has a really phenomenal set of Math APIs for .NET.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top