Notifications
Clear all
[Closed] Pro Cutter
Page 2 / 2
Prev
May 05, 2012 8:16 pm
I noticed that it creates 2 elements, but I want to have 2 objects. Is this possible?
May 05, 2012 8:16 pm
I just tested in Max 2013, it worked fine for me.
I created a teapot, ran the code, but without the Macroscript header and On Execute, and it sliced it up and made multiple objects.
May 05, 2012 8:16 pm
Try this function
Somtime works Ok, somtime not especially if you use boxes.
Select multiple object and run code to see what happens.
Options:
–“selectionArr” > selected objects
–“useDir” > if is true then slicePlane will be placed at obj center with same
direction as object else
–“strength” > set Noice modifier strength value
fn procutterSlice selectionArr: useDir:true strength:10 =
(
if selectionArr == unsupplied then objectsArr = getCurrentSelection() else objectsArr = selectionArr
if objectsArr.count == 0 then (messageBox "Select some objects first" title:"procutterSlice" beep:false) else
(
fn filtGeo msh = (isKindof msh GeometryClass and not isKindOf msh TargetObject and not isKindOf msh XRefObject)
if getCommandPanelTaskMode() != #create do setCommandPanelTaskMode mode:#create
clearSelection()
subdivideMod = subdivide size:10
smoothMod = smooth autosmooth:off
with redraw off
(
for obj in objectsArr where filtGeo obj == true do
(
noiseMod = Noisemodifier seed:(random 0 9999) scale:10 fractal:true roughness:1 iterations:6 strength:[strength/2,strength,strength]
objBB = in coordsys local nodeLocalBoundingBox obj
planeSize = amax #((abs((objBB[1]-objBB[2]).x))+20, (abs((objBB[1]-objBB[2]).y))+20)
slicePlane = plane width:planeSize length:planeSize widthSegs:5 lengthSegs:5 dir:(if useDir then obj.dir else [0,0,1]) pos:(obj.center)
addmodifier slicePlane subdivideMod
addmodifier slicePlane noiseMod
addmodifier slicePlane smoothMod
ProCutter.CreateCutter slicePlane 4 true true false true true
ProCutter.AddStocks slicePlane obj 4 1
ConvertToPoly slicePlane
delete slicePlane
)
)
)
)
procutterSlice()
Page 2 / 2
Prev