Thread: Vertex Snap
View Single Post
# 6 26-07-2004 , 01:36 PM
Registered User
Join Date: Jan 2003
Posts: 65
Hi,

Well, I've never found that I want two vertices in the same place, unless they were merged.

If I did want to average them without merging, I'd use this script:
{
// script to average selected vertices
string $list[] = `ls -sl -flatten`;
int $num = `size $list`;
float $avg[];
for ($each in $list) {
float $loc[] = `xform -q -a -ws -t $each`;
$avg[0]+=$loc[0];
$avg[1]+=$loc[1];
$avg[2]+=$loc[2];
}
for ($each in $list)
xform -ws -a -t ($avg[0]/$num) ($avg[1]/$num) ($avg[2]/$num) $each;
}

If I just wanted to one to another, I would use "v", but when the op said "snap two vertices together", I didn't think that's what he meant.

sj