From c900a9f4c8a37325b4dfe550d9fe5a3595abcf03 Mon Sep 17 00:00:00 2001 From: DomCR Date: Sat, 14 Dec 2024 06:58:17 +0100 Subject: [PATCH] fix --- src/ACadSharp/Entities/HatchPattern.Line.cs | 39 +++++++++++++++++++++ src/ACadSharp/Entities/HatchPattern.cs | 32 +---------------- 2 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 src/ACadSharp/Entities/HatchPattern.Line.cs diff --git a/src/ACadSharp/Entities/HatchPattern.Line.cs b/src/ACadSharp/Entities/HatchPattern.Line.cs new file mode 100644 index 00000000..a9ce18ae --- /dev/null +++ b/src/ACadSharp/Entities/HatchPattern.Line.cs @@ -0,0 +1,39 @@ +using ACadSharp.Attributes; +using CSMath; +using System.Collections.Generic; + +namespace ACadSharp.Entities +{ + public partial class HatchPattern + { + public class Line + { + /// + /// Pattern line angle + /// + [DxfCodeValue(DxfReferenceType.IsAngle, 53)] + public double Angle { get; set; } + + /// + /// Pattern line base point + /// + [DxfCodeValue(43, 44)] + public XY BasePoint { get; set; } + + /// + /// Pattern line offset + /// + [DxfCodeValue(45, 46)] + public XY Offset { get; set; } + + public List DashLengths { get; set; } = new List(); + + public Line Clone() + { + Line clone = (Line)this.MemberwiseClone(); + clone.DashLengths = new List(this.DashLengths); + return clone; + } + } + } +} diff --git a/src/ACadSharp/Entities/HatchPattern.cs b/src/ACadSharp/Entities/HatchPattern.cs index f9045d4f..a2ddf4fb 100644 --- a/src/ACadSharp/Entities/HatchPattern.cs +++ b/src/ACadSharp/Entities/HatchPattern.cs @@ -4,40 +4,10 @@ namespace ACadSharp.Entities { - public class HatchPattern + public partial class HatchPattern { public static HatchPattern Solid { get { return new HatchPattern("SOLID"); } } - public class Line - { - /// - /// Pattern line angle - /// - [DxfCodeValue(DxfReferenceType.IsAngle, 53)] - public double Angle { get; internal set; } - - /// - /// Pattern line base point - /// - [DxfCodeValue(43, 44)] - public XY BasePoint { get; internal set; } - - /// - /// Pattern line offset - /// - [DxfCodeValue(45, 46)] - public XY Offset { get; internal set; } - - public List DashLengths { get; set; } = new List(); - - public Line Clone() - { - Line clone = (Line)this.MemberwiseClone(); - clone.DashLengths = new List(this.DashLengths); - return clone; - } - } - [DxfCodeValue(2)] public string Name { get; set; }