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

DomCR / ACadSharp / 18274049051

06 Oct 2025 08:00AM UTC coverage: 78.022% (-0.01%) from 78.035%
18274049051

Pull #811

github

web-flow
Merge afc9577b9 into 2c978a905
Pull Request #811: Boundary path fix

6795 of 9445 branches covered (71.94%)

Branch coverage included in aggregate %.

0 of 4 new or added lines in 2 files covered. (0.0%)

9 existing lines in 1 file now uncovered.

26118 of 32739 relevant lines covered (79.78%)

109463.42 hits per line

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

0.0
/src/ACadSharp/Entities/Hatch.BoundaryPath.Spline.cs
1
using ACadSharp.Attributes;
2
using CSMath;
3
using System.Collections.Generic;
4
using System.Linq;
5

6
namespace ACadSharp.Entities
7
{
8
        public partial class Hatch
9
        {
10
                public partial class BoundaryPath
11
                {
12
                        public class Spline : Edge
13
                        {
14
                                /// <remarks>
15
                                /// Position values are only X and Y, Z represents the weight.
16
                                /// </remarks>
17
                                [DxfCodeValue(96)]
18
                                //42        Weights(optional, default = 1)        ??
19
                                public List<XYZ> ControlPoints { get; set; } = new List<XYZ>();
×
20

21
                                /// <summary>
22
                                /// Degree.
23
                                /// </summary>
24
                                [DxfCodeValue(94)]
25
                                public int Degree { get; set; }
×
26

27
                                /// <summary>
28
                                /// End tangent.
29
                                /// </summary>
30
                                [DxfCodeValue(13, 23)]
31
                                public XY EndTangent { get; set; }
×
32

33
                                /// <remarks>
34
                                /// Number of fit data.
35
                                /// </remarks>
36
                                [DxfCodeValue(97)]
37
                                public List<XY> FitPoints { get; set; } = new List<XY>();
×
38

39
                                /// <summary>
40
                                /// Number of knots.
41
                                /// </summary>
42
                                [DxfCodeValue(95)]
43
                                public List<double> Knots { get; set; } = new List<double>();
×
44

45
                                /// <summary>
46
                                /// Periodic.
47
                                /// </summary>
48
                                [DxfCodeValue(74)]
49
                                public bool Periodic { get; set; }
×
50

51
                                /// <summary>
52
                                /// Rational.
53
                                /// </summary>
54
                                [DxfCodeValue(73)]
55
                                public bool Rational { get; set; }
×
56

57
                                /// <summary>
58
                                /// Start tangent.
59
                                /// </summary>
60
                                [DxfCodeValue(12, 22)]
61
                                public XY StartTangent { get; set; }
×
62

63
                                /// <inheritdoc/>
64
                                public override EdgeType Type => EdgeType.Spline;
×
65

66
                                /// <inheritdoc/>
67
                                public override void ApplyTransform(Transform transform)
68
                                {
×
69
                                        throw new System.NotImplementedException();
×
70
                                }
71

72
                                /// <inheritdoc/>
73
                                public override BoundingBox GetBoundingBox()
74
                                {
×
75
                                        return BoundingBox.FromPoints(this.ControlPoints);
×
76
                                }
×
77

78
                                /// <inheritdoc/>
79
                                public override Entity ToEntity()
80
                                {
×
81
                                        Entities.Spline spline = new();
×
82

83
                                        spline.Degree = this.Degree;
×
84
                                        spline.Flags = this.Periodic ? spline.Flags |= (SplineFlags.Periodic) : spline.Flags;
×
85
                                        spline.Flags = this.Rational ? spline.Flags |= (SplineFlags.Rational) : spline.Flags;
×
86

87
                                        spline.StartTangent = this.StartTangent.Convert<XYZ>();
×
88
                                        spline.EndTangent = this.EndTangent.Convert<XYZ>();
×
89

90
                                        spline.ControlPoints.AddRange(this.ControlPoints);
×
91
                                        spline.Weights.AddRange(this.ControlPoints.Select(x => x.Z));
×
92
                                        spline.FitPoints.AddRange(this.FitPoints.Select(x => x.Convert<XYZ>()));
×
NEW
93
                                        spline.Knots.AddRange(this.Knots);
×
94

95
                                        return spline;
×
96
                                }
×
97
                        }
98
                }
99
        }
100
}
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