cancel
Showing results for 
Search instead for 
Did you mean: 

TxTransformation.Subtract

Creator
Creator

Hi,

 

i'm trying to get a txtransformation of a ressource to a specific Frame (in my case its the workingframe).

So i did the following.

 

TxTransformation workingFrame = TxApplication.ActiveDocument.WorkingFrame;

TxTransformation robotPos = new TxTransformation();

robotPos = TxTransformation.Subtract(workingFrame, Ressource.AbsoluteLocation);

the calculation for the transformation works fine, so far. but i get NaN in the rotation of "robotPos".

 

any ideas?

 

MfG Thomas

 

2 REPLIES

Re: TxTransformation.Subtract

Siemens Genius Siemens Genius
Siemens Genius

Try this:

 

TxTransformation workingFrameInverse = TxApplication.ActiveDocument.WorkingFrame.Inverse;

TxTransformation robotPosRelativeToWorkingFrame = workingFrameInverse * Ressource.AbsoluteLocation;

Re: TxTransformation.Subtract

Creator
Creator

works. sometimes it can be so easy

 

thank you