#!/bin/bash
if [ "$1" == "--help" ] ; then
	cat <<EOF
Automatically segment with a simple level based algorithm.
Calculate normals and speedup information and go to rendering mode.
EOF
	exit
fi
ANSWER=$(wish -geometry 0x0 <<EOF
puts stdout [tk_messageBox -default "no" -icon question \
	-message "Achtung - dieses Script wird mehrere Minuten laufen \
		  - Wirklich starten ?" -parent . -title "Quit" \
	-type yesno]
	exit
EOF
)
if [ "$ANSWER" != "yes" ] ; then
	exit
fi
netcat -w 1 localhost 1234 >/dev/null <<EOF
disp 16
gcenter 400
gwidth 800
zoom 1.5
mark 0 65535 0
mark 1000 65535 2
norm 16
layer 0 1
layer 1 1
layer 2 1
layer 3 1
layer 4 1
layer 5 1
layer 6 1
layer 7 1
jump 0
makedist 1
rendermode XYZ
disp 0
EOF
