Package schrodinger :: Package application :: Package matsci :: Module shapes :: Class Face
[hide private]
[frames] | no frames]

Class Face

object --+
         |
        Face

Class to manage faces.

Instance Methods [hide private]
 
__init__(self, index, indices, points, num_unique)
Create a face instance.
list
getEdges(self)
Return a list of Edge.
 
setNormal(self)
Set the normal to this face.
 
setArea(self)
Set the area of this face.
list
getReferenceEdges(self, edges, num_unique)
Return a list containing the num_unique number of unique edges.
numpy.array or None
intersectSegmentAndPlane(self, line_start, line_end, inf_nan_thresh=1e-12, distance_thresh=1e-10)
Return the intersection point of the specified line segment and the plane in which this face resides or return None if there is no intersection.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, index, indices, points, num_unique)
(Constructor)

 

Create a face instance.

Parameters:
  • index (int) - the index of this face
  • indices (list) - the indices of points making up this face
  • points (list of numpy.array) - the points making up this face
  • num_unique (int) - the number of symmetry unique edges per face
Overrides: object.__init__

getEdges(self)

 

Return a list of Edge.

Returns: list
contains all Edge for this face

getReferenceEdges(self, edges, num_unique)

 

Return a list containing the num_unique number of unique edges. These will be the reference edges used to orient the reference face of the polyhedron.

Parameters:
  • edges (list) - all Edge objects for this face
  • num_unique (int) - the number of symmetry unique edges per face
Returns: list
unique Edge objects to serve as references

intersectSegmentAndPlane(self, line_start, line_end, inf_nan_thresh=1e-12, distance_thresh=1e-10)

 

Return the intersection point of the specified line segment and the plane in which this face resides or return None if there is no intersection.

Parameters:
  • line_start (numpy.array) - the starting point of the line segment
  • line_end (numpy.array) - the ending point of the line segment
  • inf_nan_thresh (float) - this parameter handles numerical precision for inf and nan cases
  • distance_thresh (float) - this parameter controls how the intersection of line segment end-points and a plane are handled for cases where one of the end-points lies in (or near) the plane, if zero then such a line segment end-point is considered to intersect with the plane, if positive then it is considered to not intersect with the plane
Returns: numpy.array or None
the single point of intersection along the line segment or None if there is no intersection