Freehand: Shape
FreehandSpline - superclass: shape; super-superclass:node - 20:7 - classID: #(3232560656L, 2603512888L) 
Available in 3ds Max 2018.2 and higher: The freehand spline allows users to draw splines in the viewport by tracing a path.
Constructor
Freehand... Properties
General Parameters
<Freehand>.curveType Integer default: 0 -- integerThe type of line segments between knots, where:
- 0 = curved
- 1 = straight
<Freehand>.showKnots BooleanClass default: false -- boolean; ShowKnotsGets or sets whether to show the spline's knots.
<Freehand>.enableClosedCurve BooleanClass default: false -- boolean; ClosedGets or sets whether the spline is closed (the first and last knots are connected).
<Freehand>.constrainOffset Float default: 0.1 -- float; OffsetGets or sets the offset from a constraining surface, if one exists.
Creation Parameters
<Freehand>.enableConstrainShowNormals BooleanClass default: true -- boolean; ShowNormalsGets or sets whether to show the normal on the spline relative to the constrained surface.
<Freehand>.enableConstrain BooleanClass default: false -- boolean; ConstrainGets or sets whether to enable
<Freehand>.granularity Integer default: 3 -- integerGets or sets the granularity of the mouse capture (the number of samples of the mouse position) before creating a new knot when drawing the spline in the viewport.
<Freehand>.threshold Integer default: 10 -- integerGets or sets the creation threshold, which is how far the mouse must travel before a new knot is created.
<Freehand>.endCreateOnButtonUp BooleanClass default: true -- boolean; End_CreateGets or sets whether to end spline creation when the mouse button is up. When false, creation ends on double-click.
Parameters not exposed in the UI
<Freehand>.knots ArrayParameter default: #() -- point3 arrayGets or sets an array of point3 values representing the spline knots, in the order they appear on the spline.
<Freehand>.normals ArrayParameter default: #() -- point3 arrayGets or sets an array of point3 values representing the spline knot normals (if set), with each value corresponding to the knot with the same index in the knots array.
<Freehand>.shape_knots ArrayParameter default: #() -- int arrayAn array that indicates how many splines make up the shape and the knot where each new spline starts. For example, if the array contains two entries, #(10,20), this means that there are three splines, with the second starting and knot 10 and the third starting at knot 20.
<Freehand>.sampling Integer default: 0 -- integer; DeclutterGets or sets the "sampling" value, which is the minimum number of knots retained.
Example
-- create a new freehand
f = freehand()
-- add some random knots
pts = #()
a = [0,0,0]
b = [100,100,100]
for i = 1 to 20 do (
append pts (random a b)
)
f.knots = pts
