0
我想遞增旋轉使用下面的代碼在C#和Vb.net(編輯器已導入必要的庫)的曲線。在我的3D建模程序中,我得到重疊的線條而不是具有不同角度的線條。 我在做什麼錯?遞增旋轉使用VB.net或C#曲線
在C#:
private void RunScript(Curve ln, int x, double angle, ref object A)
{
List<Curve> lines = new List<Curve>();
Int16 i = default(Int16);
for(i = 0; i <= x; i++){
ln.Rotate(angle * i, Vector3d.ZAxis, ln.PointAtEnd);
lines.Insert(i, ln);
}
A = lines;
上VB.net:
Private Sub RunScript(ByVal ln As Curve, ByVal x As Integer, ByVal angle As Double,
ByRef A As Object)
Dim lns As New List(Of Curve)()
Dim i As Int16
For i = 0 To x
ln.Transform(transform.Rotation(angle * i, vector3d.ZAxis, ln.PointAtEnd))
lns.Insert(i, ln)
Next
A = lns