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

DomCR / ACadSharp / 29143042407

11 Jul 2026 06:34AM UTC coverage: 2.912% (-73.0%) from 75.918%
29143042407

push

github

web-flow
Merge pull request #1146 from ilCosmico/acds-read-payload-anchor

Read the AcDs payload area offset from the data segment header

264 of 12999 branches covered (2.03%)

Branch coverage included in aggregate %.

0 of 30 new or added lines in 1 file covered. (0.0%)

31243 existing lines in 465 files now uncovered.

1337 of 41984 relevant lines covered (3.18%)

5.38 hits per line

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

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

7
namespace ACadSharp.Entities;
8

9
public partial class HatchPattern
10
{
11
        public class Line
12
        {
13
                /// <summary>
14
                /// Pattern line angle.
15
                /// </summary>
16
                [DxfCodeValue(DxfReferenceType.IsAngle, 53)]
UNCOV
17
                public double Angle { get; set; }
×
18

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

25
                /// <summary>
26
                /// Gets or sets the dash lengths of the pattern line. A negative value represents a space, zero a dot, and a positive value a line segment.
27
                /// </summary>
28
                [DxfCodeValue(DxfReferenceType.Count, 79)]
29
                [DxfCollectionCodeValue(49)]
UNCOV
30
                public List<double> DashLengths { get; set; } = new List<double>();
×
31

32
                /// <summary>
33
                /// Gets the direction vector of the pattern line based on the specified angle.
34
                /// </summary>
35
                public XY Direction
36
                {
37
                        get
UNCOV
38
                        {
×
UNCOV
39
                                double cos = Math.Cos(this.Angle);
×
UNCOV
40
                                double sin = Math.Sin(this.Angle);
×
UNCOV
41
                                return new XY(cos, sin);
×
UNCOV
42
                        }
×
43
                }
44

45
                /// <summary>
46
                /// Perpendicular distance for the next line to be located.
47
                /// </summary>
48
                public double LineOffset
49
                {
50
                        get
UNCOV
51
                        {
×
UNCOV
52
                                double cos = Math.Cos(0.0 - this.Angle);
×
UNCOV
53
                                double sin = Math.Sin(0.0 - this.Angle);
×
54

UNCOV
55
                                return this.Offset.X * sin + this.Offset.Y * cos;
×
UNCOV
56
                        }
×
57
                }
58

59
                /// <summary>
60
                /// Gets or sets the local displacements between lines of the same family.
61
                /// </summary>
62
                [DxfCodeValue(45, 46)]
UNCOV
63
                public XY Offset { get; set; }
×
64

65
                /// <summary>
66
                /// Gets the horizontal shift of the offset after applying the specified angle transformation.
67
                /// </summary>
68
                public double Shift
69
                {
70
                        get
71
                        {
×
72
                                double cos = Math.Cos(0.0 - this.Angle);
×
73
                                double sin = Math.Sin(0.0 - this.Angle);
×
74

75
                                return this.Offset.X * cos - this.Offset.Y * sin;
×
76
                        }
×
77
                }
78

79
                /// <summary>
80
                /// Clones this line.
81
                /// </summary>
82
                /// <returns></returns>
83
                public Line Clone()
84
                {
×
85
                        Line clone = (Line)this.MemberwiseClone();
×
86
                        clone.DashLengths = new List<double>(this.DashLengths);
×
87
                        return clone;
×
88
                }
×
89

90
                public Line2D ToLine2D()
91
                {
×
92
                        return new Line2D(this.BasePoint, this.Direction);
×
93
                }
×
94
        }
95
}
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