Difference between revisions of "User Frame/zh-hans"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Languages}} == User Frame == User can add his own frame by teaching three points: A, B, C 700px | Defining the frame<br> The origin of the fram...")
 
 
Line 1: Line 1:
{{Languages}}
+
{{Languages|User_Frame}}
== User Frame ==
+
== 用户坐标系 ==
  
User can add his own frame by teaching three points: A, B, C
+
用户可以通过示教三点来添加自己的坐标系:A,B,C
  
  
 
[[File:TABLEFRAME.PNG | 700px | Defining the frame]]<br>
 
[[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.
+
坐标系的原点在点A,点B和C有助于定义新坐标系的方向。
  
 
==PROTO.PRO==
 
==PROTO.PRO==
  
New function must be defined in the PROTO,PRO file as:
+
必须在PROTO,PRO文件中定义新功能:
  
 
<pre>
 
<pre>
Line 17: Line 17:
 
</pre>
 
</pre>
  
== Usage ==
+
== 用法==
  
Calling:
+
调用:
 
<pre>
 
<pre>
 
-->?RBT_TABLE(A,B,C,D)
 
-->?RBT_TABLE(A,B,C,D)
 
</pre>
 
</pre>
  
== Return Value ==  
+
== 返回值 ==  
 
Anything except 0 is an error code.
 
Anything except 0 is an error code.
  
  
==Example==
+
==例子==
  
===Library definition: ===
+
===库定义: ===
 
<pre>
 
<pre>
 
IMPORT_C RBT_TABLE(byval  as generic location,byval  as generic location,byval  as generic location,  as generic location ) as long
 
IMPORT_C RBT_TABLE(byval  as generic location,byval  as generic location,byval  as generic location,  as generic location ) as long
Line 46: Line 46:
 
</pre>
 
</pre>
  
===Usage===
+
===用法===
  
 
<pre>
 
<pre>
Line 75: 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]]
+
源代码示例: [[File:FRAMES.ZIP | FRAMES.LIB]]
  
Euler Angles Manipulations : [[Translating_Euler_Angles |Translating_Euler_Angles]]
+
欧拉角变换 : [[Translating_Euler_Angles |Translating_Euler_Angles]]

Latest revision as of 13:32, 30 May 2017

语言: English  • 中文(简体)‎

用户坐标系

用户可以通过示教三点来添加自己的坐标系:A,B,C


Defining the frame

坐标系的原点在点A,点B和C有助于定义新坐标系的方向。

PROTO.PRO

必须在PROTO,PRO文件中定义新功能:

IMPORT_C RBT_TABLE(byval  as generic location, byval  as generic location, byval   as generic location,  as generic location ) as long

用法

调用:

-->?RBT_TABLE(A,B,C,D)

返回值

Anything except 0 is an error code.


例子

库定义:

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

用法

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}

参考

源代码示例: File:FRAMES.ZIP

欧拉角变换 : Translating_Euler_Angles