Draw spline to closest points
Hello, I am fairly new to scripting in 3ds max, but have been impressed with it's capabilities so far.
I have a project where I have received a file with a list of xyz coordinates and I would like to draw a spline between each point and a spline to each of the points around it.
I have written a script that reads in all of the points and connects them with one line, which isn't exactly what I'm looking for. (goldcage2.jpg)
When I open the original xyz file with a program called ViewerLite, it correctly connects all of the vertexes, like this:
Here is my script so far:
theFilename = getOpenFileName types:"Comma Separated Values (*.CSV)|*.CSV|All Files (*.*)|*.*"
if theFilename != undefined do ( --if a valid filename picked
local theFile = openFile theFilename --open the file
s = splineshape()
idx = addNewSpline s
while not eof theFile do (
addKnot s idx #corner #line (Point3 (readValue theFile) (readValue theFile) (readValue theFile))
Is there an easy way to connect all of the closest vertexes with a spline, sort of like ViewLite does? Am I even on the right track?