0
drehen Ich versuche, eine Kurve inkrementell zu drehen mit den Codes unten in C# und Vb.net (der Editor importiert bereits die notwendigen Bibliotheken). In meinem 3D-Modellierungsprogramm bekomme ich überlappende Linien anstelle von Linien mit unterschiedlichen Winkeln. Was mache ich falsch?Incremental eine Kurve mit VB.net oder C#
auf 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;
auf 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