From f7fb2414f3ca2ea70b1e3a7dfc9d0a4c43b02783 Mon Sep 17 00:00:00 2001 From: DJGosnell Date: Tue, 14 Nov 2023 15:12:24 -0500 Subject: [PATCH 1/2] Fix for text entries attempting rotations along the AlignmentPoint. --- ACadSharp/Entities/TextEntity.cs | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/ACadSharp/Entities/TextEntity.cs b/ACadSharp/Entities/TextEntity.cs index 44059230..5e5a1f73 100644 --- a/ACadSharp/Entities/TextEntity.cs +++ b/ACadSharp/Entities/TextEntity.cs @@ -84,15 +84,7 @@ public string Value /// The rotation angle in radians. /// [DxfCodeValue(DxfReferenceType.IsAngle, 50)] - public double Rotation - { - get => _rotation; - set - { - _rotation = value; - this.AlignmentPoint = new XYZ(Math.Cos(_rotation), Math.Sin(_rotation), 0.0); - } - } + public double Rotation { get; set; } /// /// Relative X scale factor—widt @@ -156,15 +148,7 @@ public TextStyle Style /// This value is meaningful only if the value of a 72 or 73 group is nonzero (if the justification is anything other than baseline/left) /// [DxfCodeValue(DxfReferenceType.Optional, 11, 21, 31)] - public XYZ AlignmentPoint - { - get => _alignmentPoint; - set - { - _alignmentPoint = value; - this._rotation = new XY(this._alignmentPoint.X, this._alignmentPoint.Y).GetAngle(); - } - } + public XYZ AlignmentPoint { get; set; } /// /// Specifies the three-dimensional normal unit vector for the object. From 30623cd05a8f3ca234c5482eba513fb6bdf2e577 Mon Sep 17 00:00:00 2001 From: DJGosnell Date: Tue, 14 Nov 2023 15:13:43 -0500 Subject: [PATCH 2/2] Removed unused fields. --- ACadSharp/Entities/TextEntity.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ACadSharp/Entities/TextEntity.cs b/ACadSharp/Entities/TextEntity.cs index 5e5a1f73..a7915e54 100644 --- a/ACadSharp/Entities/TextEntity.cs +++ b/ACadSharp/Entities/TextEntity.cs @@ -166,10 +166,6 @@ public TextStyle Style private double _height = 0.0; - private XYZ _alignmentPoint = XYZ.Zero; - - private double _rotation = 0.0; - private TextStyle _style = TextStyle.Default; public TextEntity() : base() { }