Download (as "sample-arc.txt") sample-arc
#!/usr/bin/perl -w
use GDS2;
use strict;
require './arc.pm'; # 円弧座標(の組)を計算して返す
# ---------------------------------
# arc::arc(中心 x, 中心 y, 開始角, 終了角, 半径, 頂点の数,
# 'not-used', 時計回り(-1) or 反時計回り(1) )
# ---------------------------------
our @ARGS;
our %opts;
my($VERSION);
$VERSION = "2019-07-15 09:03" ; # written by emacs time-stamp
## --------------------------------------------
## M A I N R O U T I N E
## --------------------------------------------
my ($gds2File);
my ($X) = 0; # constant (MACRO)
my ($Y) = 1; # ditto
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 $start = 0; # in degree
my $end = 90; # in degree
my $radius = 9.5 / 2; # in micron
my $width = 1; # in micron
my $polygon = 24;
my $not_used = '' ;
my $direction = 1; # CCW(1), CW(-1)
my @INNER =
arc::arc( $x, $y, $start, $end, $radius - $width/2, $polygon, $not_used, $direction);
$direction = -1; # CCW(1), CW(-1)
my @OUTER =
arc::arc( $x, $y, $start, $end, $radius + $width/2, $polygon, $not_used, $direction);
$gds2File -> printBgnstr( -name=> 'sample-arc');
$gds2File -> printBoundary (
-xy =>
[
@INNER,
@OUTER,
]);
$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
|