Freehand: Shape

FreehandSpline - superclass: shape; super-superclass:node - 20:7 - classID: #(3232560656L, 2603512888L) 

Value > MAXWrapper > Node > GeometryClass > Shape > Freehand

 

   

Shapes and Splines - Quick Navigation

   

NEW in 3ds Max 2018 Update 2: 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 -- integer

The type of line segments between knots, where:

   

<Freehand>.showKnots BooleanClass default: false -- boolean; ShowKnots

Gets or sets whether to show the spline's knots.

   

<Freehand>.enableClosedCurve BooleanClass default: false -- boolean; Closed

Gets or sets whether the spline is closed (the first and last knots are connected).

   

<Freehand>.constrainOffset Float default: 0.1 -- float; Offset

Gets or sets the offset from a constraining surface, if one exists.

   

Creation Parameters

<Freehand>.enableConstrainShowNormals BooleanClass default: true -- boolean; ShowNormals

Gets or sets whether to show the normal on the spline relative to the constrained surface.

   

<Freehand>.enableConstrain BooleanClass default: false -- boolean; Constrain

Gets or sets whether to enable

   

<Freehand>.granularity Integer default: 3 -- integer

Gets 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 -- integer

Gets 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_Create

Gets 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 array

Gets or sets an array of point3 values representing the spline knots, in the order they appear on the spline.

   

<Freehand>.normals ArrayParameter default: #() -- point3 array

Gets 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 array

An 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; Declutter

Gets or sets the "sampling" value, which is the minimum number of knots retained.

   

   

For 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

See Also