def _generate_ports(self, ports): ports += microfluidics.FluidicPort( name='in', position=(0.0, 0.0), direction=i3.PORT_DIRECTION.IN, trace_template=self.channel_template, angle_deg=90) ports += microfluidics.FluidicPort( name='out', position=(0.0, 0.0), direction=i3.PORT_DIRECTION.OUT, trace_template=self.channel_template, angle_deg=90) return ports
def _generate_ports(self, ports): #port1 ports += microfluidics.FluidicPort( name='in', position=(0, 0), direction=i3.PORT_DIRECTION.IN, angle_deg=180, trace_template=self.cell.channel_template) #port2 ports += microfluidics.FluidicPort( name='out', position=(self.funnel_length, 0), direction=i3.PORT_DIRECTION.OUT, angle_deg=0, trace_template=self.cell.channel_template) return ports
def _generate_ports(self, ports): #port1 ports += microfluidics.FluidicPort( name='in', position=(0, self.wholeTrapY * 0.5), #position = (0, 'insts_0'.size_info().north*0.5), direction=i3.PORT_DIRECTION.IN, angle_deg=180, trace_template=self.cell.channel_template) #port2 ports += microfluidics.FluidicPort( name='out', position=(self.wholeTrapX, self.wholeTrapY * 0.5), direction=i3.PORT_DIRECTION.OUT, angle_deg=0, trace_template=self.cell.channel_template) return ports
def _generate_ports(self, ports): #port1 ports += microfluidics.FluidicPort( name='in1', position=(-self.cell_trap_length * 0.5, 0.0), direction=i3.PORT_DIRECTION.IN, #angle_deg=0, trace_template=self.channel_template) ports += microfluidics.FluidicPort( name='out1', position=(self.cell_trap_length * 0.5, 0.0), direction=i3.PORT_DIRECTION.IN, #angle_deg=0, trace_template=self.channel_template) return ports
def _generate_ports(self, ports): #port1 ports += microfluidics.FluidicPort( name='in1', position=(0, -self.tee_length), direction=i3.PORT_DIRECTION.IN, angle_deg=270, trace_template=self.cell.channel_template) #port2 ports += microfluidics.FluidicPort( name='in2', position=(0, self.tee_length), direction=i3.PORT_DIRECTION.IN, angle_deg=90, trace_template=self.cell.channel_template) #port3 ports += microfluidics.FluidicPort( name='out1', position=(self.tee_length, 0.0), direction=i3.PORT_DIRECTION.OUT, angle_deg=0, trace_template=self.cell.channel_template) return ports
def _generate_ports(self, ports): '''ports += microfluidics.FluidicPort(name='in', position=(0.0, 0.0), direction=i3.PORT_DIRECTION.IN, trace_template=self.channel_template, angle_deg=0 )''' ports += microfluidics.FluidicPort( name='out', position=(self.diameter * self.cell.reduction_ratio, 0.0), direction=i3.PORT_DIRECTION.OUT, trace_template=self.channel_template, angle_deg=180) return ports
def _generate_instances(self, insts): width = 200.0 p1 = (-self.radius, -self.radius) #near cylinders p2 = (-self.radius, -2 * self.radius) #bottom p3 = (2 * self.radius, -2 * self.radius) #right p4 = (2 * self.radius, 0) #top p5 = (2 * self.radius + 500, 0) #out pax = (-width * 0.5 * math.cos(45), width * 0.5 * math.sin(45)) #generate a circle sr1 = i3.ShapeCircle(center=(0.0, 0.0), radius=self.radius) #, line_width = 200) br1 = i3.Boundary(layer=self.layer, shape=sr1) #s= i3.Structure(elements = br1) #rectangle sc1 = i3.ShapeRectangle(center=p1, box_size=(self.radius * 4, self.radius * 0.25)) bc1 = i3.Boundary(layer=self.layer, shape=sc1, transformation=i3.Rotation((0, 0), -45.0)) # was -35 #Substruct boundaries and add to the element list b_sub = br1 - bc1 s = i3.Structure(elements=b_sub) insts += i3.SRef(s) #Input channel - segment channel1 = microfluidics.Channel( trace_template=self.cell.channel_template) #channel_template = microfluidics.ShortChannelTemplate().Layout(width=200.0) channel1_lo = channel1.Layout(shape=[(self.inlet_channel_length + self.offset_matching * 0.5, 0), (0, 0)]) insts += i3.SRef( channel1_lo, position=(-(self.inlet_channel_length + self.radius), 0), transformation=i3.Rotation((0.0, 0.0), 0.0)) #############################routing from ipkiss.plugins.photonics.routing.manhattan import RouteManhattan channel_4 = microfluidics.RoundedChannel( trace_template=self.cell.channel_template) # used for routing channel_4_layout = channel_4.Layout() import operator p1Array = tuple(map(operator.add, p1, pax)) print 'p1: ', p1 print 'pax: ', pax print 'p1Array: ', p1Array #obstacles insts += i3.SRef(reference=self.obstacles, position=p1Array, transformation=i3.Rotation((0, 0), -45.0)) in_port_1 = microfluidics.FluidicPort( position=p1, trace_template=self.cell.channel_template) out_port_1 = microfluidics.FluidicPort( trace_template=self.cell.channel_template) in_port_1.angle_deg = 225 out_port_1.angle_deg = 45 in_port_2 = microfluidics.FluidicPort( position=p2, trace_template=self.cell.channel_template) in_port_2.angle_deg = 225 channel_4_layout.set(bend_radius=150.0, shape=RouteManhattan(input_port=in_port_2, points=[p2, p3, p4, p5], output_port=out_port_1, bend_radius=300.0)) insts += i3.SRef(name="Route_1", reference=channel_4) ##############################routing from ipkiss3.pcell.routing import RouteToAngle # create the route object channel_1 = microfluidics.RoundedChannel( trace_template=self.cell.channel_template) # used for routing channel_1_layout = channel_1.Layout() channel_1_layout.set(bend_radius=50.0, shape=RouteToAngle(input_port=in_port_1, start_straight=300, end_straight=300, angle_out=45)) #insts += i3.SRef(name = "Route_2", reference = channel_1) from ipkiss3.pcell.routing import RouteToEastAtMaxY, RouteToEastAtMinY, RouteToEastAtY # create the route object input_portx = i3.OpticalPort(name="in", position=(-self.radius, -self.radius), angle_deg=225.0) channel_x = microfluidics.RoundedChannel( trace_template=self.cell.channel_template) # used for routing channel_x_layout = channel_x.Layout() channel_x_layout.set(bend_radius=150.0, shape=RouteToEastAtY(input_port=input_portx, start_straight=200, end_straight=200, y_position=-2 * self.radius)) insts += i3.SRef(name="Route_x", reference=channel_x) return insts