GeometryClass Common Properties, Operators, and Methods

Value > MAXWrapper > Node > GeometryClass

The mesh operations underlying the Boolean Compound Object in 3ds Max are accessible in MAXScript. They appear as operators (+, -, *) that you can apply to any two scene objects that are convertible to meshes. These objects are all GeometryClass objects with the exception of the particle systems.

The operators are:

<node1> + <node2> 	 

Returns the union of node1 and node2

   

<node1>-<node2>   

Returns the subtraction of node2 from node1

   

<node1>*<node2> 

Returnsthe intersection of node1 and node2

EXAMPLE

$foo - $baz
$sphere01 + $sphere02 + $sphere03 + $sphere04

The Boolean operators change the first operand to be the result of the operation and leave the second operand untouched. So, in the first example, the $foo node is changed to an Editable Mesh object containing the result of the difference operation. In the second example, $sphere01 is successively unioned with each of the other spheres - $sphere01 contains the compound result and the other spheres are left standing.

NOTE:

Unlike the Boolean compound object in 3ds Max, this operation destructively modifies the first operand - you cannot retrieve the original first operand after the Boolean operation is performed. You can effectively keep the first operand by using a copy function,

EXAMPLE

result = (copy $foo) - $baz

will put a modified copy of $foo into the variable result, leaving the original $foo unchanged.

   

GetTriMeshFaceCount <node> 

Returns an array of two integers - the face count and the vertex count of the TriMesh on top of the modifier stack.