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

DomCR / ACadSharp / 27296732523

10 Jun 2026 06:17PM UTC coverage: 77.035% (+0.03%) from 77.001%
27296732523

push

github

web-flow
Merge pull request #1105 from DomCR/hatch-explode

Hatch explode

8743 of 12313 branches covered (71.01%)

Branch coverage included in aggregate %.

608 of 850 new or added lines in 12 files covered. (71.53%)

292 existing lines in 21 files now uncovered.

31494 of 39919 relevant lines covered (78.89%)

155672.87 hits per line

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

87.1
/src/ACadSharp/Entities/Hatch.BoundaryPath.Line.cs
1
using ACadSharp.Attributes;
2
using CSMath;
3
using CSMath.Geometry;
4
using System.Collections.Generic;
5

6
namespace ACadSharp.Entities;
7

8
public partial class Hatch
9
{
10
        public partial class BoundaryPath
11
        {
12
                public class Line : Edge
13
                {
14
                        /// <summary>
15
                        /// Endpoint (in OCS)
16
                        /// </summary>
17
                        [DxfCodeValue(11, 21)]
18
                        public XY End { get; set; }
20,801✔
19

20
                        /// <summary>
21
                        /// Start point (in OCS)
22
                        /// </summary>
23
                        [DxfCodeValue(10, 20)]
24
                        public XY Start { get; set; }
20,801✔
25

26
                        public override EdgeType Type => EdgeType.Line;
455✔
27

28
                        /// <summary>
29
                        /// Initializes a new instance of the Line class.
30
                        /// </summary>
31
                        public Line() { }
21,996✔
32

33
                        /// <summary>
34
                        /// Initializes a new instance of the Line class using the specified line entity.
35
                        /// </summary>
36
                        /// <param name="line">The line entity from which to initialize the start and end points. Cannot be null.</param>
37
                        public Line(Entities.Line line)
11✔
38
                        {
11✔
39
                                this.Start = line.StartPoint.Convert<XY>();
11✔
40
                                this.End = line.EndPoint.Convert<XY>();
11✔
41
                        }
11✔
42

43
                        /// <inheritdoc/>
44
                        public override void ApplyTransform(Transform transform)
NEW
45
                        {
×
NEW
46
                                this.Start = transform.ApplyTransform(this.Start.Convert<XYZ>()).Convert<XY>();
×
NEW
47
                                this.End = transform.ApplyTransform(this.End.Convert<XYZ>()).Convert<XY>();
×
NEW
48
                        }
×
49

50
                        /// <inheritdoc/>
51
                        public override BoundingBox GetBoundingBox()
52
                        {
4✔
53
                                return BoundingBox.FromPoints([(XYZ)this.Start, (XYZ)this.End]);
4✔
54
                        }
4✔
55

56
                        /// <inheritdoc/>
57
                        public override Entity ToEntity()
58
                        {
1✔
59
                                return new Entities.Line(this.Start, this.End);
1✔
60
                        }
1✔
61

62
                        /// <inheritdoc/>
63
                        public override IEnumerable<XY> FindIntersections(Line2D line)
64
                        {
20✔
65
                                if (this.ToSegment2D().TryFindIntersection(line, out XY intersection))
20✔
66
                                {
6✔
67
                                        return new[] { intersection };
6✔
68
                                }
69
                                else
70
                                {
14✔
71
                                        return [];
14✔
72
                                }
73
                        }
20✔
74

75
                        public Segment2D ToSegment2D()
76
                        {
20✔
77
                                return new Segment2D(this.Start, this.End);
20✔
78
                        }
20✔
79
                }
80
        }
81
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc