SpelPoint 类
SpelPoint 类可用于多个动作方法以及 Spel 类的 GetPoint 和 SetPoint 方法。
下面是一些Visual Basic的示例:
1:
Dim pt As New RCAPINet.SpelPoint(25.5, 100.3, -21, 0)
m_spel.Go(pt)
2:
Dim pt As New RCAPINet.SpelPoint
pt.X = 25.5
pt.Y = 100.3
pt.Z = -21
m_spel.Go(pt)
3:
Dim pt As New RCAPINet.SpelPoint
pt = m_spel.GetPoint("P*")
pt.Y = 222
m_spel.Go(pt)
下面是一些 Visual C# 的示例:
1:
SpelPoint pt = new SpelPoint(25.5, 100.3, -21, 0);
m_spel.Go(pt);
2:
SpelPoint pt = new SpelPoint();
pt.X = 25.5;
pt.Y = 100.3;
pt.Z = -21;
m_spel.Go(pt);
3:
SpelPoint pt = new SpelPoint();
pt = m_spel.GetPoint("P0");
pt.Y = 222;
m_spel.Go(pt);
SpelPoint 属性
VB 例:
X As Single
Y As Single
Z As Single
U As Single
V As Single
W As Single
R As Single
S As Single
T As Single
Hand As SpelHand
Elbow As SpelElbow
Wrist As SpelWrist
Local As Integer
J1Flag As Integer
J2Flag As Integer
J4Flag As Integer
J6Flag As Integer
J1Angle As Single
J4Angle As Single
C# 例:
float x
float y
float z
float u
float v
float w
float r
float s
float t
SpelHand Hand
SpelElbow Elbow
SpelWrist Wrist
int Local
int J1Flag
int J2Flag
int J4Flag
int J6Flag
float J1Angle
float J4Angle
SpelPoint 方法
Sub Clear ()
清除所有点数据。
Sub New ()
默认构造函数。创建空点(清除所有数据)。
Sub New (X As Single, Y As Single, Z As Single, U As Single [, V As Single] [, W As Single])
指定坐标的新点的可选构造函数。
Function ToString([Format As String]) As String
允许指定 Format 的 ToString 覆盖。它可以返回 SPEL+ 中定义的点。
参数
- Empty:
返回具有所有坐标和属性的整个点。
"XY": 返回 "XY(…)"
"XYST": 返回 "XY(…) :ST(…)"