Expand description
Read, edit, and write hierarchical GDSII and OASIS layouts on their original integer grid. Coordinates and widths are in database units. A database unit’s physical size is in meters. The user guides cover Python, file conversion, tool interoperability and benchmarks.
Draw a marked polygon, repeat it at explicit offsets, and write OASIS in memory.
use layouttk::{Element, Format, Layer, Layout, Point, Property, Repetition, write_to};
let mut mask = Layout::new("MASK", 1e-9)?;
mask.add_cell("DIE")?;
let mut contact = Element::Polygon {
layer: Layer { number: 7, datatype: 1 },
points: vec![Point { x: 0, y: 0 }, Point { x: 40, y: 0 }, Point { x: 0, y: 20 }],
};
contact.set_properties(vec![Property::gds(7, b"CONTACT")]);
contact.set_repetition(Some(Repetition::Offsets(vec![
Point { x: -13, y: 27 }, Point { x: 51, y: 8 },
])))?;
mask.add_element("DIE", contact)?;
let mut data = Vec::new();
write_to(&mask, &mut data, Format::Oasis)?;
let restored = layouttk::read_from(data.as_slice(), None)?;
assert_eq!(mask.cells, restored.cells);Modules§
- conversion
- Conversion diagnostics and exact, integer-factor refinement of the database grid.
- file_
workflows - File-level inventory and verification on the integer database grid.
- gds_
tools - Record-level GDSII utilities. Raw cells retain their source database unit and can contain records outside the editable layout profile.
- geometry
- Polygon operations on integer database coordinates. A region is a list of
implicitly closed contours, filled by the nonzero winding rule. Results have
counterclockwise outer boundaries and clockwise holes. Use
fractureto obtain independent filled polygons suitable forcrate::Layout::add_element. - guides
- Guides for working with GDSII and OASIS in Python, Rust, and the terminal.
- hierarchy
- Queries and edits on cell definitions and placed geometry. Array vectors are expressed in the containing cell, before outer transforms.
- paths
- Curves are constructed in continuous database units. Polygon vertices are rounded once, to the nearest DBU (halfway values away from zero).
Structs§
- Array
- Cell
- Layer
- Layer
Name - Layout
- Point
- Property
- Read
Options - Reading policy. The OASIS budget accounts for retained data, separately from decoding buffers.
- Summary
- Table
Properties - Text
Style - Transform
Enums§
- Element
- Error
- Distinguishes malformed data from valid format features outside the supported profile.
- Format
- Grid
Rounding - Policy when a physical length lies between two target grid points.
- Interval
- Path
Ends - Property
Value - Repetition
- Offsets are in the parent coordinate system, relative to the implicit first position.
- Table
Entry - OASIS string table entry that owns one or more properties.
Constants§
Functions§
- check_
write - Exercise the same encoder as a file write, reporting the first error without creating a file.
- read
- read_
from - write
- Finish serialization in the destination directory before replacing the target.
- write_
to