def make_rotating_slits(length, width, N, radius, layers, angle_ref=None, angle_sweep=360): """ :param length: Length of the slits in the circle :param width: Width of the slits in the circle :param N: Number of slits going around the circle :param radius: Radius of the circle :param layers: Layers to write the slits in :param angle_ref: if None, no angle reference lines are added. If '111' then add reference lines at 30/60 degrees. If '100' then add reference lines at 45/90 degrees. :return: """ cell = Cell('RotatingSlits') if not (type(layers) == list): layers = [layers] allslits = Cell('All Slits') angles = np.linspace(0, angle_sweep, N) # radius = length*12. translation = (radius, 0) for l in layers: # rect = Rectangle(pt1, pt2, layer=l) membrane = Path([(-length / 2., 0), (length / 2., 0)], width=width, layer=l) membrane_cell = Cell('Membrane_w{:.0f}'.format(width * 1000)) membrane_cell.add(membrane) slit = Cell("Slit") slit.add(membrane_cell, origin=translation) for angle in angles: allslits.add(slit, rotation=angle) cell.add(allslits) if angle_ref: labelCell = Cell('AngleLabels') lineCell = Cell('Line') pt1 = (-radius * 0.9, 0) pt2 = (radius * 0.9, 0) line = Path([pt1, pt2], width=width, layer=l) dLine = dashed_line(pt1, pt2, 2, width, l) lineCell.add(line) labelCell.add(lineCell, rotation=0) if angle_ref == '111': labelCell.add(lineCell, rotation=60) labelCell.add(lineCell, rotation=-60) labelCell.add(dLine, rotation=30) labelCell.add(dLine, rotation=90) labelCell.add(dLine, rotation=-30) elif angle_ref == '100': labelCell.add(lineCell, rotation=0) labelCell.add(lineCell, rotation=90) labelCell.add(dLine, rotation=45) labelCell.add(dLine, rotation=135) cell.add(labelCell) return cell
def add_dashed_dicing_marks(self, layers): if type(layers) is not list: layers = [layers] width = 10. / 2 dashlength = 2000 r = self.wafer_r rng = np.floor(self.wafer_r / self.block_size).astype(int) dmarks = Cell('DIC_MRKS') for l in layers: for x in np.arange(-rng[0], rng[0] + 1) * self.block_size[0]: y = np.sqrt(r**2 - x**2) vm = dashed_line([x, y], [x, -y], dashlength, width, layer=l) dmarks.add(vm) for y in np.arange(-rng[1], rng[1] + 1) * self.block_size[1]: x = np.sqrt(r**2 - y**2) hm = dashed_line([x, y], [-x, y], dashlength, width, layer=l) dmarks.add(hm) self.add(dmarks)
def make_rotating_branch_devices(length, width, N, radius, layers, angle_sweep=360, angle_ref=False, angle_offset=0): cell = Cell('RotatingBranches') if not (type(layers) == list): layers = [layers] allslits = Cell('All Slits') angles = np.linspace(0, angle_sweep, N) translation = (radius, 0) branch_dev = make_branch_device(width, 0.750, length, length, 3, layers[0]) for element in branch_dev.elements: element.origin = [radius, 0] for angle in angles: allslits.add(branch_dev.copy(), rotation=angle_offset + angle) cell.add(allslits) for l in layers: if angle_ref: labelCell = Cell('AngleLabels') lineCell = Cell('Line') pt1 = (0, 0) pt2 = (radius * 0.9, 0) line = Path([pt1, pt2], width=width, layer=l) dLine = dashed_line(pt1, pt2, 2, width, l) lineCell.add(line) rot_angle = 0 while True: if abs(rot_angle) > abs(angle_sweep): break if abs(rot_angle) % 60 == 0: labelCell.add(lineCell, rotation=rot_angle) if (abs(rot_angle) - 30) % 60 == 0: labelCell.add(dLine, rotation=rot_angle) rot_angle += np.sign(angle_sweep) * 15 cell.add(labelCell) return cell