Home › Forums › Nazca › Questions and Answers › Circular array of a cell from a gds file – how to do it? › Reply To: Circular array of a cell from a gds file – how to do it?
21 April 2020 at 22:54
#6105
Ronald
Keymaster
Dear Cameron,
GDS natively supports arrays on cell instances that span two vectors (dx1, dy1) and (dx2, dy2), not circles. For a circular array you have to place cells simply on a circle.
from math import sin, cos, pi
import nazca as nd
cell = nd.load_gds(filename="my.gds", cellname="my_cell_name")
with nd.Cell('circle') as C:
N = 20
radius = 500
for i in range(N):
cell.put(radius*cos(i*2*pi/N), radius*sin(i*2*pi/N), 0)
C.put()
nd.export_gds()
For a native cell array check out the gds arrays tutorial.
Ronald