how to use cut tool (editable poly) with maxscript

Hi! I am new here and new to maxscript and I want to say that this is an excellent site :) and I am a big fan my problem is I want to use cut tool (editable poly with max script) but didn't succes following maxscript documentation the cut fuction have 4 arguments

polyOp.cutVert Poly poly int start_vert point3 destination point3 projdir

I didn't understand what is exactelly projdir

I want to developpe a script that is able to cut a polygonal surface converted from a spline I already write a script it work but not in all case in this one I used createEdge but I want to replace it by cut... here is the code

macroScript fixspolyspline_y category:"popa_3d"

(

on isEnabled return

selection.count == 1 and classof selection[1].baseobject == Editable_Poly

on execute do

(

obj = selection[1]

p= polyOp.getNumVerts obj

n=0
w=0
v=0
s=0
d=0

q=0
for i=1 to p do(
for j=1 to p do(

a = [n,w,v]
b = [q,s,d]

a= polyOp.getVert obj i
b= polyOp.getVert obj j

if a.y == b.y then(
obj.createEdge i j)
)

)
)
)

see the image to see what script do

AttachmentSize
untitled-1.jpg130.74 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
popa_3d's picture

Re

Amazing the cut tool is exactelly what I wanted to do thank you very much LittleLordPotala :)

PS thanks to you also miauu your script is very usefull in my work also ;)

LittleLordPotala's picture

Your script with cut tool :

See the attached files.

You can change the threshold value as needed.
Choose the axis with the on_X and on_Y variables.

The projdir argument is the point of view
and in your case, you cut on X and Y axis, so it's the top view [0,0,1].

Best regards.

AttachmentSize
cuttool.ms 629 bytes
cuttool_with_interface.ms 1.05 KB
miauu's picture

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.