go-gds allows for encoding/decoding of Calma GDSII binary files.
- Decoding binary files to go types
- Encoding go types to binary
- High-level api functions to extract geometries, labels and paths, separated into cells and layers
- Functionality to manipulate geometries, paths, labels, cells and layers
- Entire path starting from geometries to binary
fh, err := os.Open("mygds.gds")
if err != nil {
log.Printf("could not open test gds file: %v", err)
}
defer fh.Close()
library, err := ReadGDS(fh)
if err != nil {
log.Printf("could not parse gds file: %v", err)
}
// Prints basic library information, cells and contained elements
fmt.Print(library)
// Returns map of layer/datatype -> polygons for specified cell
layermap, err := library.GetLayermapPolygons("mycell")
if err != nil {
log.Printf("could not extract layermap polygons: %v", %v)
}
// Show layers and polygons
fmt.Print(layermap)