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

DomCR / ACadSharp / 12905761471

22 Jan 2025 10:03AM UTC coverage: 2.0% (-74.0%) from 75.963%
12905761471

push

github

DomCR
version 1.0.6

104 of 7676 branches covered (1.35%)

Branch coverage included in aggregate %.

590 of 27024 relevant lines covered (2.18%)

5.13 hits per line

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

0.0
/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;
×
21

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

25
                public Polyline3D() : base()
×
26
                {
×
27
                        this.Vertices.OnAdd += this.verticesOnAdd;
×
28
                }
×
29

30
                public override IEnumerable<Entity> Explode()
31
                {
×
32
                        return Polyline.Explode(this);
×
33
                }
×
34

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