#!/usr/pkg/bin/perl
use strict;
use GDS2;
require "./header.pm";
# ------------------------------------
#   define global variable here
# ------------------------------------
#  Layers
#  10  drawing
#  20 
#  30  500um frame, box_layer
#  50  50 m/m  frame external_frame

my $rate	= 25;	# real size to CP Mask ratio
my $pitch	= 27;	# pitch for each frame

my $L10 	= 10;	# layer 10  drawing layer
my $L20 	= 20;	# layer 20  
my $L30 	= 30;	# layer 30  0.5m/m frame (Structure Guide)
my $L50 	= 50;	# layer 50  50m/m external frame

my $box_layer	= 57;	# layer 57  text labeling
   $box_layer	= $L30;
my $text_layer	= 47;	# layer 47  text labeling
my $text_dot	= 0.01 * $rate;	# layer 57  text labeling


require "./common.pm";
#require "./Triangle.pm";
#require "./Square.pm";
require "./round-track.pm";
#require "./big-circle.pm";
#require "./pillar.pm";
#require "./CP_Area_10.pm";

package main;
sub S1234 ($$$$) {
    my $size = shift;
    my $pitch  = shift;
    my $box_name = shift;
    my $gds2File = shift;

    my $P8 = 8 * $pitch;
    my $S  = 4 * $pitch; # shift (half of pitch)
    $gds2File -> printBgnstr( -name	=> 'S1234');
    $gds2File -> printAref  ( -name	=> $box_name,
			      -rows	=> 2, 
			      -columns	=> 2,
			      -xy	=> [ -$P8 + $S, -$P8 + $S,
					      $P8 + $S, -$P8 + $S,
					     -$P8 + $S,  $P8 + $S],
	);
    
    $gds2File -> printEndstr();
	return 'S1234';
}
# -----------------------------------------------------
#                     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';

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

my $mark_layer = 50;
my $mark_length = 360;

 my $box_name	= common::box(500, $box_layer, $gds2File);
 my $cross_name	= common::cross(0, 0, $mark_length, $L10, $mark_layer, $gds2File);
 my $cross_name_s= common::cross(0, 0,         1, $L10, $mark_layer, $gds2File);
 my $box_2150    = common::box(21.5, $L10, $gds2File);
 my $S1234       = S1234(21.5, 27, $box_2150, $gds2File);

my @TrueCircleList =
         round_track::main($L10, $box_layer, $text_layer, $box_name, $cross_name, $S1234, $gds2File);

$gds2File -> printEndlib ();
__END__
See perldoc GDS2 for help

perl DrieCondPerl
p; please note I have copy in ~/.emacs-sub/time-stamp-setup.el
(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
