skeinforge_tools.skeinforge_utilities.triangle_mesh ($Date: 2008/02/05 $)
index
/home/enrique/Desktop/backup/babbleold/script/reprap/pyRepRap/skeinforge_tools/skeinforge_utilities/triangle_mesh.py

Triangle Mesh holds the faces and edges of a triangular mesh.
 
It can read from and write to a GNU Triangulated Surface (.gts) file.
 
The following examples slice the GNU Triangulated Surface file Hollow Square.gts.  The examples are run in a terminal in the folder which
contains Hollow Square.gts and triangle_mesh.py.
 
 
>python
Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import slice
>>> slice.main()
File Hollow Square.gts is being sliced.
The sliced file is saved as Hollow Square_slice.gcode
It took 3 seconds to slice the file.
 
 
>>> slice.writeOutput()
File Hollow Square.gcode is being sliced.
The sliced file is saved as Hollow Square_slice.gcode
It took 3 seconds to slice the file.
 
 
>>> slice.getSliceGcode("
54 162 108 Number of Vertices,Number of Edges,Number of Faces
-5.800000000000001 5.341893939393939 4.017841892579603 Vertex Coordinates XYZ
5.800000000000001 5.341893939393939 4.017841892579603
..
many lines of GNU Triangulated Surface vertices, edges and faces
..
")

 
Modules
       
__init__
cStringIO
skeinforge_tools.skeinforge_utilities.gcodec

 
Classes
       
Edge
EdgePair
Face
TriangleMesh

 
class Edge
    An edge of a triangle mesh.
 
  Methods defined here:
__init__(self)
Set the face indexes to None.
__repr__(self)
Get the string representation of this Edge.
addFaceIndex(self, faceIndex)
Add first None face index to input face index.
getFromVertexIndexes(self, edgeIndex, vertexIndexes)
Initialize from two vertex indices.
getGNUTriangulatedSurfaceLine(self)
Get the GNU Triangulated Surface (.gts) line of text.

 
class EdgePair
     Methods defined here:
__init__(self)
Pair of edges on a face.
__repr__(self)
Get the string representation of this EdgePair.
getFromIndexFirstSecond(self, edgeIndexes, edges)
Initialize from edge indices.

 
class Face
    A face of a triangle mesh.
 
  Methods defined here:
__init__(self)
Set the edge indexes to None.
__repr__(self)
Get the string representation of this Face.
getFromEdgeIndexes(self, edgeIndexes, edges, faceIndex)
Initialize from edge indices.
getGNUTriangulatedSurfaceLine(self)
Get the GNU Triangulated Surface (.gts) line of text.
setEdgeIndexesToVertexIndexes(self, edges, edgeTable)
Set the edge indexes to the vertex indexes.

 
class TriangleMesh
    A triangle mesh.
 
  Methods defined here:
__init__(self)
Add empty lists.
__repr__(self)
Get the string representation of this TriangleMesh.
getFromGNUTriangulatedSurfaceText(self, gnuTriangulatedSurfaceText)
Initialize from a GNU Triangulated Surface Text.
getGNUTriangulatedSurfaceText(self)
Get this mesh in the GNU Triangulated Surface (.gts) format.
setEdgesForAllFaces(self)
Set the face edges of all the faces.

 
Functions
       
getCommonVertexIndex(edgeFirst, edgeSecond)
Get the vertex index that both edges have in common.
getTriangleMesh(filename='')
Slice a GNU Triangulated Surface file.  If no filename is specified, slice the first GNU Triangulated Surface file in this folder.

 
Data
        __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
__credits__ = 'Art of Illusion <http://www.artofillusion.org/>'
__date__ = '$Date: 2008/02/05 $'
__license__ = 'GPL 3.0'
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

 
Author
        Enrique Perez (perez_enrique@yahoo.com)

 
Credits
        Art of Illusion <http://www.artofillusion.org/>