Intent function : Transformpoint

Intent function : Transformpoint

Anonymous
Not applicable
1,085 Views
3 Replies
Message 1 of 4

Intent function : Transformpoint

Anonymous
Not applicable

Hi,

I have a point p1 defined in frame1 and I want to know what its X,Y and Z values are in frame 2. I thought, according the documentation http://wikihelp.autodesk.com/Inventor_ETO/enu/2013/Help/0148-Inventor148/0525-Library_525/0870-Syste..., I could use the function Transformpoint. When I try this, Intent returns a point in worldframe instead of a point in frame2 coordinates. When I check these returned coordinates then they point towards another point in space but not my original point p1. Am I missing something ,or Am I doing something wrong. If so, what function should I use ?

 

Cheers,

Mark

Reply
Reply
0 Likes
Accepted solutions (1)
1,086 Views
3 Replies
Replies (3)
Message 2 of 4

Jon.Balgley
Alumni
Alumni

I think you want "invertFrame" or perhaps "relateFrame".  Look at the following rules, and their values:

 

	Rule otherFrame As Frame = TranslateFrame(localFrame, Vector(1,1,1))
		
	Rule otherPoint As Point = point_(0,0,0,otherFrame)
		
	Rule originInOtherFrame As Point = transformPoint(origin, otherFrame)
		
	Rule otherPointInMyFrame As Point = transformPoint(otherPoint, localFrame)
		
	Rule otherPointInOtherFrame1 As Point = transformPoint(otherPoint, invertFrame(otherFrame))
		
	Rule otherPointInOtherFrame2 As Point = transformPoint(otherPoint, relateFrame(otherFrame, localFrame))

 


Jon Balgley
Reply
Reply
0 Likes
Message 3 of 4

JackGregory
Alumni
Alumni

The basic answer is simple.  "I have a point p1 defined in frame1 and I want to know what its X,Y and Z values are in frame 2."  Just call LocalX(p1) in the context of frame 2.  And LocalY, LocalZ, of course.

 

But I have answered this enough times in the last 20 years to think that maybe that isn't what you really want, though I hope it is.

 

You have to be very careful when you say "Intent returns a point in ..."  Intent doesn't really return things in the normal sense.  It knows the world coordinates of every point, and in theory handles all transformations for you.  Don't be misled by coordinates displayed in various windows; points should be treated as coordinate-free.  As a result, the ONLY time you really need LocalX and friends is when you are exporting data.  If you are playing with X Y and Z components in rules, for feeding to other rules, you are almost certainly doing the Wrong Thing (tm).

 

Reply
Reply
0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution

Thanks Jon and Jack.

Both solutions helped me out !

 

Cheers, Mark

Reply
Reply
0 Likes