示例#1
0
 def test_point(self) -> None:
     """Test the Point class.
     """
     offset = Point(0., 0.)
     p1 = Point(0., 0., 'p1')
     p2 = Point(0., 50., 'p2')
     p3 = Point(-50., -50., 'p2')
     p4 = Point(50., 50., 'p4')
     p5 = Point(100., 50., 'p5')
     blueprint('Test dimensioning', 'A4')
     p1.draw(offset)
     p2.draw(offset)
     p3.draw(offset)
     p4.draw(offset)
     p5.draw(offset)
     dim(p1, p2, offset)
     dim(p1, p3, offset)
     dim(p3, p1, offset)
     dim(p4, p5, offset)
示例#2
0
 def __test_point(self) -> None:
     """Test the Point class.
     """
     p0 = Point(0., 0.)
     p1 = Point(1., 1., 'p1')
     p2 = Point(2., 2., 'p2')
     print(p0)
     print(p1)
     print(p2)
     plt.figure('Drawing points')
     p0.draw()
     p1.draw()
     p2.draw()