def setUp(self): self.lines = tio.read_tess('tess_files/n10-id1.tess') self.verts = tio.get_verts(self.lines) self.edges = tio.get_edges(self.lines, self.verts) self.faces = tio.get_faces(self.lines, self.edges) self.polyhedrons = tio.get_polyhedrons(self.lines, self.faces) tio.get_periodicity(self.lines, self.verts, self.edges, self.faces)
def test_remove_edge(self): face = self.faces[1] org_edge_id = face.parts[0].id_ face.remove_part(face.parts[0]) face_list = set([edge.id_ for edge in face.parts])-set([org_edge_id]) test_face_list = set([edge.id_ for edge in face.parts]) self.assertEqual(face_list, test_face_list) self.faces = tio.get_faces(self.lines, self.edges)
def read_tess(self): """Read and creates the tessellation from a .tess file""" with open(self.tess_file_name, 'r') as tess_raw: self.lines = tess_raw.readlines() self.vertices = tio.get_verts(self.lines) self.edges = tio.get_edges(self.lines, self.vertices) self.faces = tio.get_faces(self.lines, self.edges) self.polyhedrons = tio.get_polyhedrons(self.lines, self.faces) self.domain_size = tio.get_domain_size(self.lines)