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

DomCR / ACadSharp / 14237266482

03 Apr 2025 07:21AM UTC coverage: 75.361% (-0.8%) from 76.181%
14237266482

Pull #457

github

web-flow
Merge 8c727f79b into 7d5174d5a
Pull Request #457: Geometric transform

5614 of 8168 branches covered (68.73%)

Branch coverage included in aggregate %.

264 of 717 new or added lines in 47 files covered. (36.82%)

280 existing lines in 13 files now uncovered.

22376 of 28973 relevant lines covered (77.23%)

72489.1 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 CSUtilities.Extensions;
4
using System.Collections.Generic;
5
using System.Linq;
6

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

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

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

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

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

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

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

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

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

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

73
                                /// <inheritdoc/>
74
                                public override Entity ToEntity()
75
                                {
×
76
                                        Entities.Spline spline = new();
×
77
                                        
78
                                        spline.Degree = this.Degree;
×
79
                                        spline.Flags = this.Periodic ? spline.Flags.AddFlag(SplineFlags.Periodic) : spline.Flags;
×
80
                                        spline.Flags = this.Rational ? spline.Flags.AddFlag(SplineFlags.Rational) : spline.Flags;
×
81
                                        
82
                                        spline.StartTangent = this.StartTangent.Convert<XYZ>();
×
83
                                        spline.EndTangent = this.EndTangent.Convert<XYZ>();
×
84

85
                                        spline.ControlPoints.AddRange(this.ControlPoints);
×
86
                                        spline.Weights.AddRange(this.ControlPoints.Select(x => x.Z));
×
87
                                        spline.FitPoints.AddRange(this.FitPoints.Select(x => x.Convert<XYZ>()));
×
88

89
                                        return spline;
×
90
                                }
×
91

92
                                /// <inheritdoc/>
93
                                public override BoundingBox GetBoundingBox()
94
                                {
×
95
                                        return BoundingBox.FromPoints(this.ControlPoints);
×
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