source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/vrippack-0.31/src/plytools/mm2plys.tcl @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1# Is there a way to tell readfile not to use .xf files?
2
3# Create a bunch of ply files in a subdirectory
4
5set file [lindex $argv 0]
6set root [file root $file]
7readfile $file
8set dir ${root}_plys
9set res 0
10catch {exec mkdir $dir} msg; puts $msg
11catch {exec chmod 775 $dir} msg; puts $msg
12set mmConfLines [plv_write_mm_for_vrip $res $dir]
13set CONF [open "$dir/vrip.conf" w]
14foreach bmesh $mmConfLines {
15   puts $CONF $bmesh
16}
17close $CONF
18
19catch {chdir $dir} msg
20
21# Vrip all the files at 7 resolutions
22
23puts ""
24
25
26puts -nonewline "\rMerging at 0.25mm...   "
27flush stdout
28exec vripnew temp.vri vrip.conf vrip.conf 0.25 -rampscale 625 -use_bigger_bbox
29exec vripsurf temp.vri temp.ply
30exec mv temp.ply 0.25mm.ply
31
32puts -nonewline "\rMerging at 0.5mm...   "
33flush stdout
34exec vripnew temp.vri vrip.conf vrip.conf 0.5 -rampscale 1250 -use_bigger_bbox
35exec vripsurf temp.vri temp.ply
36exec mv temp.ply 0.5mm.ply
37
38puts -nonewline "\rMerging at 1mm...   "
39flush stdout
40exec vripnew temp.vri vrip.conf vrip.conf 1 -rampscale 2500 -use_bigger_bbox
41exec vripsurf temp.vri temp.ply
42exec mv temp.ply 1mm.ply
43
44puts -nonewline "\rMerging at 2mm...   "
45flush stdout
46exec vripnew temp.vri vrip.conf vrip.conf 2 -rampscale 5000 -use_bigger_bbox
47exec vripsurf temp.vri temp.ply
48exec mv temp.ply 2mm.ply
49
50puts -nonewline "\rMerging at 4mm...   "
51flush stdout
52exec vripnew temp.vri vrip.conf vrip.conf 4 -rampscale 10000 -use_bigger_bbox
53exec vripsurf temp.vri temp.ply
54exec mv temp.ply 4mm.ply
55
56puts -nonewline "\rMerging at 8mm...   "
57flush stdout
58exec vripnew temp.vri vrip.conf vrip.conf 8 -rampscale 20000 -use_bigger_bbox
59exec vripsurf temp.vri temp.ply
60exec mv temp.ply 8mm.ply
61
62puts -nonewline "\rMerging at 16mm...   "
63flush stdout
64exec vripnew temp.vri vrip.conf vrip.conf 16 -rampscale 40000 -use_bigger_bbox
65exec vripsurf temp.vri temp.ply
66exec mv temp.ply 16mm.ply
67
68puts ""
69
70#Create the sets
71
72
73set cmd "exec rm temp.vri vrip.conf [glob ${root}*ply]"
74catch {eval $cmd} msg
75
76catch {chdir ..} msg
77
78set cmd "exec plys2set -no_dir_strip -no_xform ${root}.set [glob ${dir}/*mm.ply]"
79puts $cmd
80catch {eval $cmd} msg
81
82exit
83
Note: See TracBrowser for help on using the repository browser.