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

DomCR / ACadSharp / 14236951574

03 Apr 2025 07:03AM UTC coverage: 76.184% (-0.2%) from 76.343%
14236951574

Pull #525

github

web-flow
Merge cf111e118 into 04434c5d6
Pull Request #525: Issue-524 Explode Hatch

5586 of 8036 branches covered (69.51%)

Branch coverage included in aggregate %.

32 of 99 new or added lines in 17 files covered. (32.32%)

12 existing lines in 6 files now uncovered.

22084 of 28284 relevant lines covered (78.08%)

74241.73 hits per line

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

46.15
/src/ACadSharp/Entities/PolyLine3D.cs
1
using ACadSharp.Attributes;
2
using CSMath;
3
using System;
4
using System.Collections.Generic;
5

6
namespace ACadSharp.Entities
7
{
8
        /// <summary>
9
        /// Represents a <see cref="Polyline3D"/> entity.
10
        /// </summary>
11
        /// <remarks>
12
        /// Object name <see cref="DxfFileToken.EntityPolyline"/> <br/>
13
        /// Dxf class name <see cref="DxfSubclassMarker.Polyline"/>
14
        /// </remarks>
15
        [DxfName(DxfFileToken.EntityPolyline)]
16
        [DxfSubClass(DxfSubclassMarker.Polyline3d)]
17
        public class Polyline3D : Polyline
18
        {
19
                /// <inheritdoc/>
20
                public override ObjectType ObjectType => ObjectType.POLYLINE_3D;
1✔
21

22
                /// <inheritdoc/>
23
                public override string SubclassMarker => DxfSubclassMarker.Polyline3d;
442✔
24

25
                public Polyline3D() : base()
349✔
26
                {
349✔
27
                }
349✔
28

NEW
29
                public Polyline3D(IEnumerable<Vertex3D> vertices, bool isColsed) : base(vertices, isColsed)
×
NEW
30
                {
×
UNCOV
31
                }
×
32

33
                public override IEnumerable<Entity> Explode()
34
                {
×
35
                        return Polyline.Explode(this);
×
36
                }
×
37

38
                protected override void verticesOnAdd(object sender, CollectionChangedEventArgs e)
39
                {
1,625✔
40
                        if (e.Item is not Vertex3D)
1,625!
41
                        {
×
42
                                this.Vertices.Remove((Vertex)e.Item);
×
43
                                throw new ArgumentException($"Wrong vertex type for {DxfSubclassMarker.Polyline3d}");
×
44
                        }
45
                        else if (e.Item is Vertex3D v && v.Bulge != 0)
1,625!
46
                        {
×
47
                                throw new ArgumentException($"Bulge value cannot be different than 0 for a Vertex3D in a 3D Polyline");
×
48
                        }
49
                }
1,625✔
50
        }
51
}
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