-
Notifications
You must be signed in to change notification settings - Fork 69
Description
There is a double problem about the rotation angle in MText: the first is that you write it twice, the first correct and the second at 0, so when you read the DXF the 2nd overwrites the first and therefore all the writings are at 0.
The second problem is that in reality AutoCAD never writes code 50 (the angle) but only compiles 11 and 21 from which the angle is obtained; indeed the 50 gives him his own annoyance.
In practice, never write 50.
Or remove the data (which is always 0 in reading as it never appears in a DXF) or you calculate it by doing:
Read: (360M - Angle.FromRadiant (Math.Atan2 (MText.XAxisDirection.X, MText.XAxisDirection.Y)) + 90M)
Write: XAxisDirection = new DxfVector (Rotation.Cos (), Rotation.Sin (), 0)
Tested with AutoCAD 2015.
Regards,
Davide