TunDrawer.py 546 B

1234567891011121314151617
  1. class TunDrawer:
  2. def __init__(self, msp, layer, color, vec12, vec34, from_point, to_point):
  3. self.msp = msp
  4. self.layer = layer
  5. self.color = color
  6. self.vec12 = vec12
  7. self.vec34 = vec34
  8. self.from_point = from_point
  9. self.to_point = to_point
  10. def draw_tun(self):
  11. self.msp.add_line(self.vec12[0], self.vec12[1], dxfattribs={
  12. 'color': self.color
  13. })
  14. self.msp.add_line(self.vec34[0], self.vec34[1], dxfattribs={
  15. 'color': self.color
  16. })