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

DomCR / ACadSharp / 14727322283

29 Apr 2025 08:56AM UTC coverage: 75.026% (-0.003%) from 75.029%
14727322283

push

github

web-flow
Merge pull request #644 from DomCR/issue-480_spline-polygonalvertices-transfer

Issue 480 spline polygonalvertices transfer

5716 of 8383 branches covered (68.19%)

Branch coverage included in aggregate %.

49 of 55 new or added lines in 2 files covered. (89.09%)

15 existing lines in 1 file now uncovered.

22806 of 29633 relevant lines covered (76.96%)

82142.44 hits per line

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

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

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

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

26
                public Polyline3D() : base()
10,373✔
27
                {
10,373✔
28
                }
10,373✔
29

NEW
30
                public Polyline3D(IEnumerable<XYZ> vertices, bool isClosed = false) : base(vertices.Select(v => new Vertex3D(v)), isClosed)
×
NEW
31
                {
×
NEW
32
                }
×
33

34
                public Polyline3D(IEnumerable<Vertex3D> vertices, bool isColsed) : base(vertices, isColsed)
×
35
                {
×
36
                }
×
37

38
                public override IEnumerable<Entity> Explode()
39
                {
×
40
                        return Polyline.Explode(this);
×
41
                }
×
42

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