Table of Contents

Method SplitAtKnot

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

SplitAtKnot(double)

Cuts the spline in two at a value of its knots.

public GeoSpline3[] SplitAtKnot(double knot)

Parameters

knot double

The knot value to cut at, above DomainStart and below DomainEnd.

Returns

GeoSpline3[]

The part before the knot value, over [DomainStart, knot], and the part after it, over [knot, DomainEnd].

Remarks

Exact: the knot at the value is raised to the degree, which cuts the control polygon without moving the curve, so the two parts are the two pieces of the spline, with the same degree and weights, and meet at the point the spline has there, which is the last control point of the first and the first of the second, to the last bit. A point of the first part at a knot value is the spline's point at it, to rounding.

Exceptions

ArgumentOutOfRangeException

Thrown when the knot value is not above the first knot and below the last.

ArgumentException

Thrown when a part would be a spline that stands still: all its control points one point, as a cut inside a span whose control points all coincide would leave.