GDSII manipulation, written in rust.
Warning
This is a work in progress and is not yet ready for production use.
gdsr is currently being repurposed to being a rust crate at the core. Python bindings will be added back in the future.
My main inspiration comes from gdstk. If you are looking for an extremely fast gds manipulation python package then i would strongly recommend heading over and having a look at his work.
Other inspirations include:
A simple program below shows the easy to use interface.
use gdsr::{Cell, Grid, Library, Point, Polygon, Reference};
fn main() {
let units = 1e-9;
let mut library = Library::new("main");
let mut cell = Cell::new("main_cell");
let polygon = Polygon::new(
[
Point::integer(0, 0, units),
Point::integer(1, 0, units),
Point::integer(1, 1, units),
Point::integer(0, 1, units),
],
1,
0,
);
let reference = Reference::new(polygon).with_grid(
Grid::default()
.with_columns(5)
.with_rows(5)
.with_spacing_x(Some(Point::integer(2, 0, units)))
.with_spacing_y(Some(Point::integer(0, 2, units))),
);
cell.add(reference);
library.add_cell(cell);
library.write_file("main.gds", 1e-9, 1e-9).unwrap();
}This gives us the following GDS file:
seal's documentation is available at matthewmckee4.github.io/gdsr
Head over to the discussions page and create a new discussion there or have a look at the issues page to see if anyone has had the same issue as you.
Contributions are welcome! Please see the contributing guide for more information.
gdsr is licensed under the MIT License.
