Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

391b785d 5d4d 2e3a 4be9 06995c9b8ba8

haplokuon edited this page May 6, 2023 · 1 revision

NurbsEvaluator Method

netDxf 3.0.0 Library

Calculate points along a NURBS curve.

Definition

Namespace: netDxf.Entities
Assembly: netDxf (in netDxf.dll) Version: 3.0.0

C#

public static List<Vector3> NurbsEvaluator(
	Vector3[] controls,
	double[] weights,
	double[] knots,
	int degree,
	bool isClosed,
	bool isClosedPeriodic,
	int precision
)

VB

Public Shared Function NurbsEvaluator ( 
	controls As Vector3(),
	weights As Double(),
	knots As Double(),
	degree As Integer,
	isClosed As Boolean,
	isClosedPeriodic As Boolean,
	precision As Integer
) As List(Of Vector3)

C++

public:
static List<Vector3>^ NurbsEvaluator(
	array<Vector3>^ controls, 
	array<double>^ weights, 
	array<double>^ knots, 
	int degree, 
	bool isClosed, 
	bool isClosedPeriodic, 
	int precision
)

F#

static member NurbsEvaluator : 
        controls : Vector3[] * 
        weights : float[] * 
        knots : float[] * 
        degree : int * 
        isClosed : bool * 
        isClosedPeriodic : bool * 
        precision : int -> List<Vector3> 

Parameters

  Vector3[]
List of spline control points.
  Double[]
Spline control weights. If null the weights vector will be automatically initialized with 1.0.
  Double[]
List of spline knot points. If null the knot vector will be automatically generated.
  Int32
Spline degree.
  Boolean
Specifies if the spline is closed.
  Boolean
Specifies if the spline is closed and periodic.
  Int32
Number of vertexes generated.

Return Value

List(Vector3)
A list vertexes that represents the spline.

Remarks

NURBS evaluator provided by mikau16 based on Michael V. implementation, roughly follows the notation of http://cs.mtu.edu/~shene/PUBLICATIONS/2004/NURBS.pdf Added a few modifications to make it work for open, closed, and periodic closed splines.

See Also

Reference

Spline Class
netDxf.Entities Namespace

Clone this wiki locally