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)
def get_edge_vec_oriented(self,edgeIdx,faceIdx): tVerts = self.get_oriented_TVerts_for_edge(edgeIdx,faceIdx) pntA,pntB = self._get_points_for_tVerts(tVerts) return helpers.getVectorForPoints(pntA,pntB)