Message 1 of 5
AngleAboutAxis in C#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to get the same result from the dynamo node vector.AngleAboutAxis in dynamo with the following code in C#. But the result isn't the same as you can see under the dynamo node and my C# results. Does anybode know how to do this in C#?
// new XYZ from average point XYZ pA = new XYZ(averageX, averageY, 0); XYZ pB = new XYZ(averageX-100, averageY, 0); XYZ res = pA - pB;
//Other vector from all points foreach (XYZ d1 in coord) { XYZ vv = res -d1; double angle = vv.AngleTo(res); double resultAngle = angle * 180 / (Math.PI); }