Ejemplo n.º 1
0
def drawFaceElems(x,faces,mode,color=None,alpha=1.0):
    """Draw a collection of faces.

    This function is like drawFaces, but the coordinates of the faces are
    specified by:
    x (nel,nplex) : the coordinates of solid elements
    faces (nfaces,fplex): the definition of nfaces faces of the solid,
      each with plexitude fplex. Each line of faces defines a single
      face of the solid, in local vertex numbers (0..nplex-1)
    """
    # We may have faces with different plexitudes!
    for fac in utils.sortOnLength(faces).itervalues():
        fa = asarray(fac)
        drawFaces(x[:,fa.ravel(),:],fa.shape[1],mode,color,alpha)
Ejemplo n.º 2
0
 def getFaces():
     return sortOnLength(self.faces)