Private Sub CreateRevolveSolid(ByVal Ang As Double, ByVal sp As Point3d, ByVal ep As Point3d)
Dim objTags(100) As NXOpen.Tag
Dim i As Integer
For i = 0 To arrCurves.Length - 1
objTags(i) = arrCurves(i).Tag
Next
Dim origin(2) As Double
Dim origin1(2) As Double
Dim origin2(2) As Double
origin(0) = 0 : origin(1) = 0 : origin(2) = 0
origin1(0) = 0 : origin1(1) = 0 : origin1(2) = 0
origin2(0) = 0 : origin2(1) = 0 : origin2(2) = 0
Dim direction(2) As Double
Dim direction1(2) As Double
Dim direction2(2) As Double
Dim mat As Double
Dim mat1 As Double
Dim mat2 As Double
Dim status As Integer
Dim status1 As Integer
Dim status2 As Integer
Dim Features(100) As NXOpen.Tag
Dim copies(100) As NXOpen.Tag
Dim ang1 As Double = 90
Dim ang2 As Double = 90
direction1(0) = 1 : direction1(1) = 0 : direction1(2) = 0
direction2(0) = 0 : direction2(1) = 0 : direction2(2) = 1
'构建第一变换矩阵
MsgBox("Matrix1" & status1.ToString)
ufse.Trns.CreateRotationMatrix(origin1, direction1, ang1, mat1, status1)
MsgBox("Matrix1 status" & status1.ToString)
'构建第二变换矩阵
ufse.Trns.CreateRotationMatrix(origin2, direction2, ang2, mat2, status2)
MsgBox("Matrix2 status" & status2.ToString)
'ufse.Trns.MultiplyMatrices(mat1, mat2, mat)
'变换
MsgBox("transform1")
ufse.Trns.TransformObjects(mat1, objTags, arrCurves.Length, 2, 0, 2, copies, Nothing, status)
MsgBox("transform1 ok")
Dim limit(1) As String
limit(0) = CStr(-Ang) : limit(1) = CStr(Ang)
Dim offset(1) As String
offset(0) = "0.0" : offset(1) = "0.0"
'生成回转体
Dim cou As Integer
MsgBox("revolution")
direction(1) = 0 : direction(2) = 1 : direction(3) = 0
ufse.Modl.CreateRevolution(copies, arrCurves.Length, Nothing, limit, offset, origin, False, True, origin, direction, FeatureSigns.Nullsign, Features, cou)
End Sub