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

Hello-World

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

require './text2gds.pm';		# 文字を描く
# ---------------------------------
#     文字を直接 x, y 座標に置く
# text2gds::text_flat(x, y, Layer, Dot size,  Text, FileHandle);
# -----------------------------------------

# ---------------------------------
our @ARGS;
our %opts;

my($VERSION);
$VERSION = "2019-07-15 09:35" ; # written by emacs time-stamp
## --------------------------------------------
##          M A I N  R O U T I N E 
## --------------------------------------------
my ($gds2File);

my $filename = $0;
   $filename =~ s/\.txt$//;                     # ---  Strip '.txt' part
   $filename .= '.gds';

print 'output name: '. $filename, "\n";

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

my $x		=   0;
my $y		=   0;
my $layer	=  10;
my $dot_size    =  0.8;

$gds2File -> printBgnstr( -name=> 'hello-world');

text2gds::text_flat($x, $y,                  $layer, $dot_size, 'Hello', $gds2File);
text2gds::text_flat($x, $y - $dot_size * 11, $layer, $dot_size, 'World!', $gds2File);

 $gds2File -> printEndstr;    

 $gds2File -> printEndlib(); 

__END__
(ここから下は、 Perl は読みません)
(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