PDA

View Full Version : snap to vertex on axis


may99
10-03-2004, 07:43 AM
hallo is in moddo possibe snap to vertex.. i know it is but i want to do it in specific way... sellect bunch ov vertices... choose achix ant then snap them to vertex on the same model so all of them will be in line with that vertex ?

without using any bacgorund stuff

zeebit
10-03-2004, 08:42 PM
my understanding is that this can't be done in an intuitive fashion.
the best you can do is "set value".
this will line the selection explicitly to a point in space along a certain axis.
so you could find out what the target vert's x value is, as an example.
then you select the verts you want to move and go to "set value". then type in the x value of the target vert.
currently this is the only way i know of to snap verts along a single axis.

-pete

Griffon
10-03-2004, 09:14 PM
Easily done with a script.

zeebit
10-03-2004, 11:11 PM
hey griffon, can you post the script, hehe

thanks,
pete

Griffon
10-04-2004, 09:29 PM
Had to find a few minutes to write it :) I aligns points to the last point selected.

The arguements are any combo of XYZ. ie:

alignToPoint.pl XY
alignToPoint.pl Z
alignToPoint.pl XYZ

#----------cut-----------------------
#!perl

if($#ARGV < 0)
{
lxout("Arguement missing. Needs Axis. ie. \"XY\"");
return;
}

my @verx = lxq("query layerservice verts ? selection");

if($#verx < 0)
{
@verx = lxq("query layerservice verts ? all");
}

my @pos = lxq("query layerservice vert.pos ? $verx[$#verx]");

if($ARGV[0] =~ /x/i)
{
lxout("X");
lx("vert.set X $pos[0]");
}

if($ARGV[0] =~ /y/i)
{
lxout("Y");
lx("vert.set Y $pos[1]");
}

if($ARGV[0] =~ /z/i)
{
lxout("Z");
lx("vert.set Z $pos[2]");
}
#----------cut-----------------------

Powell
10-05-2004, 01:31 AM
Thanks Eric...script works nicely, even with objects in seprate layers. I just wish there was a faster more interactive way to do it like Maya.:shrug:

zeebit
10-05-2004, 02:40 AM
yeah, thanks eric.
i totally appreciate it.
any chance in the future you can set it up so that geometry snap recognizes the manipulator handles like in maya.

CGTalk Moderation
01-19-2006, 11:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.