Example #1
0
 def test_my_head(self):
     """Does it load a huge model OK?"""
     stl = STL(
         os.path.join(os.path.dirname(__file__), 'data', 'derekhead.stl'))
     type = stl.type()
     if type == "binary":
         print stl.header()
         print "Length is: ", stl.length()
     stl.read()
     self.assertEquals(type, 'binary')
     self.assertEquals(stl.length(), 33326)
Example #2
0
 def test_20mm_cube_asc(self):
     """Load a small model?"""
     stl = STL(
         os.path.join(os.path.dirname(__file__), 'data', '20mmboxasc.stl'))
     stl.debug = True
     type = stl.type()
     self.assertEquals(type, 'ascii')
     stl.read()
     stl.dump()
Example #3
0
 def test_my_head(self):
     """Does it load a huge model OK?"""
     stl = STL(os.path.join(os.path.dirname(__file__),
         'data', 'derekhead.stl'))
     type = stl.type()
     if type == "binary":
         print stl.header()
         print "Length is: ", stl.length()
     stl.read()
     self.assertEquals(type, 'binary')
     self.assertEquals(stl.length(), 33326)
Example #4
0
 def test_20mm_cube_asc(self):
     """Load a small model?"""
     stl = STL(os.path.join(os.path.dirname(__file__),
         'data', '20mmboxasc.stl'))
     stl.debug = True
     type = stl.type()
     self.assertEquals(type, 'ascii')
     stl.read()
     stl.dump()
Example #5
0
def get_box():
    """Gets the box (small model)"""
    stl = STL(os.path.join(os.path.dirname(__file__),
        'data', '20mmboxasc.stl'))
    stl.read()
    return stl
Example #6
0
def get_head():
    """Gets the head (big model)"""
    stl = STL(os.path.join(os.path.dirname(__file__),
        'data', 'derekheadasc.stl'))
    stl.read()
    return stl
Example #7
0
def get_box():
    """Gets the box (small model)"""
    stl = STL(os.path.join(os.path.dirname(__file__), 'data',
                           '20mmboxasc.stl'))
    stl.read()
    return stl
Example #8
0
def get_head():
    """Gets the head (big model)"""
    stl = STL(
        os.path.join(os.path.dirname(__file__), 'data', 'derekheadasc.stl'))
    stl.read()
    return stl