Package binaries :: Module qconvex :: Class QConvex
[hide private]
[frames] | no frames]

Class QConvex

source code

Compute convex hull based on a list of 3-D coordinates. Return a
DejaVu IndexedPolygon geometry.

Usage: self.computeConvex(coords, tpath)
  coords: a list of [x,y,z] values
  tpath = optional path for temporary files



Instance Methods [hide private]
  __init__(self, name='qconvex')
  writeQConvex(self, filename, coords)
QConvex: http://www.qhull.org/html/qconvex.htm Input a filename and [x,y,z]-coordinates, save this in QConvex format.
  readQConvex(self, filename)
QConvex: http://www.qhull.org/html/qconvex.htm Read a QConvex output file, output a DejaVu IndexedPolygon.
  setTmpPath(self, path)
set the path for the two temporary files.
  getGeom(self)
returns the DejaVu IndexedPolygon geometry
  computeConvex(self, coords, tpath=None)

Method Details [hide private]

__init__(self, name='qconvex')
(Constructor)

source code 
None

writeQConvex(self, filename, coords)

source code 
QConvex: http://www.qhull.org/html/qconvex.htm Input a filename and [x,y,z]-coordinates, save this in QConvex format.

readQConvex(self, filename)

source code 
QConvex: http://www.qhull.org/html/qconvex.htm

Read a QConvex output file, output a DejaVu IndexedPolygon.

 Data Format:
    [...]print vertices and facets of the convex hull in OFF format. The first
line is the dimension. The second line is the number of vertices, facets, and
ridges. The vertex coordinates are next, followed by the facets. Each facet
starts with the number of vertices. The cube example has four vertices per
facet.

setTmpPath(self, path)

source code 
set the path for the two temporary files. Note: if the specified path does not exist, we try to write into the startup directory

getGeom(self)

source code 
returns the DejaVu IndexedPolygon geometry

computeConvex(self, coords, tpath=None)

source code 
None