# MeshNgon class

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public class MeshNgon : IEquatable<MeshNgon>, IComparable<MeshNgon>, IComparable
```

Represents a mesh ngon.

When retrieved from the Ngon property of a mesh, this contains faces that have edge valence strictly higher than 4.

When retrieving Ngons from [Mesh.GetNgonAndFacesEnumerable()](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.mesh/getngonandfacesenumerable.md), this might contain also triangles and quads.

## Properties

- [BoundaryVertexCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/boundaryvertexcount.md): Get the number of vertices in this ngon. [MeshNgon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon.md) about length information.
- [Empty](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/empty.md): (static) Gets an empty MeshNgon.
- [FaceCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/facecount.md): Get the number of faces in this ngon.

## Indexers

- [this[]](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/item.md): Get a mesh vertex index from the ngon's vertex index list.

## Methods

- [BoundaryVertexIndexList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/boundaryvertexindexlist.md): Get the outer boundary mesh vertex list of the ngon. Vertices are sorted counterclockwise with respect to the direction of the face, although the degree by which vertex normals will respect this might vary.
- [CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/compareto.md): Compares this [MeshNgon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon.md) with otherNgon and returns a value of 1, 0, or -1. Priority is for vertex count, then face count, then vertex index list values, then face index list values.
- [Create](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/create.md): (static) Constructs an ngon from lists of mesh vertex and face indexes.
- [Equals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/equals.md): (2 overloads) Determines if this ngon and otherNgon are identical.
- [FaceIndexList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/faceindexlist.md): Get the ngon's mesh face index list.
- [GetHashCode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/gethashcode.md): Returns a runtime-stable hash code for the current mesh ngon. You are not allowed to rely on persistence of this hash code in serialization, but for each instance of the application, this hash code will be the same for ngons with identical vertex and face lists.
- [Set](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/set.md): Set the ngon vertex and face index lists.
- [IComparable.CompareTo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/system-icomparable-compareto.md)
- [ToString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/tostring.md): Returns a string representation for this [MeshNgon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon.md). This is to provide a meaningful visualization of this structure and is subject to change in newer releases.

## Operators

- [operator ==](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/op-equality.md): (static) Determines whether two [MeshNgon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon.md) structures have equal values.
- [operator !=](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon/op-inequality.md): (static) Determines whether two [MeshNgon](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.meshngon.md) structures have different values.
