parse.py

changeset 101
745f2c3aec0a
parent 94
109fb7cf658f
child 127
97de6058109e
equal deleted inserted replaced
100:62759e5c4554 101:745f2c3aec0a
37 yield from self.filter_by_type(linetypes.Quadrilateral) 37 yield from self.filter_by_type(linetypes.Quadrilateral)
38 @property 38 @property
39 def has_header(self): 39 def has_header(self):
40 return self.header and not isinstance(self.header, header.BadHeader) 40 return self.header and not isinstance(self.header, header.BadHeader)
41 def find_first_header_object(self, object_type): 41 def find_first_header_object(self, object_type):
42 return self.body[self.header.first_occurrence[object_type]] 42 return self.find_header_object(object_type, 0)
43 def find_header_object(self, object_type, n):
44 return self.body[self.header.occurrences[object_type][n]]
43 45
44 def model_vertices( 46 def model_vertices(
45 model, 47 model,
46 transformation_matrix = None, 48 transformation_matrix = None,
47 file_cache = None, 49 file_cache = None,

mercurial