Slice selected poly by distance
Hi,
I finally managed to make a script to slice selected polys perpendicular to two picked points in local transform object by number of slice, but I can't manage to make this according to a distance...
If anybody can help.. thanks
how to use : select an editable poly, select faces to be sliced
run the script and pick two points, enter number of slice and click "go"
----------------------------------------
(
local savesnap=snapMode.active
snapMode.active=true
t0 = $.transform
pta = pickpoint snap:#3d
ptb = pickpoint snap:#3d rubberBand:pta
dist = ptb - pta
ptd = ( (ptb * inverse t0) - (pta * inverse t0) )
nptd = normalize ptd
posO = $.pos
na = nptd[1]
nb = nptd[2]
nc = nptd[3]
try destroyDialog rlslice catch()
global rlslice = rollout rlslice "Slice"
(
button butconnect "GO" pos:[2,2]
spinner spX "X " width:60 range:[2,200,3] type:#integer pos:[55,5]
on butconnect pressed do
(
undo on
(
for i=1 to (spX.value-1) do
(
inc = (ptd/(spX.value))
ppp = (inc * i) + (pta * inverse t0)
pppL = (ppp) - (posO * inverse t0)
$.EditablePoly.slice [na,nb,nc] pppL flaggedFacesOnly:on
)
)
)
)
createDialog rlslice 160 50
snapMode.active=savesnap
)
---------------------------------------------------
Comments
? this is the same :-)
? this is the same :-)
i see some diff...
pppL line.....
+ [0,0,15 * i]
...
haven't looked closely somewhere else...
.
Yep, this is the difference between both scripts.
titane357, use
+ [0,0,15 * i]
as reference to modify your code.Tools and Scripts for Autodesk 3dsMax
ok found how to...
ok found how to...
.
Tools and Scripts for Autodesk 3dsMax