ScriptSpot home

Spline Project

Downloads

3ds Max compatibility
See original listing claims
Report a problem
Community reviewsNo reviews yet.

Listing details

From original requirements
3–2008
Original version requirement
3ds Max 3-2008
Legacy votes
17
Listing created
How compatibility works

Compatibility comes from the author’s supported range or requirements in the original listing. A tested version records what the author tried.

“2020 unconfirmed” in the catalog means support for 3ds Max 2020 is still unknown.

Community reports record successful tests on specific releases.

Posted by

Chuggnut

More by this author

Description

Same kinda thing as mesh project except projects spline anlong their Z axis onto the surface of an object

Comments (8)
kamil

works fine in 2016 watch pivot direction

--***********************************
--* project spline onto mesh v1.1 *
--***********************************

macroscript Spline_project category:"Chuggs tools" tooltip:"Spline Project"
(
if (selection.count == 1) and (superclassof selection[1] == shape) then
(
obj = copy selection[1]
obj.name += "_projected"
converttosplineshape obj

pointer = splineshape name:"pointer" wirecolor:(color 255 255 0)
for i = 1 to obj.numsplines do
(
mid = [0,0,0]
midcount = 0
for n = 1 to (numknots obj i) do
(
mid += (getknotpoint obj i n)
midcount += 1
)
addnewspline pointer
addknot pointer i #corner #line (mid / midcount)
addknot pointer i #corner #line ((mid / midcount) + (obj.dir * 80))
)
updateshape pointer

if (pickobj = pickobject message:"Pick an object") != undefined do
(
new_obj = pickobj
fail = 0
for t = 1 to obj.numsplines do
(
for i = 1 to (numknots obj t) do
(
k = getknotpoint obj t i
r = ray k obj.dir
if (np = intersectray new_obj r) != undefined then
(
d = length (k - np.position)
v = false
if (getknottype obj t i == #bezier) or (getknottype obj t i == #beziercorner) do
(
inv = getinvec obj t i
outv = getoutvec obj t i
v = true
)
setknotpoint obj t i np.position
if v do
(
infail = true
outfail = true
r = ray inv obj.dir
np = intersectray new_obj r
if np != undefined do
(
setinvec obj t i np.pos
infail = false
)
r = ray outv obj.dir
np = intersectray new_obj r
if np != undefined do
(
setoutvec obj t i np.pos
outfail = false
)
if infail do
(
setknottype obj t i #beziercorner
setinvec obj t i (inv + (obj.dir * d))
)
if outfail do
(
setknottype obj t i #beziercorner
setoutvec obj t i (inv + (obj.dir * d))
)
)
)
else
(
fail += 1
)
)
)
if fail == (numknots obj) then
(
updateshape obj
delete obj
delete pointer
)
else
(
updateshape obj
delete pointer
)
)
)
else
(
messagebox "Invalid selection!"
)
)

paulov

ASDGAG!! the site is down, I really need to project splines. I've used the itoo Glue tool but it does not generate new vertices in the lines where the surface does have so in some cases it goes under it.

Please reupload it to megaupload or a similar hosting.

atanguay

Does anyone have this tool? The website is gone with a squatter sitting on it.

newstyle

Hellow
Is this script work with 3DSMax 2008 64bit, because it give me error :

"" UNKNOW PROPERTY: "numSPlines" in $Line:Line02_projecter @ [-0.854530, -3.141411,34.275490] ""

onyxlee

thx to admin for such a swift response.

and if you have wrong projection, try to collaps your poly into really mesh. to get the best result, turn off the spline's interpolation optimize and increase the step.

Chris Grant

Thanks for pointing out the URL mistake, I've updated the script entry.

onyxlee

thank you. it's a great tools, and it works fine in max2008.

but the link above is not available any more. here is the correct one:

http://www.chuggnut.com/Scripts/chugg_splineproject.zip

the path name is Case Sensitive.

and after you copy the file in your script folder, run max, find it under your "customize interface"-->"main UI"-->"chuggs tools", then you know what to do.

to use it, modify your path's local z axis first, then run the script, then select the destination mesh. that's it.

happy projecting.