The following methods provide advanced access to the Mesh vertices and vertex normals.

**For more
vertex-related methods, see also**

Vertex Data Methods (meshop struct)

**For more
mesh-related methods, see**

Editable_Mesh : GeometryClass and TriMesh : Value

meshop.**breakVerts**
<Mesh mesh>
<vertlist>

For
each vertex in **<vertlist>**, N-1 new vertices
are created at the same location, where N is the number of faces
using that vertex. Each of these faces will use one of these
vertices.

meshop.**chamferVerts**
<Mesh mesh>
<vertlist> <float amount>

Chamfers the specified vertices by the specified amount.

*
For example:*

obj = plane()

convertToMesh obj

max modify mode

select obj

subObjectLevel = 1

meshop.chamferVerts obj #{13} 3.5

meshop.**cloneVerts**
<Mesh mesh>
<vertlist>

Clones the specified vertices.

meshop.**deleteIsoVerts**
<Mesh
mesh>

Deletes all vertices not used by a face.

meshop.**deleteVerts**
<Mesh mesh>
<vertlist>

Deletes the specified vertices.

meshop.**detachVerts**
<Mesh mesh>
<vertlist> **delete**:<boolean=true>
**asMesh**:<boolean=false>

Detaches the faces used by
the specified vertices. If **<delete>**
is **true**, the faces are
deleted after being detached. If **<delete>**
is **false**, the faces are not
deleted. If **<asMesh>**
is
true, the faces are detached and returned as a Mesh value.
If **<asMesh>**
is **false**, the faces are
detached as an element in the mesh and a value of OK is
returned.

meshop.**getHiddenVerts**
<Mesh
mesh>

Returns a bitarray of
size=(#vertices in **mesh**) with bits set for
all vertices that are hidden.

meshop.**setHiddenVerts**
<Mesh mesh>
<vertlist>

Sets the specified vertices as hidden, and non-specified vertices as visible.

*
For example:*

obj = plane() --create a plane

convertToMesh obj --convert to Editable_Mesh

--Hide half the vertices

meshop.setHiddenVerts obj #{1..(obj.numverts/2)}

update obj --update the mesh

max modify mode --change to modify mode

select obj --select the plane

subObjectLevel = 1 --switch to vertex level to see the result

meshop.**getIsoVerts**
<Mesh
mesh>

Returns a bitarray of
size=(#vertices in **mesh**) with bits set for
all vertices that are not used by a face.

*
For example:*

obj = plane() --create a plane

$Plane:Plane01 @ [0.000000,0.000000,0.000000]

convertToMesh obj --collapse to Editable_Mesh

$Editable_Mesh:Plane01 @ [0.000000,0.000000,0.000000]

meshop.getIsoVerts obj --Get isolated vertices - none!

#{}

--Delete the 8 faces in the middle of the plane,

--leaving the middle isolated vertex undeleted

meshop.deleteFaces obj #{11..14,19..22} delIsoVerts:false

OK

update obj --update the mesh

OK

meshop.getIsoVerts obj --check the isolated vertices - #13!

#{13}

meshop.**getNumVerts**
<Mesh
mesh>

Returns the number of vertices in the mesh.

meshop.**setNumVerts**
<Mesh mesh>
<int>

Sets the number of vertices in the mesh. Any new vertices are created at [0,0,0] in the mesh's local coordinate system.

meshop.**getVert**
<Mesh mesh>
<int vertIndex> **node**:<node=unsupplied>

Returns the position of
the specified vertex. If **<mesh>**
is a
node, or if **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
specified, the position returned is in the current coordinate
system context. If **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
not specified, the return value is in the mesh's local
coordinate system.

meshop.**setVert**
<Mesh mesh>
<vertlist> <point3 pos> **node**:<node=unsupplied>

Moves
the specified vertices to the specified position. If
**<mesh>**
is a
node, or if **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
specified, the position is in the current coordinate system
context. If **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
not specified, the position is in the mesh's local
coordinate system.

meshop.**getVertexAngles**
<Mesh mesh>
<vertlist>

This
method calculates, for each vertex, the sum of the angles of this
vertex's corner in each
face it's on. So for
instance, a point lying in the middle of a grid would always have
vertex angle 2*Pi (6.28319
radians, equal to 360
degrees), whereas a corner of a
box would only have 3.0/2*Pi (4.71239
radians, equal to 270
degrees). Returns an array of
size=(#vertices in **mesh**). The array element
for any vertices not specified in <**vertlist**> will contain
the value 0.

meshop.**getVertsByColor**
<Mesh mesh>
<color color> <float red_thresh> <float
green_thresh> <float blue_thresh> **channel**:<int=0>

Returns the vertices whose
vertex color is within the color range as a **<bitarray>**. The range values
should be in the range of 0 to 255.

meshop.**getVertsByColor**
<Mesh mesh>
<point3 uvw> <Float u_thresh> <Float v_thresh>
<Float w_thresh> **channel**:<int=0>

Returns the vertices whose
vertex UVW is within the UVW range as a **<bitarray>**. The range values
should be in the range of 0 to 1.

meshop.**makeVertsPlanar**
<Mesh mesh>
<vertlist>

Moves the specified vertices so that they are planar.

meshop.**minVertexDistanceFrom**
<Mesh mesh>
<int vertIndex> <vertlist>

Returns the minimal
distance from <vertIndex> to the vertices specified in
**<vertlist>**.

meshop.**minVertexDistancesFrom**
<Mesh mesh>
<vertlist> <int iterations>

This
function computes distances from selected vertices (as indicated
by **<vertlist>**) to non-selected
ones along edge paths. Returns an array of size=(#vertices
in **mesh**). Each element in
this array is set to -1 if there is no selection. Otherwise,
selected vertices have an array element value of 0; non-selected
vertices that are **<iterations>**
or
fewer edges away from a selected vertex are assigned the shortest
edge-path distance to a selected vertex; and non-selected vertices
that are more than **<iterations>**
edges
away are set to -1. If **<iterations>**
is 0,
the distances are computed from each vertex to the nearest selected
vertex, regardless of topology. This is a VERY EXPENSIVE ALGORITHM,
which takes almost 4 times as long for twice as many vertices.
If **<iterations>**
is
non-zero, it represents the number of edges one should "travel" in
trying to find the nearest selected vertex—this means that it only
takes twice as long for twice as many verts. (This is like the Edge
Distance parameter in EMesh's Soft Selection
dialog.)

meshop.**moveVert**
<Mesh mesh>
<vertlist> <point3 offset> **node**:<node=unsupplied>

Moves
the specified vertices by **<offset>**. If
**<mesh>**
is a
node, or if **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
specified, the offset is in the current coordinate system context.
If **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
not specified, the offset is in the mesh's local
coordinate system.

meshop.**moveVertsToPlane**
<Mesh mesh>
<vertlist> <point3 normal> <float offset>
**node**:<node=unsupplied>

Moves
the specified vertices into the specified plane. The target plane
is defined as all points which, when DotProd'd with N,
return **offset**. All vertices are
moved along the normal vector N. If **<mesh>**
is a
node, or if **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
specified, the normal is in the current coordinate system context.
If **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
not specified, the normal is in the mesh's local
coordinate system.

*
For example:*

obj = sphere() --create a sphere

convertToMesh obj --convert to Editable_mesh

normal = getNormal obj 10 --get the normal of vertex 10

--move all vertices of the mesh to the plane defined by the normal

--vector with an offset of 0.0 (don't offset):

meshop.moveVertsToPlane obj #{1..obj.numverts} normal 0.0

update obj --update the mesh

meshop.**setVertColor**
<Mesh mesh>
<int mapChannel> <vertlist> <Color
color>

Sets
the vertex color for the specified vertices in the specified
**<mapChannel>**.

meshop.**weldVertsByThreshold**
<Mesh mesh>
<vertlist> <float threshold>

Welds the specified vertices that are within the threshold distance.

meshop.**weldVerts**

Renamed to
meshOp.**weldVertSet**

meshop.**weldVertSet**
<Mesh mesh>
<vertlist> **weldpoint**:<point3=unsupplied>
**node**:<node=unsupplied>

Welds
the specified vertices. If **<weldpoint>**
is
specified, the resulting vertex is positioned at that point. The
result is put at the average location of the selected vertices.
If **<mesh>**
is a
node, or if **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
specified, the position is in the current coordinate system
context. If **<mesh>**
is an
Editable Mesh or a Mesh value and **<node>**
is
not specified, the position is in the mesh's local
coordinate system. If **<weldpoint>**
is
not specified, the resulting vertex is positioned at the average
location of the specified vertices.

**See
also:**

Vertex Data Methods (meshop struct)

**For more
mesh-related methods, see**