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 "inscribe_polygon.txt")

inscribe_polygon

#!/usr/bin/perl
use strict;
use GDS2;

require './inscribe_polygon.pm';			#	please download this too
## ----------------------------------------------------

##  Sample program to test inscribe_polygon.pm package

my($VERSION);
$VERSION = "2019-09-13 02:32" ; # written by emacs time-stamp
## ----------------------------------------------------
##	    M A I N  R O U T I N E 
## ----------------------------------------------------
							
my $filename = $0;				# ---  set filename with the same as this script
   $filename =~ s/\.txt$//;			# ---  Strip '.txt' part
						#      単に dot(.) と書くと、「何でも文字一つ」にー致するので、						      #	     $ は行末を意味します

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

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

my @LIST;
# -----------------------------------------------------
#  generate structure and collect the name of them
# -----------------------------------------------------
push (@LIST, inscribe::inscribe_polygon(15, 0.1,  $gds2File));
push (@LIST, inscribe::inscribe_polygon(12, 1.5,  $gds2File));
push (@LIST, inscribe::inscribe_polygon( 8, 2,	  $gds2File));
push (@LIST, inscribe::inscribe_polygon( 8, 0.6,    $gds2File));
push (@LIST, inscribe::inscribe_polygon( 0.44, 0.025,	 $gds2File));
push (@LIST, inscribe::inscribe_polygon( 0.50, 0.010,	 $gds2File));
push (@LIST, inscribe::inscribe_polygon( 0.75, 0.050,	 $gds2File));

# --------------------------------------------------------
#   place collected structure on to top with the pitch 20
# -------------------------------------------------------
$gds2File -> printBgnstr( -name => 'top');
foreach my $i (0..$#LIST){
    $gds2File -> printSref (-name => $LIST[$i], -xy => [0, 20 * $i]);
}
$gds2File -> printEndstr();

$gds2File -> printEndlib();
__END__
Last Update: Mon, 21 Feb 2022 10:13:01 GMT 1.66 2008/03/08