[Closed] How to make spline?
I am trying to make spline object.
I know how to make mesh:
on buildMesh do
(
v = #()
append v [0, 0, 0]
append v [x, y, 0]
setMesh mesh verts: v
)
But how can I make spline?
mesh to spline eh…if you find out let me know, sounds interesting…
I think you just want to create a spline from scratch right? this confused me too.
here’s what the code looks like for a spline with 2 verts.
[size=1] mySpline = splineshape()
addnewspline mySpline
addknot myspline 1 #corner #curve [0,100,0]
addknot myspline 1 #corner #curve [0,-100,0]
updateshape mySpline
[/size]this should do it
I couldn’t figure out how to create bezier point in the addknot line but I did figure out how to convert it later. the command is:
[size=1]
[size=1][size=1] setknottype mySpline 1 1 #bezier
setknottype mySpline 1 2 #bezier
[/size]
then the command to put the bezier handles wherever you want them is:
[size=1] setOutVec mySpline 1 1 [0,0,65]
setinVec mySpline 1 2 [0,0,-65]
updateshape mySpline
this sets the bezier handles and updates the spline
there’s more about this under the “splineshape” page under “editable meshes,Splines,patches and polys” in the 3dsMax object section of the maxscript helpfile
good luck, hope this helps
[/size][/size][/size]
How to make it as Plugin… add to shape category.
If I want to create my own shape eg. Steel Section.