Difference between revisions of "User Frame"
(→User Frame) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages|User_Frame}} | ||
== User Frame == | == User Frame == | ||
Line 4: | Line 5: | ||
− | [[File:TABLEFRAME.PNG | 700px | Defining the frame]] | + | [[File:TABLEFRAME.PNG | 700px | Defining the frame]]<br> |
+ | |||
+ | The origin of the frame is at point A and points B & C help defining the orientation of the new frame. | ||
==PROTO.PRO== | ==PROTO.PRO== | ||
Line 72: | Line 75: | ||
Res : #{10 , 20 , 30 , 45 , 45 , 45} | Res : #{10 , 20 , 30 , 45 , 45 , 45} | ||
</pre> | </pre> | ||
+ | = See Also = | ||
+ | |||
+ | Source code example: [[File:FRAMES.ZIP | FRAMES.LIB]] | ||
+ | |||
+ | Euler Angles Manipulations : [[Translating_Euler_Angles |Translating_Euler_Angles]] |
Latest revision as of 13:27, 30 May 2017
Language: | English • 中文(简体) |
---|
Contents
User Frame
User can add his own frame by teaching three points: A, B, C
The origin of the frame is at point A and points B & C help defining the orientation of the new frame.
PROTO.PRO
New function must be defined in the PROTO,PRO file as:
IMPORT_C RBT_TABLE(byval as generic location, byval as generic location, byval as generic location, as generic location ) as long
Usage
Calling:
-->?RBT_TABLE(A,B,C,D)
Return Value
Anything except 0 is an error code.
Example
Library definition:
IMPORT_C RBT_TABLE(byval as generic location,byval as generic location,byval as generic location, as generic location ) as long public function Table(byval a as generic location,byval b as generic location,byval c as generic location) as generic location dim tmp as long dim x as generic location tmp = rbt_table(a,b,c,x) if tmp then Print "Internal TABLE error",tmp end if Table = x end function
Usage
dim shared Xax as location of xyzypr = #{10,0,0,0,0,0} dim shared Yax as location of xyzypr = #{0,10,0,0,0,0} dim shared Zax as location of xyzypr = #{0,0,10,0,0,0} dim shared Origin as location of xyzypr = #{10,20,30,0,0,0} program dim MyFrame as location of xyzypr dim Res as generic location MyFrame = Origin:#{0,0,0,45,45,45} Print "MyFrame : ";Myframe Res = Table(Origin,MyFrame:Xax,MyFrame:Yax) Print "Res : ";res end program
Output:
MyFrame : #{10 , 20 , 30 , 45 , 45 , 45} Res : #{10 , 20 , 30 , 45 , 45 , 45}
See Also
Source code example: File:FRAMES.ZIP
Euler Angles Manipulations : Translating_Euler_Angles