def init_regions(self): origin = DPoint(0, 0) hor_box = DBox(origin - DPoint(self.l/2, self.t/2), DPoint(self.l/2, self.t/2)) vert_box = DBox(origin - DPoint(self.t/2, self.l/2), DPoint(self.t/2, self.l/2)) cross = (Region(hor_box) + Region(vert_box)).merge() #if self.inverse: # self.empty_region.insert(cross) #else: self.metal_region.insert(cross)
def init_regions(self): ll = DPoint(-self._s_l / 2, -self._s_w / 2) ur = DPoint(self._s_l / 2, self._s_w / 2) self.metal_region.insert(Box(DBox(ll, ur))) ll = DPoint(-(self._s_l + self._gap_l) / 2, -(self._s_w + self._gap_w) / 2) ur = DPoint((self._s_l + self._gap_l) / 2, (self._s_w + self._gap_w) / 2) protect_reg = Region(Box(DBox(ll, ur))) empty_region = protect_reg - self.metal_region self.empty_region.insert(empty_region) self.connections = [DPoint(0, 0)]
# CPW(start=p1, end=p1 + DPoint(0, b - p1.y), cpw_params=My_Design.Z_narrow).place(my_design.region_ph) # CPW(start=p2, end=p2 + DPoint(0, -p2.y), cpw_params=My_Design.Z).place(my_design.region_ph) # my_design.show() # # freqs = np.linspace(1e9, 5e9, 300) # my_design.set_fixed_parameters(freqs) # my_design.set_swept_parameters( {"simBox": [SimulationBox(a, b, 100+20*k, 100+20*k) for k in range(11)]} ) # my_design.simulate_sweep() # my_design.save() my_design.draw() alpha = 2.0 dr = DVector(my_design.sfs.r_out, my_design.sfs.r_out) p1 = my_design.sfs_center - dr p2 = p1 + dr * alpha box = pya.Box().from_dbox(DBox(p1, p2)) my_design.crop(pya.Box().from_dbox(DBox(p1, p2))) my_design.region_ph.trans freqs = np.linspace(1e9, 5e9, 300) my_design.set_fixed_parameters(freqs) my_design.set_swept_parameters({ "simBox": [ SimulationBox(box.width(), box.height(), 200 + 2 * i, 100 + 1 * i) for i in range(6) ] }) my_design.simulate_sweep() my_design.set_measurement_name("helooo") my_design.save()
def draw_square(self): p1 = DPoint(self.sim_X / 2 + self.dx, self.sim_Y / 2 - self.Z.b / 2 + self.dy) square = DBox(p1, p1 + DPoint(self.square_width, self.square_height)) self.region_ph.insert(Box().from_dbox(square))
def cut_a_piece(self): side = 2e6 lowerleft = DPoint(self.chip.chip_x / 2 - side / 2, self.chip.chip_y - side) upperright = DPoint(self.chip.chip_x / 2 + side / 2, self.chip.chip_y) self.select_box(DBox(lowerleft, upperright))
def draw_square(self, design_params): dx = design_params["square_dx"] p1 = DPoint(self.sim_X / 2 + dx, self.sim_Y / 2 - self.Z.width / 2 - self.Z.gap * 2 / 3) square = DBox(p1, p1 + DPoint(self.Z.b, self.Z.gap / 3)) self.region_ph.insert(Box().from_dbox(square))