kopia lustrzana https://github.com/fellesverkstedet/fabmodules
43 wiersze
662 B
Bash
Executable File
43 wiersze
662 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# cad_view
|
|
# view .cad
|
|
#
|
|
# Neil Gershenfeld
|
|
# CBA MIT 10/27/10
|
|
#
|
|
# (c) Massachusetts Institute of Technology 2010
|
|
# Permission granted for experimental and personal use;
|
|
# license for commercial sale available from MIT.
|
|
#
|
|
|
|
viewer="eog"
|
|
|
|
#
|
|
# check command line
|
|
#
|
|
if [ $# -eq 0 ]; then
|
|
echo "command line: cad_view in.cad [args]"
|
|
echo " in.cad = input .cad file"
|
|
echo " args = math_png arguments (optional)"
|
|
echo " image viewer = " $viewer
|
|
exit
|
|
fi
|
|
|
|
#
|
|
# convert to math string
|
|
#
|
|
name=$1
|
|
cad_math $name ${name%.*}.math
|
|
|
|
#
|
|
# convert to PNG
|
|
#
|
|
shift
|
|
math_png ${name%.*}.math ${name%.*}.png $@
|
|
|
|
#
|
|
# view
|
|
#
|
|
$viewer ${name%.*}.png
|