from drawer.BaseDrawer import BaseDrawer from entity.primitives import Tun3d, TunGap class TunGapDrawer(BaseDrawer): def initialize_data(self): self.obj.layer_id = 1 def draw_agg(self): assert isinstance(self.obj,TunGap) self.draw_gap(self.obj.plg.plg_agg) def draw_div(self): pass def draw_gap(self,point_list): hatch = self.msp.add_hatch(dxfattribs={"layer": f"图层{self.obj.layer_id}"}) hatch.rgb = (0, 0, 0) edge_path = hatch.paths.add_edge_path() for i in range(len(point_list)): if i+1