Пример #1
0
 def testBestContactPointRotated(self):
     """
     Item too Big
     Rotation = False
     """
     M = maximal_rectangles.MaximalRectangle(8, 4, rotation=True)
     I = item.Item(4, 8)
     M.insert(I, heuristic='contact_point')
     with self.subTest():
         self.assertEqual(M.freerects, [])
     with self.subTest():
         self.assertEqual(I.rotated, True)
Пример #2
0
 def testBestBottomLeftRotated(self):
     """
     Item too Big
     Rotation = False
     """
     M = maximal_rectangles.MaximalRectangle(8,
                                             4,
                                             rotation=True,
                                             heuristic='bottom_left')
     I = item.Item(4, 8)
     M.insert(I)
     with self.subTest():
         self.assertEqual(M.freerects, [])
     with self.subTest():
         self.assertEqual(I.rotated, True)
Пример #3
0
 def setUp(self):
     self.M = maximal_rectangles.MaximalRectangle(8, 4, rotation=True)
Пример #4
0
 def setUp(self):
     self.M = maximal_rectangles.MaximalRectangle(8, 4)
Пример #5
0
 def setUp(self):
     self.M = maximal_rectangles.MaximalRectangle(8,
                                                  4,
                                                  rotation=True,
                                                  heuristic='best_area')
Пример #6
0
 def setUp(self):
     self.M = maximal_rectangles.MaximalRectangle(8,
                                                  4,
                                                  heuristic='contact_point')
Пример #7
0
 def setUp(self):
     self.M = maximal_rectangles.MaximalRectangle(8,
                                                  4,
                                                  heuristic='bottom_left')
Пример #8
0
 def setUp(self):
     self.M = maximal_rectangles.MaximalRectangle(8,
                                                  4,
                                                  heuristic='best_longside')