heitzmann / gdspy

Python module for creating GDSII stream files, usually CAD layouts.
Boost Software License 1.0
352 stars 128 forks source link

any way to reduce the gds file size #217

Closed jamesvitali closed 2 years ago

jamesvitali commented 2 years ago

The size of gds is too big that is over 10G , is any compressed method to reduce the size? thanks

tvt173 commented 2 years ago

for a gds that already exists, you can zip it (many programs can open compressed gds files as-is) or convert to oasis format (klayout can do this for you). if you're making a gds from scratch, try making better use of hierarchy. that's typically the best way to keep gds file size down, when possible

jamesvitali commented 2 years ago

thanks for your suggestion, so if from scratch, that means I need to find the smallest unit that has the same pattern to construct the gds, is that correct

tvt173 commented 2 years ago

yes, exactly... build Cells and construct them hierarchically with CellReferences

jamesvitali commented 2 years ago

thanks @tvt173 any tool or method you know can help to get the similar pattern if I have a large array?

tvt173 commented 2 years ago

yeah, use a CellArray

jamesvitali commented 2 years ago

let's say that i have a big array and I don't know what pattern it has. But need to reduce the file size. Per our discussion, I need to find the similar pattern out and construct them hierarchically with CellReferences. but any tool or method I can use to find the pattern from the array?