From 03e1f06de099ccc242aa4892a32a71fce67296e1 Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 24 Jul 2004 18:03:04 +0000 Subject: [PATCH] registration marks --- layout/layout | 28 +++++++++++++++++++++++++--- pcb/Makefile | 4 +++- pic.make | 4 +++- spice/Makefile | 4 +++- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/layout/layout b/layout/layout index d67a6f7..1daf5e8 100755 --- a/layout/layout +++ b/layout/layout @@ -1294,7 +1294,7 @@ if ($page_x || $page_y) { " 30 30 moveto (${page_x}x${page_y}) show\n" or die $!; } - + print " -$ps_page_xmul $page_x mul -$ps_page_ymul $page_y mul translate\n". " $ptscale $ptscale scale\n" @@ -1325,8 +1325,6 @@ while (<>) { cmd__one(); } -oflushpage(); - { my ($min_x, $max_x, $min_y, $max_y) = bbox($ctx->{Loc}); my ($bboxstr); @@ -1341,4 +1339,28 @@ oflushpage(); if (!$quiet) { print STDERR $bboxstr; } $bboxstr =~ s/^/\%L bbox /mg; print $bboxstr or die $!; + + if ($scale < 1.5) { + my ($tick_x, $tick_y, $ticklen); + $ticklen= 10; + printf(" gsave 0.5 setgray 1 setlinewidth\n". + " /regmark {\n". + " newpath moveto\n". + " -%d 0 rmoveto %d 0 rlineto\n". + " -%d -%d rmoveto 0 %d rlineto stroke\n". + " } def\n", + $ticklen, $ticklen*2, $ticklen, $ticklen, $ticklen*2) + or die $!; + for ($tick_x= $min_x; $tick_x < $max_x; $tick_x += 150) { + for ($tick_y= $min_y; $tick_y < $max_y; $tick_y += 150) { + printf(" %f %f regmark\n", + $tick_x, $tick_y) + or die $!; + } + } + printf(" grestore\n") + or die $!; + } } + +oflushpage(); diff --git a/pcb/Makefile b/pcb/Makefile index 9fe3d14..90f57c0 100644 --- a/pcb/Makefile +++ b/pcb/Makefile @@ -80,5 +80,7 @@ parts.ps: showlib.d4 layout ./layout <$< $(LAYOUTOPTS_ALL) $o clean: - -rm -f -- *.d4 *.ps farn.* *~ + -rm -f -- *.d4 *.ps farn.* *~ *.new -rm -f bulkres-*.partlist bulkres-items.suggest *.bom + -rm -f t,*.gnuplot-data t,*.gnuplot-cmd t,gnuplot-fifo + -rm -f t,gnuplots.sh diff --git a/pic.make b/pic.make index 9fe3d14..90f57c0 100644 --- a/pic.make +++ b/pic.make @@ -80,5 +80,7 @@ parts.ps: showlib.d4 layout ./layout <$< $(LAYOUTOPTS_ALL) $o clean: - -rm -f -- *.d4 *.ps farn.* *~ + -rm -f -- *.d4 *.ps farn.* *~ *.new -rm -f bulkres-*.partlist bulkres-items.suggest *.bom + -rm -f t,*.gnuplot-data t,*.gnuplot-cmd t,gnuplot-fifo + -rm -f t,gnuplots.sh diff --git a/spice/Makefile b/spice/Makefile index 9fe3d14..90f57c0 100644 --- a/spice/Makefile +++ b/spice/Makefile @@ -80,5 +80,7 @@ parts.ps: showlib.d4 layout ./layout <$< $(LAYOUTOPTS_ALL) $o clean: - -rm -f -- *.d4 *.ps farn.* *~ + -rm -f -- *.d4 *.ps farn.* *~ *.new -rm -f bulkres-*.partlist bulkres-items.suggest *.bom + -rm -f t,*.gnuplot-data t,*.gnuplot-cmd t,gnuplot-fifo + -rm -f t,gnuplots.sh -- 2.30.2