Class Polyline
Represents a generic polyline EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Polyline : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourcePolyline()
Initializes a new instance of the Polyline3d class.
Declaration
public Polyline()
Polyline(IEnumerable<PolylineVertex>)
Initializes a new instance of the Polyline3d class.
Declaration
public Polyline(IEnumerable<PolylineVertex> vertexes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<PolylineVertex> | vertexes | 3d polyline PolylineVertex list. |
Polyline(IEnumerable<PolylineVertex>, Boolean)
Initializes a new instance of the Polyline3d class.
Declaration
public Polyline(IEnumerable<PolylineVertex> vertexes, bool isClosed)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<PolylineVertex> | vertexes | 3d polyline PolylineVertex list. |
| System.Boolean | isClosed | Sets if the polyline is closed (default: false). |
Polyline(IEnumerable<Vector3>)
Initializes a new instance of the Polyline3d class.
Declaration
public Polyline(IEnumerable<Vector3> vertexes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector3> | vertexes | 3d polyline Vector3 list. |
Polyline(IEnumerable<Vector3>, Boolean)
Initializes a new instance of the Polyline3d class.
Declaration
public Polyline(IEnumerable<Vector3> vertexes, bool isClosed)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<Vector3> | vertexes | 3d polyline Vector3 list. |
| System.Boolean | isClosed | Sets if the polyline is closed, by default it will create an open polyline. |
Properties
| Improve this Doc View SourceIsClosed
Gets or sets if the polyline is closed.
Declaration
public bool IsClosed { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
LinetypeGeneration
Enable or disable if the line type pattern is generated continuously around the vertexes of the polyline.
Declaration
public bool LinetypeGeneration { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Thickness
Declaration
public double Thickness { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Vertexes
Gets the polyline PolylineVertex list.
Declaration
public ObservableCollection<PolylineVertex> Vertexes { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<PolylineVertex> |
Methods
| Improve this Doc View SourceClone()
Creates a new Polyline that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Polyline that is a copy of this instance. |
Overrides
| Improve this Doc View SourceExplode()
Decompose the actual polyline in a list of Line.
Declaration
public List<EntityObject> Explode()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<EntityObject> | A list of Line that made up the polyline. |
Reverse()
Switch the polyline direction.
Declaration
public void Reverse()
TransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.