NAME
Physics::Etch::GDSII - minimal GDSII stream reader / writer
SYNOPSIS
use Physics::Etch::GDSII;
# write a layout (coordinates in user units, default micron)
my $g = Physics::Etch::GDSII->new( libname => 'MASK' );
$g->add_rectangle( 'TOP', layer => 1, x => 0, y => 0,
width => 2, height => 10 ); # a 2 um line
$g->add_sref( 'TOP', sname => 'CELL', x => 20, y => 0, angle => 90 );
$g->write('mask.gds');
# read it back and flatten to absolute polygons on layer 1 (meters)
my $in = Physics::Etch::GDSII->read('mask.gds');
my @polys = $in->polygons( layer => 1, unit => 'um' );
DESCRIPTION
A self-contained GDSII implementation (no CPAN dependency). It handles the records required to describe mask geometry and can flatten SREF/AREF cell hierarchies - applying reflection, magnification, rotation and translation - into a flat list of polygons on a chosen layer. Includes the non-IEEE GDSII 8-byte real codec used by the UNITS record.
Polygon coordinates can be returned in database units (db), meters (m, default), microns (um) or nanometres (nm).