# Path: rhino_unwrapper/visualization.py
# def setAttrColor(a, r, g, b):
# def setAttrArrow(attr, strType):
# def rhino_polyline(points):
# def drawPolyline(point_list, color=(0,0,0,0), arrowType='none'):
# def rhino_line(pntA,pntB):
# def show_line(line,color,arrowType='none'):
# def draw_arrow(line,color=(0,0,0,0)):
# def show_line_from_points(points, color=(0,0,0,0), arrowType='none' ):
# def translateLine(self, xForm):
# def drawVector(vector, position, color=[0,0,0,0]):
# def drawTextDot(point, message, color):
# def drawEdgeLine(flatEdge, color):
# def drawNet(flatEdgePairs):
# 
# Path: rhino_unwrapper/rhino_helpers.py
# def createGroup(groupName, objects):
# def convertArray(array):
# def rotate_and_remove(sequence,index):
# def getCenterPointLine(line):
# def getOffset(points, testPoint, distance, towards, axis=(0, 0, 1)):
# def testPointIsLeftB(pointA, pointB, testPoint):
# def getVectorForPoints(pntA, pntB):
# def getMidPoint(curve_id):
# def getMedian(edgeLens):
# def approxEqual(A, B, tolerance=10**-4):
# def getFlatList(collection):
# def uniqueList(seq, idfun=None):
#         def idfun(x): return x
# 
# Path: rhino_unwrapper/transformations.py
# def get_mapped_point(point,from_frame,to_frame):
# def get_frame_on_mesh(mesh_location,myMesh):
#     def getOther(vertIdx, edgeTVerts):
# def get_xy_net_frame(pointPair):
# def make_xy_frame(point,xVec):
# def make_origin_frame():
#     def __init__(self,plane):
#     def create_frame_from_vectors(cls,origin,x,y):
#     def create_frame_from_normal_and_x(cls,origin,normal,x):
#     def create_frame_from_tuples(cls,origin,x,y):
#     def instantiate_plane(origin,x,y):
#     def show(self):
#     def is_equal(self,test_frame):
#     def _check_vector3d(self):
#     def _unitize(self):
#     def _check_orthogonal(self):
#     def _check_unitized(self):
# class Frame(object):


from rhino_unwrapper import visualization as vis
from rhino_unwrapper import rhino_helpers as helpers
from rhino_unwrapper import transformations as trans
import scriptcontext
import rhinoscriptsyntax as rs
import Rhino.Geometry as geom
import System
import clr
        return range(self.mesh.Faces.Count)

    def get_set_of_edges(self):
        count = self.mesh.TopologyEdges.Count
        return set(range(count))

    def get_set_of_face_idxs(self):
        return set(self.face_indices())

    def get_mesh_faces(self):
        """
        returns list of MeshFace instances that make up mesh
        """
        return (self.mesh.Faces.GetFace(i) for i in xrange(self.mesh.Faces.Count))

    def meshTVerts(self):
        return xrange(self.mesh.TopologyVertices.Count)

    ### SPECIAL, ie requires more than one extra index

    def get_frame_oriented_with_face_normal(self,edge,face):
        '''
        an edge and a face (meshLoc) imply a unique frame, 
        since the edge can be oriented according the the face's normal (right hand rule)
        '''
        face_edges = self.getFaceEdges(face)
        assert (edge in face_edges), "edge {} not in face {}".format(edge,face)
        basePoint,endPoint = self.get_oriented_points_for_edge(edge,face)
        normal = self.get_face_normal(face)
        xVec = helpers.getVectorForPoints(basePoint,endPoint)

# Path: rhino_unwrapper/visualization.py
# def setAttrColor(a, r, g, b):
# def setAttrArrow(attr, strType):
# def rhino_polyline(points):
# def drawPolyline(point_list, color=(0,0,0,0), arrowType='none'):
# def rhino_line(pntA,pntB):
# def show_line(line,color,arrowType='none'):
# def draw_arrow(line,color=(0,0,0,0)):
# def show_line_from_points(points, color=(0,0,0,0), arrowType='none' ):
# def translateLine(self, xForm):
# def drawVector(vector, position, color=[0,0,0,0]):
# def drawTextDot(point, message, color):
# def drawEdgeLine(flatEdge, color):
# def drawNet(flatEdgePairs):
# 
# Path: rhino_unwrapper/rhino_helpers.py
# def createGroup(groupName, objects):
# def convertArray(array):
# def rotate_and_remove(sequence,index):
# def getCenterPointLine(line):
# def getOffset(points, testPoint, distance, towards, axis=(0, 0, 1)):
# def testPointIsLeftB(pointA, pointB, testPoint):
# def getVectorForPoints(pntA, pntB):
# def getMidPoint(curve_id):
# def getMedian(edgeLens):
# def approxEqual(A, B, tolerance=10**-4):
# def getFlatList(collection):
# def uniqueList(seq, idfun=None):
#         def idfun(x): return x
# 
# Path: rhino_unwrapper/transformations.py
# def get_mapped_point(point,from_frame,to_frame):
# def get_frame_on_mesh(mesh_location,myMesh):
#     def getOther(vertIdx, edgeTVerts):
# def get_xy_net_frame(pointPair):
# def make_xy_frame(point,xVec):
# def make_origin_frame():
#     def __init__(self,plane):
#     def create_frame_from_vectors(cls,origin,x,y):
#     def create_frame_from_normal_and_x(cls,origin,normal,x):
#     def create_frame_from_tuples(cls,origin,x,y):
#     def instantiate_plane(origin,x,y):
#     def show(self):
#     def is_equal(self,test_frame):
#     def _check_vector3d(self):
#     def _unitize(self):
#     def _check_orthogonal(self):
#     def _check_unitized(self):
# class Frame(object):


# Path: rhino_unwrapper/meshUtils/mesh.py
from rhino_unwrapper import visualization as vis
from rhino_unwrapper import rhino_helpers as helpers
from rhino_unwrapper import transformations as trans
import scriptcontext
import rhinoscriptsyntax as rs
import Rhino.Geometry as geom
import System
import clr

        return range(self.mesh.Faces.Count)

    def get_set_of_edges(self):
        count = self.mesh.TopologyEdges.Count
        return set(range(count))

    def get_set_of_face_idxs(self):
        return set(self.face_indices())

    def get_mesh_faces(self):
        """
        returns list of MeshFace instances that make up mesh
        """
        return (self.mesh.Faces.GetFace(i) for i in xrange(self.mesh.Faces.Count))

    def meshTVerts(self):
        return xrange(self.mesh.TopologyVertices.Count)

    ### SPECIAL, ie requires more than one extra index

    def get_frame_oriented_with_face_normal(self,edge,face):
        '''
        an edge and a face (meshLoc) imply a unique frame, 
        since the edge can be oriented according the the face's normal (right hand rule)
        '''
        face_edges = self.getFaceEdges(face)
        assert (edge in face_edges), "edge {} not in face {}".format(edge,face)
        basePoint,endPoint = self.get_oriented_points_for_edge(edge,face)
        normal = self.get_face_normal(face)
        xVec = helpers.getVectorForPoints(basePoint,endPoint)

        return trans.Frame.create_frame_from_normal_and_x(basePoint,normal,xVec)