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
Attachment | Size |
---|---|
untitled-1.jpg | 130.74 KB |
Comments
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 ;)
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.
Go here and chedk out this
Go here and chedk out this script - 111_fix_nonquad_polys_v.02
Tools and Scripts for Autodesk 3dsMax