Spline for MoxyDraw

Creates a fit spline (a spline that goes through all the points).


Syntax:

Spline
points collection string
knots parameterization
fit tolerance
is spline closed
tangent point start X
tangent point start Y
tangent point finish X
tangent point finish Y

points collection string:

Sets all points as a string. It can have infinite number of points. The format is "pointX1,pointY1" as follows:

pointX1 = Sets the first position point X.

pointY1 = Sets the first position point Y.


_ = Separator between points.


Infinite points can be entered as follow: "pointX1,pointY1_pointX2,pointY2_pointX3,pointY3_pointX4,pointY4_" and so on...

knots parameterization:

Optional. Sets the knots parameterization. If omitted, it will be set to "chord".

Chord = Spline will be calculated using "chord" calculation at each point.

SqrtChord = Spline will be calculated using "square root chord" calculation at each point.

Uniform = Spline will be calculated using "uniform" calculation at each point.

See AutoCAD help for more details on these description.

fit tolerance:

Optional. Sets the fit tolerance (distance between middle points and the curve). Set it to "True" to close it. If set to false or omitted, it will stay open (unless the last point is on the first one).

is spline closed:

Optional. Sets if spline is closed or open. Set it to "True" to close it. If set to false or omitted, it will stay open (unless the last point is on the first one).

tangent point start X:

Optional. Sets the tangent point for the start point X. If omitted, it will be set to 0.

tangent point start Y:

Optional. Sets the tangent point for the start point Y. If omitted, it will be set to 0.

tangent point finish X:

Optional. Sets the tangent point for the finish point X. If omitted, it will be set to 0.

tangent point finish Y:

Optional. Sets the tangent point for the finish point Y. If omitted, it will be set to 0.

Examples:

Spline
_0,0_1.5,24_4.25,70_15,-23_39,86_36,-11_40,3_50,15

Creates some sort of stylish M. Chord calculation is used by default.



Spline
_0,0_1.5,24_4.25,70_15,-23_39,86_36,-11_40,3_50,15
uniform
1
true
2
3
4
5

Creates the same stylish M with the uniform calculation, fit tolerance of 1, closed. The start tangent point is 2,3 and the tangent finish point is 4,5.