Exemple #1
0
 def load_stl(self, file):
     unit = Unit([])
     with open(file, "rb") as f:
         f.seek(0)
         f.read(84)
         while True:
             byte_polygon = f.read(50)
             if not byte_polygon:
                 break
             unit.add_polygon(self._parse_polygon(byte_polygon))
     return unit