Skip to content
/ go-gds Public

Library to parse GDSII binary files written in Go

License

Notifications You must be signed in to change notification settings

gluek/go-gds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1998ff2 · Aug 16, 2024

History

29 Commits
Aug 12, 2024
Jul 15, 2024
Aug 10, 2024
Aug 16, 2024
Aug 5, 2024
Jul 25, 2024
Jul 29, 2024
Jul 31, 2024
Aug 16, 2024
Aug 16, 2024
Aug 10, 2024
Jul 26, 2024
Aug 16, 2024
Aug 9, 2024
Aug 16, 2024

Repository files navigation

go-gds

go-gds allows for encoding/decoding of Calma GDSII binary files.

Features

  • 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

Missing

  • Functionality to manipulate geometries, paths, labels, cells and layers
  • Entire path starting from geometries to binary

Example

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)

About

Library to parse GDSII binary files written in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages