• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DomCR / ACadSharp / 18340126254

08 Oct 2025 09:25AM UTC coverage: 78.258% (+0.3%) from 77.952%
18340126254

Pull #774

github

web-flow
Merge 5552b4d9e into 2472105ef
Pull Request #774: patterns def

6854 of 9513 branches covered (72.05%)

Branch coverage included in aggregate %.

161 of 215 new or added lines in 9 files covered. (74.88%)

22 existing lines in 2 files now uncovered.

26383 of 32958 relevant lines covered (80.05%)

108746.23 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

47.37
/src/ACadSharp/Entities/HatchPattern.Line.cs
1
using ACadSharp.Attributes;
2
using CSMath;
3
using System;
4
using System.Collections.Generic;
5

6
namespace ACadSharp.Entities
7
{
8
        public partial class HatchPattern
9
        {
10
                public class Line
11
                {
12
                        /// <summary>
13
                        /// Pattern line angle.
14
                        /// </summary>
15
                        [DxfCodeValue(DxfReferenceType.IsAngle, 53)]
16
                        public double Angle { get; set; }
201,306✔
17

18
                        /// <summary>
19
                        /// Pattern line base point.
20
                        /// </summary>
21
                        [DxfCodeValue(43, 44)]
22
                        public XY BasePoint { get; set; }
194,593✔
23

24
                        /// <summary>
25
                        /// Line dashes.
26
                        /// </summary>
27
                        [DxfCodeValue(DxfReferenceType.Count, 79)]
28
                        [DxfCollectionCodeValue(49)]
29
                        public List<double> DashLengths { get; set; } = new List<double>();
543,680✔
30

31
                        /// <summary>
32
                        /// Gets or sets the local displacements between lines of the same family.
33
                        /// </summary>
34
                        [DxfCodeValue(45, 46)]
35
                        public XY Offset { get; set; }
313,601✔
36

37
                        public double Shift
38
                        {
39
                                get
NEW
40
                                {
×
NEW
41
                                        double cos = Math.Cos(0.0 - this.Angle);
×
NEW
42
                                        double sin = Math.Sin(0.0 - this.Angle);
×
43

NEW
44
                                        return this.Offset.X * cos - this.Offset.Y * sin;
×
NEW
45
                                }
×
46
                        }
47

48
                        /// <summary>
49
                        /// Perpendicular distance for the next line to be located.
50
                        /// </summary>
51
                        public double LineOffset
52
                        {
53
                                get
54
                                {
68✔
55
                                        double cos = Math.Cos(0.0 - this.Angle);
68✔
56
                                        double sin = Math.Sin(0.0 - this.Angle);
68✔
57

58
                                        return this.Offset.X * sin + this.Offset.Y * cos;
68✔
59
                                }
68✔
60
                        }
61

62
                        /// <summary>
63
                        /// Clones this line.
64
                        /// </summary>
65
                        /// <returns></returns>
66
                        public Line Clone()
67
                        {
×
68
                                Line clone = (Line)this.MemberwiseClone();
×
69
                                clone.DashLengths = new List<double>(this.DashLengths);
×
70
                                return clone;
×
71
                        }
×
72
                }
73
        }
74
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc