1
0
mirror of git://projects.qi-hardware.com/ben-scans.git synced 2025-04-21 12:27:27 +03:00

Initial commit. (~105 MB)

This commit is contained in:
Werner Almesberger
2010-08-03 09:44:59 -03:00
commit 1d82537272
170 changed files with 1265 additions and 0 deletions

14
web/Makefile Normal file
View File

@@ -0,0 +1,14 @@
.PHONY: all upload
all: ../index.html
#
# @@@ upload is obsolete, maybe even unnecessary (TBD)
#
upload: ../index.html
rsync -v --progress * \
werner@host:/home/httpd/almesberger/misc/ben/scan/
../index.html: style.sh index.sh
. ./index.sh >$@ || { rm -f $@; exit 1; }

148
web/index.sh Executable file
View File

@@ -0,0 +1,148 @@
#!/bin/sh
. ./style.sh
cat <<EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<TITLE>Ben NanoNote Case Scans</TITLE>
<BODY>
<H1>Ben NanoNote Case Scans</H1>
There are the following categories of scans:
<UL>
<LI> <A href="#assemblies">Assemblies</A> of multiple case parts, such
as the whole device or one part mounted on another.
<LI> Individual case <A href="#parts">parts</A>.
<LI> High-resolution scans of some <A href="#details">details</A>.
May be replaced in the future by scans of the entire area.
<LI> <A href="#drafts">Draft</A> scans that have some anomalies, e.g.,
areas occluded by other components, and will be redone later.
</UL>
Scans are stored in the following file formats:
PIJ, the binary and proprietary format of Dr.PICZA3 project files,
AutoCAD <A href="http://en.wikipedia.org/wiki/AutoCAD_DXF">DXF</A>,
<A href="http://en.wikipedia.org/wiki/STL_(file_format)">STL</A>,
and the point cloud with comma-separated values.<
PIJ is the native format of the software used to make the scans. STL can
be read by many programs, including
<A href="http://code.google.com/p/heekscad/">HeeksCAD</A> and
<A href="http://meshlab.sourceforge.net/">MeshLab</A>.<P>
High resolution scans can produce a large amount of data.
If a file is 1 MB of bigger, its size is indicated.
EOF
# -----------------------------------------------------------------------------
section assemblies "Assemblies of multiple parts"
scan_set ben-bottom "Complete device. Bottom up."
images3
texts3 "1.5 h" "10 h" "53 h"
scan_set ben-bottom-nobat "Battery and cover removed. Bottom up."
images2
under_consideration
texts3 "4 h" "11.5 h" "53 h"
scan_set ben-top "Complete device. From the top."
planned
planned
under_consideration
texts3 "2 h" "10 h" "53 h"
scan_set ben-lcm-asmbly "LCD module on PCB. Display side."
images3
texts3 "1 h" "3 h" "34 h"
# -----------------------------------------------------------------------------
section parts "Individual parts"
scan_set ben-kbd-top "Keyboard. From the top. Left-to-right scan."
explain_set <<EOF
Note: the soft rubber sheet underneath the keyboard was sometimes bent
by the scanner's needle, leaving what appears to be a ragged edge.
EOF
images3
texts3 "1 h" "5 h" "34 h"
scan_set ben-batcvr-outside "Battery cover. Outside."
images3
texts3 "1.5 h" "3 h" "20 h"
scan_set ben-batcvr-inside "Battery cover. Inside."
images3
texts3 "1.5 h" "5 h" "33.5 h"
scan_set ben-pcb-comp "Main PCB. Component side."
images2
texts2 "2.5 h" "8.5 h"
scan_set ben-dispbase-front "Display shell, base structure. Front side."
explain_set <<EOF
Note: the solvent used to remove the adhesive tape attacked the plastic,
leaving some small dents and deformations.
EOF
images3
texts3 "4 h" "12 h" "58 h"
scan_set ben-dispbase-back "Display shell, base structure. Back side."
images1
in_progress
planned
texts3 "1 h" "4 h" "50 h"
# -----------------------------------------------------------------------------
section details "Detail magnifications"
scan_group
scan_bar
scan_bar
scan_bar
scan_hdr "Main PCB. Rear of speaker."
scan_hdr "Main PCB. Crystals. Component side."
scan_hdr "Main PCB. Buzzer. Component side."
scan_img ben-spkr-rear-100um
scan_img ben-xtal-comp-100um
scan_img ben-buzz-comp-100um
scan_text ben-spkr-rear-100um "5.5 h"
scan_text ben-xtal-comp-100um "1.5 h"
scan_text ben-buzz-comp-100um "6.75 h"
scan_group
scan_bar
scan_bar
scan_hdr "Bottom shell with PCB. Front of speaker."
scan_hdr "Bottom shell with PCB. Central support."
scan_img ben-spkr-front-100um
scan_img ben-pcb-central-support-100um
scan_text ben-spkr-front-100um "11.5 h" \
"Note: I added a 1 mm wedge between the<BR>speaker and the hinge to hold the PCB down."
scan_text ben-pcb-central-support-100um "0.25 h"
# -----------------------------------------------------------------------------
section drafts "Drafts, for later rescan"
scan_set ben-bottom-inside "Bottom shell without battery cover. Inside."
explain_set <<EOF
Note: the arrow in the battery area is from the support structure.<BR>
These scans were made with the display shell attached and therefore don't
show the hinge correctly.
EOF
images2
texts2 "4 h" "14 h"
scan_set ben-bottom-pcb "Bottom shell plus PCB. Keyboard side."
explain_set <<EOF
These scans were made with the display shell attached and therefore don't
show the hinge correctly.
EOF
images2
texts2 "4 h" "11 h"
end

293
web/style.sh Normal file
View File

@@ -0,0 +1,293 @@
#!/bin/sh
# ----- section ---------------------------------------------------------------
section()
{
echo "$__before_set"
__before_set=
cat <<EOF
<P>
<HR>
<P>
<A name="$1">
<H2>$2</H2>
EOF
}
# ----- scan_set / images / texts ---------------------------------------------
scan_set()
{
echo "$__before_set"
__id=$1
__before_set="</TABLE></TABLE>"
__before_image="<TR><TD><TABLE bgcolor="#e4e4e4" border=0 cellspacing=3 cellpadding=2><TR>"
__before_text="<TR>"
cat <<EOF
<P>
<TABLE border=0 cellspacing=0 cellpadding=0>
<TR>
<TD>
<TABLE border=1 cellspacing=0 width="100%">
<TR>
</TABLE>
<TR>
<TD>
<TABLE bgcolor="#fff0a0" border=0 cellspacing=3 cellpadding=2
width="100%">
<TR>
<TD><B>$2</B>
</TABLE>
EOF
}
__do_explain()
{
cat <<EOF
<TABLE bgcolor="#e4e4e4" border=0 cellspacing=3 cellpadding=2 width="100%">
<TR>
<TD>
<TABLE bgcolor="#90ff90" border=0 cellspacing=3 cellpadding=2>
<TR>
<TD><I>
EOF
cat
cat <<EOF
</I>
</TABLE>
</TABLE>
EOF
}
explain_set()
{
cat <<EOF
<TR>
<TD>
EOF
__do_explain
}
__do_before_image()
{
echo "$__before_image"
__before_image=
}
image()
{
__do_before_image
cat <<EOF
<TD><IMG src="data/jpg/$1.jpg">
EOF
}
images1()
{
image "$__id-1mm"
}
images2()
{
images1
image "$__id-500um"
}
images3()
{
images2
image "$__id-100um"
}
under_consideration()
{
__do_before_image
cat <<EOF
<TD><H1>Under consideration</H1>
EOF
}
planned()
{
__do_before_image
cat <<EOF
<TD><H1>Planned</H1>
EOF
}
in_progress()
{
__do_before_image
cat <<EOF
<TD><H1>In progress</H1>
EOF
}
link()
{
[ -r "../$1" ] || return
size=`ls -l ../$1 | awk '{printf $5}'`
if [ $size -lt 950000 ]; then
size="`echo $size | awk '{printf("%.0f kB", $1/1000)}'`"
size=
else
size="`echo $size | awk '{printf("%.1f MB", $1/1000000)}'`"
fi
echo "<A href=\"$1\">$2</A> $size"
}
__text()
{
echo "$__before_text"
__before_text=
echo "<TD>"
cat
link "data/pij/$1.pij.bz2" PIJ
link "data/dxf/$1.dxf.bz2" DXF
link "data/stl/$1.stl.bz2" STL
link "data/csv/$1.txt.bz2" "TXT(CSV)"
}
text()
{
__text "$__id-$1"
}
texts2()
{
text 1mm <<EOF
X/Y step size: 1 mm.<BR>
Z resolution: <B>DRAFT</B><BR>
Approximate scan time: $1<BR>
EOF
text 500um <<EOF
X/Y step size: 500 &mu;m.<BR>
Z resolution: 25 &mu;m.<BR>
Approximate scan time: $2<BR>
EOF
}
texts3()
{
texts2 "$1" "$2"
text 100um <<EOF
X/Y step size: 100 &mu;m.<BR>
Z resolution: 25 &mu;m.<BR>
Approximate scan time: $3<BR>
EOF
}
# ----- scan_group / scan -----------------------------------------------------
scan_group()
{
echo "$__before_set"
__before_set="</TABLE>"
__before_hdr="<TR>"
__before_img="<TR>"
__before_text="<TR>"
cat <<EOF
<P>
<TABLE bgcolor="#e4e4e4" border=0 cellspacing=0 cellpadding=0>
<TR>
EOF
}
scan_bar()
{
cat <<EOF
<TD>
<TABLE border=1 cellspacing=0 width="100%">
<TR>
</TABLE>
EOF
}
scan_hdr()
{
echo "$__before_hdr"
__before_hdr=
cat <<EOF
<TD>
<TABLE bgcolor="#fff0a0" border=0 cellspacing=3 cellpadding=0 width="100%">
<TR>
<TD><B>$1</B>
</TABLE>
EOF
}
scan_img()
{
echo "$__before_img"
__before_img=
cat <<EOF
<TD>
<TABLE border=0 cellspacing=3 cellpadding=0>
<TR>
<TD><IMG src="data/jpg/$1.jpg">
</TABLE>
EOF
}
scan_text()
{
echo "$__before_text"
__before_text=
echo "<TD>"
if [ ! -z "$3" ]; then
echo "$3" | __do_explain
fi
cat <<EOF
<TABLE border=0 cellspacing=3 cellpadding=2>
<TR>
EOF
__text $1 <<EOF
Approximate scan time: $2<BR>
X/Y step size: 100 &mu;m.<BR>
Z resolution: 25 &mu;m.<BR>
EOF
echo "</TABLE>"
}
# ----- end -------------------------------------------------------------------
end()
{
echo "$__before_set"
cat <<EOF
<P>
<HR>
<P>
`date -u '+%F %X'` UTC
</BODY>
</HTML>
EOF
}