Closed Rishabhgoyal07 closed 7 months ago
Can you share your script? Note that gdstk does not add dependencies by default when adding a cell to a library, you have to manually add all your cells or do something like:
library.add(main_cell, *main_cell.dependencies())
import gdstk
def abutment(file1,file2):
lib1 = gdstk.read_gds(file1)
lib2 = gdstk.read_gds(file2)
info1 = gdstk.gds_info(file1)
print(info1)
inst1 = lib1.cells[0]
inst2 = lib2.cells[0]
lib3 = gdstk.Library()
# lib3.add(inst1)
# lib3.add(inst2)
ref = gdstk.Reference(inst1)
ref1 = gdstk.Reference(inst2,(5,5))
inst3 = lib3.new_cell("inst3")
inst3.add(ref)
inst3.add(ref1)
lib3.write_gds("output.gds")
abutment("inverter1.gds","inverter.gds")
This is my script, it is executing successfully but in the output it is showing nothing in the klayout, while I want to see the two cells which I referenced and added to inst3.
I am using gdstk.Reference() function to abut two cells side by side, and saving them into a cell, then adding the cell into a library, then finally saving the library as gds file, but it is not giving the abutted two cells as the output, infact it is showing nothing when viewed in klayout.