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

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

GetPositions

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

HelloWorld

#
public static string HelloWorld()

MoveVertex

#Example
public static bool MoveVertex(this HalfEdgeVertexList vertexList, int index, Vector3d vector)

Moves a vertex by a vector.

vertexList (HalfEdgeVertexList)The HalfEdgeVertexList to modify.
index (int)Index of vertex to move.
vector (Vector3d)Vector to move by.
true on success, false on failure.

ReplaceVertices

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

SetVertex

#Example
public static bool SetVertex(this HalfEdgeVertexList vertexList, int index, Point3d vertex)

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.

vertexList (HalfEdgeVertexList)The HalfEdgeVertexList to modify.
index (int)Index of vertex to set.
vertex (Point3d)Vertex location.
true on success, false on failure.

SetVertex

#Example
public static bool SetVertex(this HalfEdgeVertexList vertexList, int index, Point3f vertex)

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.

vertexList (HalfEdgeVertexList)The HalfEdgeVertexList to modify.
index (int)Index of vertex to set.
vertex (Point3f)Vertex location.
true on success, false on failure.

ToHalfEdgeMesh

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

ToPoint3d

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

ToPolylines

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

ToRhinoMesh

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