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
+18 -6
View File
@@ -155,8 +155,12 @@ class Conchoid:
_my_polygon(layer_wg=layers,vtx=vtx).put(0,0,0)
Rmax = T*kR+R0
nd.Pin(name="a1").put(R0,0,-90)
nd.Pin(name="b1").put(Rmax*np.cos(T),Rmax*np.sin(T),(T/np.pi*180+90))
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name="a1").put(R0,0,-90)
nd.Pin(name="opt_a1",type="optical:").put(R0,0,-90)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name="b1").put(Rmax*np.cos(T),Rmax*np.sin(T),(T/np.pi*180+90))
nd.Pin(name="opt_b1",type="optical:").put(Rmax*np.cos(T),Rmax*np.sin(T),(T/np.pi*180+90))
self.L = L
self.cell =C
@@ -418,8 +422,12 @@ class Clothoid:
nd.Pin(name='a0',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
nd.Pin(name='b0',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
nd.Pin(name='opt_a1',width=self.w[0],type="optical:").put(self.x[0],self.y[0],self.A[0]+180)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
nd.Pin(name='opt_b1',width=self.w[-1],type="optical:").put(self.x[-1],self.y[-1],self.A[-1])
elif(self.layer!=None) : ## if definition is in xsections
vtx_wg = _line2wg_(x=self.x,y=self.y,wu=self.w/2,wd= self.w/2,theta=self.theta,n_points=self.n_points)
@@ -429,8 +437,12 @@ class Clothoid:
nd.Pin(name='a0',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
nd.Pin(name='b0',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='a1',width=self.w[0],type="Optical:").put(self.x[0],self.y[0],self.A[0]+180)
nd.Pin(name='opt_a1',width=self.w[0],type="optical:").put(self.x[0],self.y[0],self.A[0]+180)
## revised in 2026.06.07 by Qin Yue
# legacy: nd.Pin(name='b1',width=self.w[-1],type="Optical:").put(self.x[-1],self.y[-1],self.A[-1])
nd.Pin(name='opt_b1',width=self.w[-1],type="optical:").put(self.x[-1],self.y[-1],self.A[-1])
else:
raise Exception("ERROR: In <mxpic::structures::Colthoid>, <layer | xs> not defined")