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.
Parameters:
| vertexList (HalfEdgeVertexList) | The HalfEdgeVertexList to modify. |
| vertex (Point3d) | Location of new vertex. |
Returns: The index of the newly added vertex.
Adds a new vertex to the end of the Vertex list.
Parameters:
| vertexList (HalfEdgeVertexList) | The HalfEdgeVertexList to modify. |
| vertex (Point3f) | Location of new vertex. |
Returns: The index of the newly added vertex.
Gets positions of vertices
Parameters:
| source (HalfEdgeMesh) | A half-edge mesh. |
Returns: A list of Point3d
Moves a vertex by a vector.
Parameters:
| vertexList (HalfEdgeVertexList) | The HalfEdgeVertexList to modify. |
| index (int) | Index of vertex to move. |
| vector (Vector3d) | Vector to move by. |
Returns:
true on success, false on failure.Replaces the vertices of a HalfEdgeMesh with a new list of points
Parameters:
| source (HalfEdgeMesh) | A half-edge mesh. |
| points (List<Point3d>) | A list of points. |
Returns: A list of closed polylines representing the boundary edges of each face.
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.
Parameters:
| vertexList (HalfEdgeVertexList) | The HalfEdgeVertexList to modify. |
| index (int) | Index of vertex to set. |
| vertex (Point3d) | Vertex location. |
Returns:
true on success, false on failure.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.
Parameters:
| vertexList (HalfEdgeVertexList) | The HalfEdgeVertexList to modify. |
| index (int) | Index of vertex to set. |
| vertex (Point3f) | Vertex location. |
Returns:
true on success, false on failure.Creates a half-edge mesh from a Rhino mesh. Uses the topology of the Rhino mesh directly.
Parameters:
| source (Mesh) | A Rhino mesh to convert from. |
Returns: A HalfEdgeMesh which represents the topology and geometry of the source mesh.
Creates a Rhino Point3d from a half-edge mesh vertex.
Parameters:
| vertex (HalfEdgeVertex) | A half-edge mesh vertex |
Returns: A Point3d with the same coordinates as the vertex.
Converts each face to a closed polyline.
Parameters:
| source (HalfEdgeMesh) | A half-edge mesh. |
Returns: A list of closed polylines representing the boundary edges of each face.
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.
Parameters:
| source (HalfEdgeMesh) | A half-edge mesh to convert from. |
Returns: A Mesh which represents the source mesh (as best it can).