123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- from abc import ABC
- from typing import List
- import core
- from entity import Node
- from entity.Line import Line, Plg
- class Entity(ABC):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color, from_tun_id=None):
- self.id = id_
- self.from_tun_id = from_tun_id
- self.name = name
- self.layer_id = layer_id
- self.center = center
- self.width = width
- self.color = color
- self.middle_line = middle_line
- class Tun2d(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, vec_list: List[Line],
- layer_vec_list: List[Line]
- , fq, color, width, arrow_show, air_type):
- self.layer_vec_list = layer_vec_list
- self.vec_list = vec_list
- self.air_type = air_type
- self.fq = fq
- self.arrow_show = arrow_show
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class Tun3d(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, plg_l: Plg, plg_r: Plg, plg_b: Plg
- , fq, color, width, arrow_show, air_type):
- self.plg_r = plg_r
- self.plg_l = plg_l
- self.plg_b = plg_b
- self.air_type = air_type
- self.fq = fq
- self.arrow_show = arrow_show
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class Window(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color):
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class Gate(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color):
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class Sealed(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color, from_tun_id):
- super().__init__(id_, layer_id, name, center, middle_line, width, color, from_tun_id)
- class WindBridge(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color):
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class TunText(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color, value):
- self.value = value
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class AirFlow(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color, air_type):
- self.air_type = air_type
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class Shaft(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color):
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class Fan(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color, fan_type):
- self.fan_type = fan_type
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class AirDuct(Entity):
- def __init__(self, id_, layer_id, name, center: Node, middle_line: Line, width, color, path_list: List[Line]):
- self.path_list = path_list
- super().__init__(id_, layer_id, name, center, middle_line, width, color)
- class TunGap:
- def __init__(self, plg: Plg, color=(0, 0, 0)):
- self.plg = plg
- self.color = color
- class Drill:
- def __init__(self, id_, layer_id, line_list: List, color):
- self.id_ = id_
- self.layer_id = layer_id
- self.line_list = line_list
- self.color = color
- class Face:
- def __init__(self, layer_id, node_list: List, color):
- self.layer_id = layer_id
- self.node_list = node_list
- self.color = color
- class Empty:
- def __init__(self, layer_id, node_list: List, color):
- self.layer_id = layer_id
- self.node_list = node_list
- self.color = color
|