Show / Hide Table of Contents

Class Spline

Represents a spline curve EntityObject (NURBS Non-Uniform Rational B-Splines).

Inheritance
System.Object
DxfObject
EntityObject
Spline
Implements
IHasXData
System.ICloneable
Inherited Members
EntityObject.LayerChanged
EntityObject.OnLayerChangedEvent(Layer, Layer)
EntityObject.LinetypeChanged
EntityObject.OnLinetypeChangedEvent(Linetype, Linetype)
EntityObject.XDataAddAppReg
EntityObject.OnXDataAddAppRegEvent(ApplicationRegistry)
EntityObject.XDataRemoveAppReg
EntityObject.OnXDataRemoveAppRegEvent(ApplicationRegistry)
EntityObject.Reactors
EntityObject.Type
EntityObject.Color
EntityObject.Layer
EntityObject.Linetype
EntityObject.Lineweight
EntityObject.Transparency
EntityObject.LinetypeScale
EntityObject.IsVisible
EntityObject.Normal
EntityObject.Owner
EntityObject.XData
EntityObject.TransformBy(Matrix4)
EntityObject.ToString()
DxfObject.CodeName
DxfObject.Handle
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Spline : EntityObject, IHasXData, ICloneable

Constructors

| Improve this Doc View Source

Spline(IEnumerable<Vector3>)

Initializes a new instance of the Spline class.

Declaration
public Spline(IEnumerable<Vector3> fitPoints)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Vector3> fitPoints

Spline fit points.

Remarks

Spline entities created with a list of fit points cannot be used as a boundary path in a hatch.

| Improve this Doc View Source

Spline(List<SplineVertex>)

Initializes a new instance of the Spline class.

Declaration
public Spline(List<SplineVertex> controlPoints)
Parameters
Type Name Description
System.Collections.Generic.List<SplineVertex> controlPoints

Spline control points.

Remarks

By default the degree of the spline is equal three.

| Improve this Doc View Source

Spline(List<SplineVertex>, Boolean)

Initializes a new instance of the Spline class.

Declaration
public Spline(List<SplineVertex> controlPoints, bool periodic)
Parameters
Type Name Description
System.Collections.Generic.List<SplineVertex> controlPoints

Spline control points.

System.Boolean periodic

Sets if the spline as periodic closed (default false).

Remarks

By default the degree of the spline is equal three.

| Improve this Doc View Source

Spline(List<SplineVertex>, List<Double>, Int16)

Initializes a new instance of the Spline class.

Declaration
public Spline(List<SplineVertex> controlPoints, List<double> knots, short degree)
Parameters
Type Name Description
System.Collections.Generic.List<SplineVertex> controlPoints

Spline control points.

System.Collections.Generic.List<System.Double> knots

Spline knot vector.

System.Int16 degree

Degree of the spline curve. Valid values are 1 (linear), degree 2 (quadratic), degree 3 (cubic), and so on up to degree 10.

| Improve this Doc View Source

Spline(List<SplineVertex>, Int16)

Initializes a new instance of the Spline class.

Declaration
public Spline(List<SplineVertex> controlPoints, short degree)
Parameters
Type Name Description
System.Collections.Generic.List<SplineVertex> controlPoints

Spline control points.

System.Int16 degree

Degree of the spline curve. Valid values are 1 (linear), degree 2 (quadratic), degree 3 (cubic), and so on up to degree 10.

| Improve this Doc View Source

Spline(List<SplineVertex>, Int16, Boolean)

Initializes a new instance of the Spline class.

Declaration
public Spline(List<SplineVertex> controlPoints, short degree, bool periodic)
Parameters
Type Name Description
System.Collections.Generic.List<SplineVertex> controlPoints

Spline control points.

System.Int16 degree

Degree of the spline curve. Valid values are 1 (linear), degree 2 (quadratic), degree 3 (cubic), and so on up to degree 10.

System.Boolean periodic

Sets if the spline as periodic closed (default false).

Properties

| Improve this Doc View Source

ControlPoints

Gets the spline SplineVertex list.

Declaration
public IReadOnlyList<SplineVertex> ControlPoints { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<SplineVertex>
| Improve this Doc View Source

CreationMethod

Gets the spline creation method.

Declaration
public SplineCreationMethod CreationMethod { get; }
Property Value
Type Description
SplineCreationMethod
| Improve this Doc View Source

CtrlPointTolerance

Gets or sets the control point tolerance.

Declaration
public double CtrlPointTolerance { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Degree

Gets or sets the polynomial degree of the resulting spline.

Declaration
public short Degree { get; }
Property Value
Type Description
System.Int16
Remarks

Valid values are 1 (linear), degree 2 (quadratic), degree 3 (cubic), and so on up to degree 10.

| Improve this Doc View Source

EndTangent

Gets or sets the spline curve end tangent.

Declaration
public Vector3? EndTangent { get; set; }
Property Value
Type Description
System.Nullable<Vector3>
Remarks

Only applicable to splines created with fit points.

| Improve this Doc View Source

FitPoints

Gets the spline Vector3 list.

Declaration
public List<Vector3> FitPoints { get; }
Property Value
Type Description
System.Collections.Generic.List<Vector3>
| Improve this Doc View Source

FitTolerance

Gets or sets the fit point tolerance.

Declaration
public double FitTolerance { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

IsClosed

Gets if the spline is closed.

Declaration
public bool IsClosed { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsPeriodic

Gets if the spline is periodic.

Declaration
public bool IsPeriodic { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

KnotParameterization

Gets or set the knot parameterization computational method.

Declaration
public SplineKnotParameterization KnotParameterization { get; set; }
Property Value
Type Description
SplineKnotParameterization
Remarks

Only applicable to splines created with fit points.

| Improve this Doc View Source

Knots

Gets the spline knot vector.

Declaration
public IReadOnlyList<double> Knots { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyList<System.Double>
Remarks

By default a uniform knot vector is created.

| Improve this Doc View Source

KnotTolerance

Gets or sets the knot tolerance.

Declaration
public double KnotTolerance { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

StartTangent

Gets or sets the spline curve start tangent.

Declaration
public Vector3? StartTangent { get; set; }
Property Value
Type Description
System.Nullable<Vector3>
Remarks

Only applicable to splines created with fit points.

Methods

| Improve this Doc View Source

Clone()

Creates a new Spline that is a copy of the current instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new Spline that is a copy of this instance.

Overrides
EntityObject.Clone()
| Improve this Doc View Source

PolygonalVertexes(Int32)

Converts the spline in a list of vertexes.

Declaration
public List<Vector3> PolygonalVertexes(int precision)
Parameters
Type Name Description
System.Int32 precision

Number of vertexes generated.

Returns
Type Description
System.Collections.Generic.List<Vector3>

A list vertexes that represents the spline.

| Improve this Doc View Source

Reverse()

Switch the polyline direction.

Declaration
public void Reverse()
| Improve this Doc View Source

SetUniformWeights(Double)

Sets all control point weights to the specified number.

Declaration
public void SetUniformWeights(double weight)
Parameters
Type Name Description
System.Double weight

Control point weight.

| Improve this Doc View Source

ToPolyline(Int32)

Converts the spline in a Polyline.

Declaration
public Polyline ToPolyline(int precision)
Parameters
Type Name Description
System.Int32 precision

Number of vertexes generated.

Returns
Type Description
Polyline

A new instance of Polyline that represents the spline.

| Improve this Doc View Source

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
EntityObject.TransformBy(Matrix3, Vector3)
Remarks

Matrix3 adopts the convention of using column vectors to represent a transformation matrix.

Implements

IHasXData
System.ICloneable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX