Index: work/doc/distalign/README.txt
===================================================================
--- work/doc/distalign/README.txt (nonexistent)
+++ work/doc/distalign/README.txt (revision 17624)
@@ -0,0 +1,5 @@
+The objective is a web page of examples "align-examples.html" of the pcb-rnd actions "align" and "distribute".
+
+The file "aligntests.txt" contains the tests which is probably not all inclusive, but is close. If this file is edited,
+a new "align-examples.html" webpage can be created with "make"
+
Index: work/doc/distalign/align-examples.html
===================================================================
--- work/doc/distalign/align-examples.html (nonexistent)
+++ work/doc/distalign/align-examples.html (revision 17624)
@@ -0,0 +1,110 @@
+
+
+
+
+
+ Click Image to Enlarge |
+
+
+ Align-X-Centers-Average-Gridless |
+ Align-X-Centers-First-Gridless |
+ Align-X-Centers-Last-Gridless |
+
+ Align-X-Centers-pcb_crosshair-Gridless |
+ Align-X-Lefts-Average-Gridless |
+ Align-X-Lefts-First-Gridless |
+
+ Align-X-Lefts-Last-Gridless |
+ Align-X-Lefts-pcb_crosshair-Gridless |
+ Align-X-Marks-Average-Gridless |
+
+ Align-X-Marks-First-Gridless |
+ Align-X-Marks-Last-Gridless |
+ Align-X-Marks-pcb_crosshair-Gridless |
+
+ Align-X-Rights-Average-Gridless |
+ Align-X-Rights-First-Gridless |
+ Align-X-Rights-Last-Gridless |
+
+ Align-X-Rights-pcb_crosshair-Gridless |
+ Align-Y-Bottoms-Average-Gridless |
+ Align-Y-Bottoms-First-Gridless |
+
+ Align-Y-Bottoms-Last-Gridless |
+ Align-Y-Bottoms-pcb_crosshair-Gridless |
+ Align-Y-Tops-Average-Gridless |
+
+ Align-Y-Tops-First-Gridless |
+ Align-Y-Tops-Last-Gridless |
+ Align-Y-Tops-pcb_crosshair-Gridless |
+
+ Distribute-X-Gaps-First-Last |
+ Distribute-X-Gaps-Last-First |
+ Distribute-X-Gaps-pcb_crosshair-Last |
+
+ Distribute-X-Lefts-First-Last |
+ Distribute-X-Lefts-Last-First |
+ Distribute-X-Lefts-pcb_crosshair-First |
+
+ Distribute-X-Lefts-pcb_crosshair-Last |
+ Distribute-X-Rights-First-Last |
+ Distribute-X-Rights-Last-First |
+
+ Distribute-X-Rights-pcb_crosshair-First |
+ Distribute-X-Rights-pcb_crosshair-Last |
+ distribute-Y-Bottoms-First-Last |
+
+ distribute-Y-Bottoms-Last-First |
+ distribute-Y-Centers-First-Last |
+ distribute-Y-Centers-Last-First |
+
+ distribute-Y-Marks-First-Last |
+ distribute-Y-Marks-Last-First |
+ distribute-Y-Tops-First-Last |
+
+ distribute-Y-Tops-Last-First |
+ Dist-X-Centers- |
+ Dist-X-Gaps-pcb_crosshair |
+
+ Dist-X-Lefts-Average |
+ Dist-X-Lefts- |
+ Dist-X-Marks- |
+
+ Dist-X |
+ Dist-X-Rights-Last |
+ Dist-X-Rights- |
+
+ Dist-Y-Bottoms-Last |
+ Dist-Y-Centers-Last |
+ Dist-Y-Gaps-Last |
+
+ Dist-Y-Marks-Last |
+ Dist-Y |
+
+
+
Index: work/doc/distalign/align-images.sh
===================================================================
--- work/doc/distalign/align-images.sh (nonexistent)
+++ work/doc/distalign/align-images.sh (revision 17624)
@@ -0,0 +1,93 @@
+#!/usr/bin/env bash
+TMPFILE="/tmp/${0##*/}-$$" && touch "$TMPFILE"
+TMPLHT="/tmp/${0##*/}-$$.lht" && touch "$TMPLHT"
+# PURPOSE: create a PNG image for most Align test cases.
+# i.e., Align(X Lefts First Gridless)
+# Using gridless for Align because alignment on grid can sometimes skew result
+# NOTE: Gridless currently not working in pcb-rnd for Distribute
+#
+#-------align-tests--------------------
+# Align(X, [Lefts/Rights/Centers/Marks, [First/Last/pcb_crosshair/Average[, Gridless]]])
+# Align(Y, [Tops/Bottoms/Centers/Marks, [First/Last/pcb_crosshair/Average[, Gridless]]])
+#
+# X or Y - Select which axis will move, other is untouched.
+# Lefts, Rights,
+# Tops, Bottoms,
+# Centers, Marks - Pick alignment point within each subcircuit
+# First, Last,
+# pcb_crosshair,
+# Average - Alignment reference, First=Topmost/Leftmost,
+# Last=Bottommost/Rightmost, Average or pcb_crosshair point
+# Gridless - Do not force results to align to prevailing grid.
+#
+# Defaults are Marks, First.
+#--------distribution-tests------------
+# Distribute(X, [Lefts/Rights/Centers/Marks/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
+# Distribute(Y, [Tops/Bottoms/Centers/Marks/Gaps, [First/Last/pcb_crosshair, First/Last/pcb_crosshair[, Gridless]]])
+#
+# As with align, plus:
+#
+# Gaps - Make gaps even rather than spreading points evenly.
+# First, Last,
+# pcb_crosshair - Two arguments specifying both ends of the distribution,
+# they can't both be the same.
+#
+# Defaults are Marks, First, Last
+#
+# Distributed subcircuits always retain the same relative order they had
+# before they were distributed.
+#-------------------
+#
+while read l; do
+ for i in $l; do
+ ARGS[${#ARGS[*]}]=$i
+ done
+
+ # get length of array
+ iLENGTH=${#ARGS[@]}
+ sACTION=${ARGS[0]}
+ sDIR=${ARGS[1]}
+
+ if [ ${iLENGTH} -eq 2 ]; then
+ SEDTXT=${sDIR}
+ FNTXT=Dist-${sDIR}.png
+ fi
+ if [ ${iLENGTH} -gt 2 ]; then
+ sMODE=${ARGS[2]}
+ SEDTXT=${sDIR},${sMODE},${sSTART}
+ FNTXT=Dist-${sDIR}-${sMODE}-${sSTART}.png
+ fi
+ if [ ${iLENGTH} -gt 3 ]; then
+ sSTART=${ARGS[3]}
+ sSTOP=${ARGS[4]}
+ SEDTXT=${sDIR},${sMODE},${sSTART},${sSTOP}
+ FNTXT=${sACTION}-${sDIR}-${sMODE}-${sSTART}-${sSTOP}.png
+ fi
+
+ if [ -t 1 ] ; then
+ echo -n "." # Doing something feedback to user IF stdout is a terminal
+ fi
+
+ # Output first static section of command
+ echo -n "LoadFrom(layout,$TMPLHT) Cursor(Warp,50,-50,board) Select(All) " >$TMPFILE
+ sed s/ALIGN-TEST/${sACTION}\(${SEDTXT}\)/ align.lht >$TMPLHT
+ # Output first arg
+ echo -n " ${sACTION}(" >>$TMPFILE
+ # use for loop read all ARGS from 1 to max
+ for (( i=1; i<${iLENGTH}; i++ ));
+ do
+ echo -n ${ARGS[$i]} >>$TMPFILE
+ if [ $i -eq $((${iLENGTH}-1)) ]; then
+ echo -n ") " >>$TMPFILE
+ # Output remaining static section of command
+ echo "Export(png, --outfile, alignpix/${FNTXT}, --photo-mode, --dpi, 300) Quit" >>$TMPFILE
+ else
+ echo -n "," >>$TMPFILE
+ fi
+ done
+ unset ARGS
+ cat $TMPFILE | pcb-rnd -c rc/quiet=1 --gui batch ;
+ rm -f $TMPFILE
+done < aligntests.txt
+rm -f $TMPLHT
+echo
Property changes on: work/doc/distalign/align-images.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: work/doc/distalign/align-mkhtml.sh
===================================================================
--- work/doc/distalign/align-mkhtml.sh (nonexistent)
+++ work/doc/distalign/align-mkhtml.sh (revision 17624)
@@ -0,0 +1,74 @@
+#!/usr/bin/bash
+#
+ALIGNHTML=align-examples.html
+
+prefix ()
+{
+cat > ${ALIGNHTML} <