- 
                Notifications
    
You must be signed in to change notification settings  - Fork 63
 
triangulation.scad
Functions to triangulate polyhedron faces. To use, add the following lines to the beginning of your file:
use <BOSL/triangulation.scad>
Description:
Given an array of vertices (points), and a list of indexes into the
vertex array (face), returns the normal vector of the face.
| Argument | What it does | 
|---|---|
points | 
Array of vertices for the polyhedron. | 
face | 
The face, given as a list of indices into the vertex array points. | 
Description: Returns the index of a convex point on the given face.
| Argument | What it does | 
|---|---|
points | 
Array of vertices for the polyhedron. | 
face | 
The face, given as a list of indices into the vertex array points. | 
facenorm | 
The normal vector of the face. | 
Description: Determine if a point is in a clipable convex ear.
| Argument | What it does | 
|---|---|
points | 
Array of vertices for the polyhedron. | 
face | 
The face, given as a list of indices into the vertex array points. | 
Description: Removes the last item in an array if it is the same as the first item.
| Argument | What it does | 
|---|---|
v | 
The array to normalize. | 
Description: Given a face in a polyhedron, and a vertex in that face, returns true if that vertex is the only non-colinear vertex in the face.
| Argument | What it does | 
|---|---|
points | 
Array of vertices for the polyhedron. | 
facelist | 
The face, given as a list of indices into the vertex array points. | 
vertex | 
The index into facelist, of the vertex to test. | 
Description: Given a face in a polyhedron, subdivides the face into triangular faces. Returns an array of faces, where each face is a list of three vertex indices.
| Argument | What it does | 
|---|---|
points | 
Array of vertices for the polyhedron. | 
face | 
The face, given as a list of indices into the vertex array points. | 
Description: Subdivides all faces for the given polyhedron that have more than three vertices. Returns an array of faces where each face is a list of three vertex array indices.
| Argument | What it does | 
|---|---|
points | 
Array of vertices for the polyhedron. | 
faces | 
Array of faces for the polyhedron. Each face is a list of 3 or more indices into the points array. |