Beispiel #1
0
 def test_dir_to_disp_dynamic(self):
     dr = z3.Const('dir', Dir)
     SOL.add(dr == Dir.u)
     disp = dir_to_disp(dr)
     m = SOL.model()
     self.assertEqual(0, SOL.eval(disp[0]))
     self.assertEqual(1, SOL.eval(disp[1]))
Beispiel #2
0
 def test_seg_contains(self):
     sb = SegmentedBelt()
     SOL.add(sb.num_segs >= 2)
     SOL.add(sb.segment(0).contains(Point2D(5, 2)))
     SOL.add(sb.segment(1).contains(Point2D(10, 5)))
     SOL.add(sb.segment(0).horizontal())
     SOL.model()
     c1 = SOL.eval(sb.corner(1))
     self.assertEqual(c1, Point2D(10,2))