optical pins name revised. Pin type added

This commit is contained in:
=
2026-06-07 22:56:33 +08:00
parent a4ac88f002
commit 8462c3397f
262 changed files with 3251 additions and 1134 deletions
+24 -8
View File
@@ -88,8 +88,12 @@ class circle :
_my_polygon(layer_wg=layers,vtx=vtx,vtx_not=vtx_cut).put(0,0,0)
nd.Pin(name='a1',width=width,xs=xs).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
nd.Pin(name='b1',width=width,xs=xs).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='a1',width=width,xs=xs).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
nd.Pin(name='opt_a1',width=width,xs=xs,type="optical:").put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='b1',width=width,xs=xs).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
nd.Pin(name='opt_b1',width=width,xs=xs,type="optical:").put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
else:
theta = np.linspace(theta_start,theta_stop,n_points)
@@ -128,8 +132,12 @@ class circle :
""" """
_my_polygon(layer_wg=layer,vtx=vtx,vtx_not=vtx_cut).put(0,0,0)
nd.Pin(name='a1',width=width,layer=layer).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
nd.Pin(name='b1',width=width,layer=layer).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='a1',width=width,layer=layer).put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
nd.Pin(name='opt_a1',width=width,layer=layer,type="optical:").put(radius*np.cos(theta_start/180*np.pi),radius*np.sin(theta_start/180*np.pi),theta_start-90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='b1',width=width,layer=layer).put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
nd.Pin(name='opt_b1',width=width,layer=layer,type="optical:").put(radius*np.cos(theta_stop/180*np.pi),radius*np.sin(theta_stop/180*np.pi),theta_stop+90)
self.vtx = vtx
self.sz = [radius*2,radius*2]
@@ -318,8 +326,12 @@ class Elipse_dual :
else:
_my_polygon(layer_wg=layers,vtx=vtx,vtx_not=vtx_cut).put(0,0,0)
nd.Pin(name='a1').put((Ox[0]+Ix[0])/2,(Oy[0]+Iy[0])/2,theta[0]-90)
nd.Pin(name='b1').put((Ox[-1]+Ix[-1])/2,(Oy[-1]+Iy[-1])/2,theta[-1]+90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='a1').put((Ox[0]+Ix[0])/2,(Oy[0]+Iy[0])/2,theta[0]-90)
nd.Pin(name='opt_a1',type="optical:").put((Ox[0]+Ix[0])/2,(Oy[0]+Iy[0])/2,theta[0]-90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='b1').put((Ox[-1]+Ix[-1])/2,(Oy[-1]+Iy[-1])/2,theta[-1]+90)
nd.Pin(name='opt_b1',type="optical:").put((Ox[-1]+Ix[-1])/2,(Oy[-1]+Iy[-1])/2,theta[-1]+90)
return C
@@ -418,8 +430,12 @@ class Elipse:
Ain = np.angle(nx[0]+1j*ny[0])/pi*180
Aout = np.angle(nx[-1]+1j*ny[-1])/pi*180
nd.Pin(name='a1').put(Ox[0]/2+Ix[0]/2,Oy[0]/2+Iy[0]/2,Ain-90)
nd.Pin(name='b1').put(Ox[-1]/2+Ix[-1]/2,Oy[-1]/2+Iy[-1]/2,Aout+90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='a1').put(Ox[0]/2+Ix[0]/2,Oy[0]/2+Iy[0]/2,Ain-90)
nd.Pin(name='opt_a1',type="optical:").put(Ox[0]/2+Ix[0]/2,Oy[0]/2+Iy[0]/2,Ain-90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='b1').put(Ox[-1]/2+Ix[-1]/2,Oy[-1]/2+Iy[-1]/2,Aout+90)
nd.Pin(name='opt_b1',type="optical:").put(Ox[-1]/2+Ix[-1]/2,Oy[-1]/2+Iy[-1]/2,Aout+90)
nd.Pin(name='a0').put(0,0,180)
nd.Pin(name='b0').put(0,0,0)