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 "sleeving-by-square-sample.txt")

sleeving-by-square-sample

#!/usr/pkg/bin/perl
use strict;
use warnings;
use GDS2;
require './6259.sleeving-by-square.pm';

my($VERSION);
$VERSION = "2020-04-07 11:50" ; # written by emacs time-stamp

sub main {
## ----------------------------------------------------
##          M A I N  R O U T I N E 
## ----------------------------------------------------
                                                        
my $filename = $0;                              # ---  set filename with the same as this script
   $filename =~ s/^[0-9]+\.//;
   $filename =~ s/\.txt$//;                     # ---  Strip '.txt' part
                                                #     

my $gds_name = sprintf("%s.gds", $filename);
my $gds2File = new GDS2(-fileName=> '>'. $gds_name);

$gds2File -> printInitLib(-name=>'LibraryName');

foreach my $angle_index (0..17) {
    sleeving::SqSIPHA({-size =>100, -angle => $angle_index * 5, -layer => 13, -gds2File => $gds2File});
 }

my @LIST;

my $unit = sleeving::sleeving({ -size=>0.750, -pitch => 0.4,   -gds2File => $gds2File});

my $span = 2560;
$gds2File -> printBgnstr( -name => 'top');
$gds2File -> printAref( -name => $unit,
			-columns => $span/2,
			-rows => $span/2,
			-xy => [ -$span/2, -$span/2,
				  $span/2, -$span/2,
				 -$span/2,  $span/2]); 

$gds2File -> printEndstr();

$gds2File -> printBgnstr( -name => 'sample-2x2');

$gds2File -> printAref( -name => 'top',
			-columns => 2,
			-rows => 2,
			-xy => [ -$span * 0.5,  -$span * 0.5,
				  $span * 1.5,  -$span * 0.5,
				 -$span * 0.5,   $span * 1.5]); 

$gds2File -> printPath ( -xy => [-100, 0,    100,     0],       -layer =>20);
$gds2File -> printPath ( -xy => [      0,   -100,     0,  100], -layer =>20);

$gds2File -> printEndstr();
$gds2File -> printEndlib();
}
main ()
__END__
(require '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