1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- 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]
- , fq, color,width, arrow_show,air_type):
- 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
|