NAME
Physics::Electrodeposition::GDSII - Dependency-free GDSII (Calma Stream) reader, writer and hierarchy flattener for electrodeposition pattern extraction.
SYNOPSIS
use Physics::Electrodeposition::GDSII;
my $gds = Physics::Electrodeposition::GDSII->new(file => 'mask.gds');
my $poly = $gds->polygons; # flattened, in micrometres
for my $p (@$poly) {
# $p->{layer}, $p->{datatype}, $p->{pts} = [ [x,y], ... ]
}
# write a simple pattern (coordinates in micrometres):
Physics::Electrodeposition::GDSII->write_boundaries('out.gds', [
{ layer => 1, pts => [[0,0],[10,0],[10,10],[0,10]] },
]);
DESCRIPTION
Reads the subset of the GDSII stream format needed to recover a photoresist / plating-mask geometry: units, structures, boundaries, boxes, and cell references (SREF / AREF) which are flattened with full affine transforms. Returned polygon coordinates are in micrometres. A minimal boundary writer is included so tests and examples can synthesise patterns without external tooling.
METHODS
- new(file => $path)
-
Construct and (optionally) read a file.
- read($path)
-
Parse a GDSII file into the object.
- polygons([$cell])
-
Return an arrayref of flattened boundary polygons (micrometres). Defaults to the top-level cell(s).
- top_structures
-
List structures that are not referenced by any SREF/AREF.
- write_boundaries($path, \@polys, %opts)
-
Write boundary polygons (user-unit micrometres) to a GDSII file.