Perl で gdsii
実行環境
  Active Perl
     更新するには
ppm
  ppm
  DownLoad
  実行
Help
   perldoc GDS2
Examples
  basic-lines
  simple
  simple-sref
  aref
  circle
  circle-inverted
  sample-arc
  donut
  Inverted-Donuts
  Donuts_Combination
  Hello-World
  CP-array
  text2gds.pm
  rotate.pm
  rotate-rectangle
  arc.pm
  line-and-space-180
  triangle-array-nega
  sq_sleeve.pm
  TriangleGridStep
  triangle-array-nega-CP
  CirclesArray-SQ
  LargeCircles
  MA6-Alignment-mark.pm
  Alignment-Place
  Triangle-Grid
  Triangle-Grid-Wide
  ellipsis-polygons
  inscribe_polygon
  inscribe_polygon.pm
  inscribe_polygon-ellipsis.pm
  sleeving-by-square-sample
  sleeving-by-square.pm

Perl Perl/GDSII page
Download (as "triangle-array-nega-CP.txt")

triangle-array-nega-CP

#!/usr/pkg/bin/perl
use strict;
use GDS2;
require './arc.pm';
require './sq_sleeve.pm';
# global variable;
my $R3	= 1.7320508;

sub unit($$$) {
    my $pitch    = shift;
    my $diameter = shift;
    my $gds2File = shift;

    my $P	= $pitch;
    my $R	= $diameter / 2 + 0.1/2;  # make it 50nm smaller
    
    my $U	= $R3/2 * $P;

    foreach my $angle ( 0, 90, 180, 270) {
       sq_sleeve::arcCP(          0,   0, $angle, $angle + 90,  5, 0.1, 19, 0, $gds2File);
    }
    $gds2File -> printBgnstr(-name => 'unit');

    my @ARC1 = arc::arc(           -0.5 * $P,  $U, 270, 360, $R, 12, 'not-used',  1, $gds2File);
    $gds2File -> printSref(-xy => [-0.5 * $P,  $U,], -name => '100nm-5deg-19um-A270');

    my @ARC2 = arc::arc(            0.5 * $P,  $U, 180, 270, $R, 12, 'not-used',  1, $gds2File);
    $gds2File -> printSref(-xy => [ 0.5 * $P,  $U,], -name => '100nm-5deg-19um-A180');

    my @ARC3 = arc::arc(            0,         0,    0, 180, $R, 24, 'not-used',  1, $gds2File);
    $gds2File -> printSref(-xy => [ 0,         0, ], -name => '100nm-5deg-19um-A000');
    $gds2File -> printSref(-xy => [ 0,         0, ], -name => '100nm-5deg-19um-A090');

    my @ARC4 = arc::arc(            0,         0,  180, 360, $R, 24, 'not-used',  1, $gds2File);
    $gds2File -> printSref(-xy => [ 0,         0, ], -name => '100nm-5deg-19um-A180');
    $gds2File -> printSref(-xy => [ 0,         0, ], -name => '100nm-5deg-19um-A270');

    my @ARC5 = arc::arc(            0.5 * $P,  -$U, 90, 180, $R, 12, 'not-used',  1, $gds2File);    
    $gds2File -> printSref(-xy => [ 0.5 * $P,  -$U], -name => '100nm-5deg-19um-A090');

    my @ARC6 = arc::arc(           -0.5 * $P,  -$U,  0,  90, $R, 12, 'not-used',  1, $gds2File);
    $gds2File -> printSref(-xy => [-0.5 * $P,  -$U], -name => '100nm-5deg-19um-A000');

    $gds2File -> printBoundary(
	-xy => [ -$P/2, 0,
		 @ARC1,
		 @ARC2,
		 $P/2, 0,
		 @ARC3,
		 @ARC4,
		 $P/2, 0,
		 @ARC5,
		 @ARC6,
	]);

    $gds2File -> printEndstr();
#    sq_sleeve::arcCP(-0.5 * $P, -0.5 * $P * 1.732, 270, 360, 5, 0.1, 19, $gds2File);

}
# -----------------------------------------------------
#                     M A I N 
# -----------------------------------------------------
my $filename = $0;
   $filename =~ s/\.txt$//;
   $filename .= '.gds';

my($VERSION);
$VERSION = "2018-11-01 01:20" ; # written by emacs time-stamp
## $VERSION .= ' UTC';

my $gds2File = new GDS2(-fileName => '>'. $filename);
$gds2File -> printInitLib(-name => 'array');

my $span    = 24000;
   $span    = 21 * 128;  # make it multiple of 32, => 2,688um x 9 => 24 mm
my $pitch   = 21;
my $pitch_v   = $pitch * $R3;
my $diameter  = 19;
#  ---------------------------------------------------------------------
#         prepare CP structure ( by 1 degree step, with layer 1 and 2)
#  ----------------------------------------------------------------------
foreach my $i    ( 0..17 ) {
	sq_sleeve::SqSIPHA(100, $i* 5, $gds2File);
    };

unit($pitch, $diameter, $gds2File);

my $columns = int($span / $pitch);
my $rows    = int($span / $pitch_v);

my $span_x  = $columns * $pitch;
my $span_y  = $rows    * $pitch_v;

if (1) {
$gds2File -> printBgnstr (-name =>'top');
$gds2File -> printAref(
    -name => 'unit',
    -columns => $columns,
    -rows    => $rows,
    -xy      => [ -$span_x / 2,  -$span_y / 2,
		   $span_x / 2,  -$span_y / 2,
		  -$span_x / 2,   $span_y / 2,
		  ],
    );
$gds2File -> printEndstr ();
}
$gds2File -> printEndlib();

__END__
See perldoc GDS2 for help

perl DrieCondPerl
; please note I have copy in ~/.emacs-sub/time-stamp-setup.el
(reuiqre 'time-stamp)
(add-hook 'write-file-hooks 'time-stamp)
(setq time-stamp-active t)
;; (setq time-stamp-time-zone "UTC")
(setq time-stamp-time-zone nil)
(setq time-stamp-format "%04y-%02m-%02d %02H:%02M");
(setq time-stamp-start "$VERSION = \"") ;
(setq time-stamp-end "\"") ;
(setq time-stamp-line-limit 20) ; ; default is 8
Last Update: Mon, 21 Feb 2022 10:13:01 GMT 1.66 2008/03/08