Interface: ProCutter
 
 
 

The ProCutter Compound Object is part of the ProBoolean Extension which is integral part of 3ds Max 9 and higher.It can be used to cut one or more stock objects using a cutter object:

Methods:

ProCutter.CreateCutter#( <object_1> { , <objectr_2> } ) <addMethod><stockOutsideCutter> <stockInsideCutter> <cutterOutsideStock><autoExtractMesh> <explodeByElements> 	 

Creates a ProCutter object using node <operand_1> and multiple nodes <operand_2>, allstored in an array.

#( <object_1> { , <object_2> } ) -Specifiestheobjectsused to buildthe Cutter.Note that the cutter will take over the node and name from <object_1>.The object of thefirstnode willbecomethe firstcuttersub-object.

<addMethod> specifies howthe<operand_2>node(s) willbe used. Possible values are:1 - instance, operand is an instance of the original node

2 - reference, operand is a reference to original node

3 - copy, operand is a copy of original node

4 - move, original node should be deleted

One of the followingthree optionsmust be set totrue:

<stockOutsideCutter> specifies what to do with the portions of theStock orStocks outsidethe Cutter.

True - keepStock outside the Cutter

False -remove Stock outside the Cutter

<stockInsideCutter> specifies what to do with the portions of theStock orStocks insidethe Cutter.

True - keepStock inside the Cutter

False -remove Stock inside the Cutter

<cutterOutsideStock> specifies what to do with the portions of theCutter outside of theStock orStocks.

True - keepCutter outside of the Stock(s)

False -remove Cutter outside of the Stock(s)

<autoExtractMesh> specifieswhether theresultof theoperationshouldbe maintained in theCuttercompound object or extracted into separate mesh.

True - don't modify the cutter object, just cut the stock mesh and extract it into a new object. Note that once the operation is done, the result is an editable mesh with no sub-objects. This flag is useful if you want to use the cutter like a cookie cutter where you reuse the cutter over and over to make holes in an object.

False - maintainall objects in the Cutter compound object. Oncetheoperation isperformedthe result is aprocedural Cutter object with both cutters and stocks as sub-objects thatcanbe edited.

<explodeByElements> specifieswhether mesh elements should beseparated into individualmeshes.

True - createsaseparate mesh for eachelement. It is a good way to break apart an object into smaller volumes by setting thisflagto truewhile<autoExtractMesh>along with<stockOutsideCutter>and<stockInsideCutter>are also set totrue.

False -create asingle mesh witha meshelement for each separate volume.

   

ProCutter.AddStocks <cutter_object> #( <stock_1> { , <stock_2> } )<addMethod> <matMethod>   

Adds one or more stock objects to an existing ProCutter compound object.

<cutter_object> is theoriginalProCutter node created using ProCutter.CreateCutter()

#( <stock_2> { , <stock_2> } )- specifies one or more stock nodes inan array of nodes.  Note that even if you have only one stockobject,you need to usean array, for example #(stockb).

<mat_method> specifies how the materials of the two operandsshould behandled.Possible values are:

1 - applies operand material

2 - retains original material

   

ProCutter.getOperandSel <bool_obj> <integer> 

Gets the index of the operand currently selected in the operands list.

   

ProCutter.setOperandSel <bool_obj> <integer> <boolean> 

Sets the index of the operand to be selected in the operands list.

   

ProCutter.getDisplayResult <bool_obj> 
ProCutter.setDisplayResult <bool_obj> <boolean> 

These methods get and set whether Results or Operands are displayed. If true, Result is displayed. If false, Operands are displayed.

   

ProCutter.getShowHiddenOps <bool_obj> 
ProCutter.setShowHiddenOps <bool_obj> <boolean> 

these methods get and set whether Results + Hidden Operands are displayed. If true, Results + Hidden Operands are displayed. If false, the Results or Operands as specified using ProCutter.SetDisplayResult() are displayed.

   

ProCutter.getUpdateMode <bool_obj> 
ProCutter.setUpdateMode <bool_obj> <integer> 

These methods get and set the Update mode as follows:

0 - Always

1 - When Selected

2 - When Rendering

3 - Manually

   

ProCutter.getDecimationPercent <bool_obj> 
ProCutter.setDecimationPercent <bool_obj> <float> 

These methods get and set the decimation percentage that determines the percentage of edges that will be removed from the total set of polygons on this Boolean.

   

ProCutter.getMakeQuad <bool_obj> 
ProCutter.setMakeQuad <bool_obj> <boolean> 

These methods get and set whether the operation will change the tessellation of the Boolean from triangles to quadrilaterals

   

ProCutter.getQuadSizePercent <bool_obj> 
ProCutter.setQuadSizePercent <bool_obj> <float> 

These methods get and set the percentage of the overall length of the quadrilaterals.

   

ProCutter.getPlanarEdgeRemoval <bool_obj> 
ProCutter.setPlanarEdgeRemoval <bool_obj> <integer> 

These methods determine how the polygons on planar faces will be handled:

1 - Removes all extra co-planar edges on a face

2 - Removes only invisible edges on each face

3 - No edge removal

   

Scripting ProCutter Operations

The ProCutter is a two stage operation for scripting. First you create the cutter then you add stocks to the existing cutter.

EXAMPLE 1

Create two boxes to be used in cutter and one box for stock. The resulting cutter object will contain 3 operands.

a = box length:10 height:10 width:10
b = box length:4 height:4 width:15
c = box length:13 height:15 width:10
ProCutter.CreateCutter #(a,b) 1 True False False False False
ProCutter.AddStocks a #(c) 1 1

EXAMPLE 2

This is the sort of set up to use when you want to break an object apart into separate little volumes.

--- Use cutter to break apart volumes of stock
--- into separate little volumes that are extracted
--- into separate meshes.  This is what you might do
--- if you want an object to "explode" into smaller
--- pieces.  Note that after the operation the original
--- cutter object stays around and can be used again.
a = box length:10 height:10 width:10
b = box length:4 height:4 width:15
c = box length:13 height:15 width:10
ProCutter.CreateCutter #(a,b) 1 True True False True True
ProCutter.AddStocks a #(c) 1 1
See Also