RhinoSupport

public static class RhinoSupport
Provides static and extension methods to add support for Rhino geometry in HalfEdgeMesh. Derived from Plankton, (c) 2013 Daniel Piker and Will Pearson, licensed LGPL v3 or later.

Methods

Adds a new vertex to the end of the Vertex list.
public static int Add(
vertexList,
The HalfEdgeVertexList to modify.
vertex
Location of new vertex.
)
The index of the newly added vertex.
Adds a new vertex to the end of the Vertex list.
public static int Add(
vertexList,
The HalfEdgeVertexList to modify.
vertex
Location of new vertex.
)
The index of the newly added vertex.

GetPositions

#Example
Gets positions of vertices
public static IEnumerable<Point3d> GetPositions(
source
A half-edge mesh.
)
A list of Point3d

HelloWorld

#
public static string HelloWorld()

MoveVertex

#Example

Moves a vertex by a vector.

public static bool MoveVertex(
vertexList,
The HalfEdgeVertexList to modify.
index,
Index of vertex to move.
vector
Vector to move by.
)
true on success, false on failure.

ReplaceVertices

#Example
Replaces the vertices of a HalfEdgeMesh with a new list of points
public static HalfEdgeMesh ReplaceVertices(
source,
A half-edge mesh.
points
A list of points.
)
A list of closed polylines representing the boundary edges of each face.

SetVertex

#Example

Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.

public static bool SetVertex(
vertexList,
The HalfEdgeVertexList to modify.
index,
Index of vertex to set.
vertex
Vertex location.
)
true on success, false on failure.

SetVertex

#Example

Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.

public static bool SetVertex(
vertexList,
The HalfEdgeVertexList to modify.
index,
Index of vertex to set.
vertex
Vertex location.
)
true on success, false on failure.

ToHalfEdgeMesh

#Example
Creates a half-edge mesh from a Rhino mesh. Uses the topology of the Rhino mesh directly.
public static HalfEdgeMesh ToHalfEdgeMesh(
this Mesh
source
A Rhino mesh to convert from.
)
A HalfEdgeMesh which represents the topology and geometry of the source mesh.

ToPoint3d

#Example
Creates a Rhino Point3d from a half-edge mesh vertex.
public static Point3d ToPoint3d(
vertex
A half-edge mesh vertex
)
A Point3d with the same coordinates as the vertex.

ToPolylines

#Example
Converts each face to a closed polyline.
public static Polyline[] ToPolylines(
source
A half-edge mesh.
)
A list of closed polylines representing the boundary edges of each face.

ToRhinoMesh

#Example
Creates a Rhino mesh from a half-edge mesh. Uses the face-vertex information available in the halfedge data structure.
public static Mesh ToRhinoMesh(
source
A half-edge mesh to convert from.
)
Remarks: Any faces with five sides or more will be triangulated.
A Mesh which represents the source mesh (as best it can).