PolyToolsSelect : GlobalUtilityPlugin

The PolyToolsSelect Global Utility Plugin introduced in 3ds Max 2011 exposes an interface that provides MAXScript access to the Graphite Selection tools.

The functionality was first implemented in 3ds Max 2010 using different functions that were not officially supported as MAXScript tools. This interface consolidates all relevant properties and methods and lets MAXScript users apply them in their own tools.

Constructor:

Class instances not creatable by MAXScript

PolyToolsSelect interfaces:

Interface: PolyToolsSelect 

Methods:

Modify Selection

<boolean>PolyToolsSelect.Loop <boolean>cylinderEnds      

Selects a loop based on the current sub-object selection:

Sub-Object Level ShiftPressed = False ShiftPressed = True
Polygon Select sets of neighboring polygons and apply to select loops.
Edge Select edges and apply to select loops. The tool can also perform loops on the top and bottom edges of a cylinder. Specifically designed for this purpose.
Vertex Select sets of neighboring vertices and apply to select loops. The tool can also perform loops on the top and bottom vertices of a cylinder. Specifically designed for this purpose.
<boolean>PolyToolsSelect.Ring ()   

Selects a ring based on the current sub-object selection:

Sub-Object Level Function
Polygon Select a few polygons in a row and apply to select ring. If you select more rows, more rings can be made if the additional rows are going in the same direction as the first.
Edge Works like the normal edge ring tool.
Vertex Select a few vertices in a row and apply to select ring. If you select more rows, more rings can be made if the additional rows are going in the same direction as the first.
<boolean>PolyToolsSelect.GrowLoop () 

Grows a loop based on the current sub-object selection:

Sub-Object Level ShiftPressed = False ShiftPressed = True
Polygon Works if two or more polygons in a row are selected. Select polygons on crossing loop to turn and keep growing loop.
Edge Grow edge loop in steps. The tool can also grow loops on the top and bottom edges of a cylinder. Specifically designed for this purpose.
Vertex Select sets of neighboring vertices and apply to grow loops. The tool can also grow loops on the top and bottom vertices of a cylinder. Specifically designed for this purpose.
<boolean>PolyToolsSelect.ShrinkLoop () 

Shrinks a loop based on the current sub-object selection:

Sub-Object Level Function
Polygon Shrink polygon loop.
Edge Shrink edge loop.
Vertex Shrink vertex loop.
<boolean>PolyToolsSelect.GrowRing () 

Grows the edge ring based on the current sub-object selection:

Sub-Object Level Function
Polygon Grow polygon ring.
Edge Grow edge ring.
Vertex Grow vertex ring.
<boolean>PolyToolsSelect.ShrinkRing () 

Shrinks the edge ring based on the current sub-object selection:

Sub-Object Level Function
Polygon Shrink polygon ring.
Edge Shrink edge ring.
Vertex Shrink vertex ring.
<boolean>PolyToolsSelect.DotLoop <integer>value <boolean>cylinderEnds <boolean>opposite 

Selects sub-object elements in a loop (or ring for edges) with gaps defined by the first argument.

Multiple dotted loops/rings can be performed at once.

In polygon and vertex sub-object level that requires the sets of initial selections to be not surrounded by any other selected elements.

Sub-Object Level ShiftPressed = False AltPressed = False ShiftPressed = True AltPressed = False AltPressed = True
Polygon Select sets of two or more polygons in a row and apply to select polygon loops with gaps. Shift which polygons will act as the first in the loops. No effect.
Edge Select edges and apply to select edge loops with gaps. Select edges and apply to select edge rings with gaps. The tool can also perform a loop on the top and bottom edges of a cylinder.
Vertex Select sets of two or more vertices in a row and apply to select vertex loops with gaps. Shift which vertices will act as the first in the loops. The tool can also perform a loop on the top and bottom edges of a cylinder.
<boolean>PolyToolsSelect.DotRing <integer>value 

Selects sub-object elements in a ring with gaps defined by the argument.

Multiple dotted loops/rings can be performed at once.

In polygon and vertex sub-object level that requires the sets of initial selections to be not surrounded by any other selected elements.

Sub-Object Level ShiftPressed = False AltPressed = False ShiftPressed = True AltPressed = False AltPressed = True
Polygon Select sets of two or more polygons in a row and apply to select polygon loops with gaps. Shift which polygons will act as the first in the loops. No effect
Edge Select edges and apply to select edge loops with gaps. Select edges and apply to select edge rings with gaps. The tool will also be able to perform a loop on the top and bottom edges of a cylinder.
Vertex Select sets of two or more vertices in a row and apply to select vertex loops with gaps. Shift which vertices will act as the first in the loops. The tool will also be able to perform a loop on the top and bottom edges of a cylinder.
<boolean>PolyToolsSelect.StepLoop <boolean>longestDir 

Selects vertices, edges, or faces on sub-object loops between two selected elements.

If the loop is closed, the shortest distance will be picked unless longestDir is passed as true, in which case the longest distance will be selected.

Sub-Object Level AltPressed = False AltPressed = True
Polygon Select two polygons on the polygon loop and apply to select elements in between. If the loop is closed then the longest distance will be selected instead of the shortest like default.
Edge Select two edges on the edge loop and apply to select elements in between. If the loop is closed then the longest distance will be selected instead of the shortest one.
Vertex Select two vertices on the vertex loop and apply to select elements in between. If the loop is closed then the longest distance will be selected instead of the shortest one.
<boolean>PolyToolsSelect.Outline () 

Outlines the current sub-object selection.

Selects the outer border.

Sub-Object Level ShiftPressed = False ShiftPressed = True
Polygon Selects the polygon border of the current polygon selection. Selects the edge border of the current polygon selection.
Edge Selects the edge border of the current edge selection.
Vertex Selects the vertex border of the current vertex selection.
<boolean>PolyToolsSelect.Fill () 

Fills the area between two selected sub-object elements. Note that this method will only work well if there is no extreme angle between the two selected sub-object elements.

Sub-Object Level Shift NotPressed ShiftPressed
Polygon Select two polygons and apply to fill the area between them. The two polygons will become the lower and upper corner of the fill. The outer border of the area to fill needs to be quad polygons. Select two polygons and apply to fill a ring. The two polygons will become the lower and upper corner of the fill. The outer border of the area to fill needs to be quad polygons.
Edge Not supported. Not supported.
Vertex Select two vertices and apply to fill the area between them. The two vertices will become the lower and upper corner of the fill. The outer border of the area to fill needs to be clean loops. Select two vertices and apply to fill a ring. The two vertices will become the lower and upper corner of the fill. The outer border of the area to fill needs to be clean loops.
<boolean>PolyToolsSelect.FillHole () 

Fills an enclosed area. Select one sub-object element within the hole and fill. The selected part must stand free from the surrounding selection, so as an example the selected polygon cannot have any selected polygons right next to it.

Sub-Object Level Function
Polygon Select one polygon within the hole and fill.
Edge Select one edge within the hole and fill.
Vertex Select one vertex within the hole and fill.
<boolean>PolyToolsSelect.Similar <boolean>edgeCount <boolean>edgeLength <boolean>faceCount <boolean>faceArea<boolean>topology <boolean>normal 

Selects sub-object elements which have similar properties as the selected elements. The five arguments define the rules to determine the similarity.

These rules vary depending on the current sub-object level:

Sub-Object Level Argument1 Argument2 Argument3 Argument4 Argument5
Polygon Edge Count Faces with the same number of sides as the selected faces. Face Areas Faces with roughly the same area/size as the selected faces. Topology Faces with the same surrounding edge topology as the selected faces. Normal Dir. Faces that share roughly the same normal direction. not used
Edge Edge Lengths Edges with roughly the same length as the selected edges. Face Areas Edges with roughly the same combined face areas of the surrounding faces as the selected edges Topology Edges with the same surrounding face topology as the selected edges. Normal Dir. Edges that share roughly the same normal direction. not used
Vertex Edge Count Vertices with the same number of edges going from them as the selected vertices. Edge Length Vertices with roughly the same combined edge length of the vertices edges as the selected vertices. Face Counts Vertices with the same number of surrounding faces as the selected vertices. Face Areas Vertices with roughly the same combined face area of the surrounding faces as the selected vertices. Normal Dir. Vertices that share roughly the same normal direction.
Sub-Object Level Function
Polygon Select polygon/polygons and apply to select all polygons which are similar based on the above rules.
Edge Select edge/edges and apply to select all edges which are similar based on the above rules.
Vertex Select vertex/vertices and apply to select all vertices which are similar based on the above rules.

Select

<boolean>PolyToolsSelect.Tops <boolean>withinSel 

Selects the tops of extruded parts in the model.

Sub-Object Level ShiftPressed = False ShiftPressed = True
Polygon Apply to select the tops of extruded polygons. Select the tops of extruded polygons only within the current selection.
Edge Apply to select the edge outline of the tops of extruded polygons. Select the edge outline of the tops of extruded polygons only within the current selection.
Vertex Apply to select the vertices of the tops of extruded polygons. Select the vertices of the tops of extruded polygons only within the current selection.
<boolean>PolyToolsSelect.HardEdges () 

Selects all edges in a model where the faces of the edge do not share the same smoothing-groups.

Note that if the smoothing group value of a face is 0 (no groups set at all), it will shade as hard edge, but this method will not detect these hard edges because they are technically sharing a group of 0.

Sub-Object Level Function
Polygon Not supported.
Edge Selects all edges in a model where the faces of the edge do not share the same smoothing groups.
Vertex Not supported.

Selection - By Random

<boolean>PolyToolsSelect.Random <float>percent <integer>number <integer>type <boolean>withinSel 

Selects random sub-object elements by percentage or absolute count.

The first argument is the percentage in the range of 0.0 to 100.0. It is used only when the third argument is set to 1.

The second argument is the absolute sub-object count to select. It is used only when the third argument is set to 0.

The third argument determines the selection mode: 0 = use absolute count and 1 = use percentage.

The fourth argument determines whether to select within all sub-objects or only the selected ones:

Sub-Object Level ShiftPressed = False ShiftPressed = True
Polygon Select random polygons. Select random polygons only within the current selection.
Edge Select random edges. Select random edges only within the current selection.
Vertex Select random vertices. Select random vertices only within the current selection.

EXAMPLE:

   thePlane = Plane widthsegs:20 lengthsegs:20 --create a plane
   convertTo thePlane Editable_Poly --convert to EPoly
   select thePlane --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Polygon level
   PolyToolsSelect.Random 0.0 20 0 false --select 20 randompolygons
   subObjectLevel = 2 --switch toEdgelevel
   PolyToolsSelect.Random 50.0 0 1 false --select50% of the edges
<boolean>PolyToolsSelect.RandomGrow () 

Grows the selection by selecting random sub-object elements outside the border of the selection area.

Returns true on success, false on failure.

<boolean>PolyToolsSelect.RandomShrink () 

Shrinks the selection by deselecting random sub-object elements on the border of the selection.

Returns true on success, false on failure.

<boolean>PolyToolsSelect.Even <integer>skip <boolean>withinSel 

Selects every Nth sub-object element, starting with the second and skipping the number of sub-objects specified by the first argument.

If the second argument is false, all sub-objects will be considered for selection.

If the second argument is true, only already selected sub-objects will be considered.

Returns true on success, false on failure.

<boolean>PolyToolsSelect.Odd <integer>skip <boolean>withinSel 

Selects every Nth sub-object element, starting with the first and skipping the number of sub-objects specified by the first argument.

If the second argument is false, all sub-objects will be considered for selection.

If the second argument is true, only the selected sub-objects will be considered.

Returns true on success, false on failure.

Selection - By Symmetry

<boolean>PolyToolsSelect.Symmetry <integer>axis 

Selects subobject elements in the mirror axis of a symmetrical model.

The argument defines the axis as follows:

0 - X

1 - Y

2 - Z

The center of the object is determined by the object's pivot point.

Sub-Object Level Function
Polygon Select polygons on one side of the model and apply to select polygons on the symmetrical side in the chosen axis.
Edge Select edges on one side of the model and apply to select edges on the symmetrical side in the chosen axis.
Vertex Select vertices on one side of the model and apply to select vertices on the symmetrical side in the chosen axis.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{38..40, 49, 50, 59, 60, 70, 80} --select some
   --Step2:
   PolyToolsSelect.Symmetry 0 --select symmetrical along X
   --Step3:
   PolyToolsSelect.Symmetry 1 --select symmetrical along Y

Selection - By Numeric

<boolean>PolyToolsSelect.NumericVertex <integer>edges <integer>type <boolean>withinSel 

Selects vertices based on the number of edges specified as the first argument.

The second argument controls the type of comparison as follows:

1 - Equal

2 - Less than

3 - Greater than

The third argument controls whether only vertices within the current vertex selection must be tested (true) or whether all vertices in the object must be used (false).

EXAMPLE:

   --Step 1:
   p= Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode--switch to modify panel
   subObjectLevel = 2 --switch to Edge level
   PolyToolsSelect.NumericVertex 4 1 false -- vertices with 4 edges
   --Step2:
   PolyToolsSelect.NumericVertex 4 2 false --vertices with less than 4 edges

   --Step 2:
   PolyToolsSelect.NumericVertex 3 1 false --vertices with 3 edges
   --Step 4:
   PolyToolsSelect.NumericVertex 2 1 false --vertices with 2 edges

<boolean>PolyToolsSelect.NumericEdge <boolean>withinSel 

Selects edges that have only one adjacent polygon ("open edges").

The first argument controls whether only edges within the current edge selection must be tested (true) or whether all edges in the object must be used (false).

EXAMPLE:

   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   PolyOp.deleteFaces p #{45..48,58} --delete some faces to add open edges
   subObjectLevel = 2 --switch toEdgelevel
   PolyToolsSelect.NumericEdge false --select open edges

<boolean>PolyToolsSelect.NumericFace <integer>sides <integer>type <boolean>withinSel 

Selects faces based on the number of sides specified as the first argument.

The second argument controls the type of comparison as follows:

1 - Equal

2 - Less than

3 - Greater than

The third argument controls whether only faces within the current face selection must be tested (true) or whether all faces in the object must be used (false).

Selection - By Half

<boolean>PolyToolsSelect.Half <integer>axis <boolean>invert <boolean>withinSel 

Selects half of the sub-object elements at the current Sub-Object Level.

The first argument specifies the axis as follows:

1 - X

2 - Y

3 - Z

The second argument controls whether the positive side of the object (true) or the negative side of the object (false) will be selected.

The third argument controls whether to use the whole object (false) or only the current selection (true).

EXAMPLE:

   --Step 1:
   s = sphere radius:12 segs:40 wirecolor:blue
   convertTo s Editable_Poly --convert to EPoly
   select s --select the sphere
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to facelevel
   --Step 2: Select positive (right) side along X using all faces
   PolyToolsSelect.Half 1 true false
   --Step 3: Select negative (front) side along Y using the existing selection
   PolyToolsSelect.Half 2 false true
   --Step 4:Select positive (top) side along Z using the existing selection
   PolyToolsSelect.Half 3 true true

Selection - By Normal

<boolean>PolyToolsSelect.Normal <integer>axis <float>value <boolean>invert 

Selects sub-object elements in the current Sub-Object Level based on normal vector.

The first argument defines the reference world axis as follows:

1 - World X

2 - World Y

3 - World Z

The second argument defines the angle threshold. Sub-objects with normals that define an angle with the reference world axis that is less than the threshold will be selected.

The third argument defines whether to select the sub-objects whose normals are below the threshold (false) or the ones whose normals are above the threshold (true).

EXAMPLE:

   --Step 1:
   s = geosphere radius:12 segs:10 wirecolor:blue pos:[0,0,-5]
   convertTo s Editable_Poly --convert to EPoly
   select s--select the geosphere
   max modify mode --switch to modify panel
   subObjectLevel = 1 --switch to Vertex level
   PolyToolsSelect.Normal 3 15 false --select vertices within 15 degrees to +Z
   --Step2:
   subObjectLevel = 2 --switch to Edge level
   PolyToolsSelect.Normal 3 15 false --selectedgeswithin 15 degrees to +Z
   --Step3:
   subObjectLevel = 4 --switch to Face level
   PolyToolsSelect.Normal 3 15 false --select faces within 15 degrees to +Z
   --Step4:
   PolyToolsSelect.Normal 3 15 true --selectfaces outside of15 degrees to +Z

Selection - By Perspective

<boolean>PolyToolsSelect.Perspective <float>value <boolean>outline 

Selects sub-object elements at the current Sub-Object Level whose normals are within the given threshold to the current view's Z axis.

The first argument defines the angle threshold.

The second argument controls whether all sub-objects within the Threshold must be selected (false) or only the ones adjacent to the outline of the selection (true).

EXAMPLE:

   --Step 1:
   s = geosphere radius:12 segs:10 wirecolor:blue
   convertTo s Editable_Poly --convert to EPoly
   select s --select the geosphere
   max modify mode --switch to modify panel
   subObjectLevel = 1 --switch to Vertex level
   PolyToolsSelect.Perspective 30 false
   --Step 2:
   PolyToolsSelect.Perspective 30 true

   --Step 3:
   subObjectLevel = 2 --switch to Edge level
   PolyToolsSelect.Perspective 30 false
   --Step 4:
   PolyToolsSelect.Perspective 30 true

   --Step 5:
   subObjectLevel = 4 --switch to Face level
   PolyToolsSelect.Perspective 30 false
   --Step 6:
   PolyToolsSelect.Perspective 30 true

Selection - Grow From Perspective View

<boolean>PolyToolsSelect.PerspectiveGrow <float>value 

Grows the sub-selection in the current view space by assuming the closest sub-object element to the viewer's position as 0 and growing the selection away from the viewer in world units.

EXAMPLE:

   --Step 1:
   s = geosphere radius:12 segs:10 wirecolor:blue
   convertTo s Editable_Poly --convert to EPoly
   select s --select the geosphere
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyToolsSelect.PerspectiveGrow 2

   --Step 2:
   PolyToolsSelect.PerspectiveGrow 12

Because the Radius of the Geosphere is 12 units, selecting with a value of 12 selects approximately half of the sphere in the current view (Camera001 - left image).

Selection - By Pivot Distance

<boolean>PolyToolsSelect.Distance <float>value 

Selects sub-objects in the current level based on a percentage of the largest distance to the pivot point of the object.

The percentage is provided by the first argument.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   t = teapot radius:10 segs:10 wirecolor:blue
   convertTo t Editable_Poly --convert to EPoly
   select t --select the teapot
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyToolsSelect.Distance 70.0 --and select using 70%
   --Step2:
   PolyToolsSelect.Distance 60.0 -- select using60%

   --Step 3:
   s.pivot = [0,0,5] --move pivot up by half the radius
   resetxform s --reset XForm
   collapseStack s --and collapse the stack
   subObjectLevel = 4 --switch toFacelevel
   PolyToolsSelect.Distance 70.0 --and select again using 70%
   --Step 4:
   PolyToolsSelect.Distance 60.0

Selection - By Surface

<boolean>PolyToolsSelect.ConvexConcave <float>value <integer>isConcave 

Selects sub-objects in the current Sub-Object Level based on a convexity/concavity threshold.

The first argument is the threshold value.

The second argument is the index of the Concave/Convex flyout in the UI as follows:

1 - Concave

2 - Convex

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   t = teapot radius:10 segs:10 wirecolor:blue
   convertTo t Editable_Poly --convert to EPoly
   select t --select theteapot
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Facelevel
   PolyToolsSelect.ConvexConcave 0.05 1 --Select Concave Faces
   --Step 2:
   PolyToolsSelect.ConvexConcave 0.001 2 --Select Convex Faces

Selection - Patterns

<boolean>PolyToolsSelect.Pattern1 <integer>times 

Applies Selection Pattern 1 for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.Pattern1 1
   --Step 3:
   PolyToolsSelect.Pattern1 1
   --Step 4:
   PolyToolsSelect.Pattern1 1
   --Step 5:
   PolyToolsSelect.Pattern1 1
   --Step 6:
   PolyToolsSelect.Pattern1 1

Note that you can achieve the look seen on the above right screenshot by calling

   PolyToolsSelect.Pattern1 5

right after evaluating Step 1 to perform the iterations internally.

<boolean>PolyToolsSelect.Pattern2 <integer>times 

Applies Selection Pattern 2 for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.Pattern2 1
   --Step 3:
   PolyToolsSelect.Pattern2 1
   --Step 4:
   PolyToolsSelect.Pattern2 1
   --Step 5:
   PolyToolsSelect.Pattern2 1
   --Step 6:
   PolyToolsSelect.Pattern2 1

<boolean>PolyToolsSelect.Pattern3 <integer>times 

Applies Selection Pattern 3 the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch toFacelevel
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.Pattern3 1
   --Step 3:
   PolyToolsSelect.Pattern3 1
   --Step 4:
   PolyToolsSelect.Pattern3 1

<boolean>PolyToolsSelect.Pattern4 <integer>times 

Applies Selection Pattern 4 for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch toFacelevel
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.Pattern4 1
   --Step 3:
   PolyToolsSelect.Pattern4 1
   --Step 4:
   PolyToolsSelect.Pattern4 1
   --Step 5:
   PolyToolsSelect.Pattern4 1
   --Step 6:
   PolyToolsSelect.Pattern4 1

<boolean>PolyToolsSelect.Pattern5 <integer>times 

Applies Selection Pattern 5 for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.Pattern5 1
   --Step 3:
   PolyToolsSelect.Pattern5 1
   --Step 4:
   PolyToolsSelect.Pattern5 1
   --Step 5:
   PolyToolsSelect.Pattern5 1
   --Step 6:
   PolyToolsSelect.Pattern5 1
   --Step 7:
   PolyToolsSelect.Pattern5 1
   --Step 8:
   PolyToolsSelect.Pattern5 1

<boolean>PolyToolsSelect.Pattern6 <integer>times 

Applies Selection Pattern 6 for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch toFacelevel
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.Pattern6 1
   --Step 3:
   PolyToolsSelect.Pattern6 1
   --Step 4:
   PolyToolsSelect.Pattern6 1
   --Step 5:
   PolyToolsSelect.Pattern6 1
   --Step 6:
   PolyToolsSelect.Pattern6 1
   --Step 7:
   PolyToolsSelect.Pattern6 1
   --Step 8:
   PolyToolsSelect.Pattern6 1

<boolean>PolyToolsSelect.Pattern7 <integer>times 

Applies Selection Pattern 7 for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.Pattern7 1
   --Step 3:
   PolyToolsSelect.Pattern7 1
   --Step 4:
   PolyToolsSelect.Pattern7 1
   --Step 5:
   PolyToolsSelect.Pattern7 1
   --Step 6:
   PolyToolsSelect.Pattern7 1
   --Step 7:
   PolyToolsSelect.Pattern7 1
   --Step 8:
   PolyToolsSelect.Pattern7 1

<boolean>PolyToolsSelect.Pattern8 <integer>times 

Applies Selection Pattern 8 for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45}--select a central face
   --Step 2:
   PolyToolsSelect.Pattern8 1
   --Step 3:
   PolyToolsSelect.Pattern8 1
   --Step 4:
   PolyToolsSelect.Pattern8 1
   --Step 5:
   PolyToolsSelect.Pattern8 1
   --Step 6:
   PolyToolsSelect.Pattern8 1
   --Step 7:
   PolyToolsSelect.Pattern8 1
   --Step 8:
   PolyToolsSelect.Pattern8 1

<boolean>PolyToolsSelect.PatternDots <integer>times 

Applies Selection Pattern Dots for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.PatternDots 1
   --Step 3:
   PolyToolsSelect.PatternDots 1
   --Step 4:
   PolyToolsSelect.PatternDots 1
   --Step 5:
   PolyToolsSelect.PatternDots 1
   --Step 6:
   PolyToolsSelect.PatternDots 1

<boolean>PolyToolsSelect.PatternChecker <integer>times 

Applies Selection Pattern Checker for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.PatternChecker 1
   --Step 3:
   PolyToolsSelect.PatternChecker 1
   --Step 4:
   PolyToolsSelect.PatternChecker 1
   --Step 5:
   PolyToolsSelect.PatternChecker 1
   --Step 6:
   PolyToolsSelect.PatternChecker 1

<boolean>PolyToolsSelect.PatternGrowLine <integer>times 

Applies Selection Pattern Grow Line for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.PatternGrowLine 1
   --Step 3:
   PolyToolsSelect.PatternGrowLine 1
   --Step 4:
   PolyToolsSelect.PatternGrowLine 1
   --Step 5:
   PolyToolsSelect.PatternGrowLine 1
   --Step 6:
   PolyToolsSelect.PatternGrowLine 1

<boolean>PolyToolsSelect.PatternOneRing <integer>times 

Applies Selection Pattern One Ring for the specified number of times.

Returns true on success, false on failure. For example, if not in a valid sub-object mode.

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:10 lengthsegs:10 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Face level
   PolyOp.SetFaceSelection p #{45} --select a central face
   --Step 2:
   PolyToolsSelect.PatternOneRing 1
   --Step 3:
   PolyToolsSelect.PatternOneRing 1
   --Step 4:
   PolyToolsSelect.PatternOneRing 1
   --Step 5:
   PolyToolsSelect.PatternOneRing 1
   --Step 6:
   PolyToolsSelect.PatternOneRing 1

Selection - By Bitmap

<boolean>PolyToolsSelect.BitmapToSel <string>file <integer>mapchannel <point3>color 

Selects sub-objects in the current Sub-Object Level based on a color from a bitmap file using a given mapping channel for the bitmap application.

The first argument is the file name of the bitmap.

The second argument is the mapping channel to use for the mapping of the bitmap onto the geometry.

The third argument is the color from the bitmap to use for selecting.

Internally, the color will be compared with a built-in threshold of +/- 8.0 (256/8= 32, so the threshold is 1/32 or about 3%).

EXAMPLE:

   --Step 1:
   p = Plane widthsegs:50 lengthsegs:50 wirecolor:blue --create a plane
   convertTo p Editable_Poly --convert to EPoly
   select p --select the plane
   max modify mode --switch to modify panel
   subObjectLevel = 4 --switch to Edge level
   --Select faces where the bitmap color is pure white.
   PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 white
   --Step 2: Select faces where color is black.
   PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 black

   --Step 3:
   PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.97)
   --Step 4:
   PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.96)

   --Step 3:
   PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.04)
   --Step 4:
   PolyToolsSelect.BitmapToSel "ELMLEAF.TGA" 1 (white*0.03)