Select the edges and the initial vertex.

Place the edges in a set.

Convert edges to vertices and place them in a set as well.

Remove the initial vertex from the set of vertices

Beginning with your initial vertex, convert vertex to edge.

Compare the returned edges to the membership of your edge set to identify
the edge you need to follow.

Now convert the found edge to vertices.

The only vertex in the set out of the two returned from the edge to
vertices operation is the next vertex.

Repeat thus walking the selected edges in order, storing the vertices in
the desired order.

On Tue, Oct 23, 2012 at 11:30 AM, charles le guen
<[email protected]>wrote:

> yes, exactly
>
>
>
> On Tue, Oct 23, 2012 at 11:19 AM, Paul Molodowitch <[email protected]>wrote:
>
>> What exactly do you mean by a "contiguous edge"?
>> Do you mean the edge chain that connects them that has the fewest number
>> of edges? The shortest total distance?
>>
>> - Paul
>>
>>
>> On Tue, Oct 23, 2012 at 6:35 AM, charles le guen <[email protected]
>> > wrote:
>>
>>> Hi guys
>>>
>>> Any idea how to select and store an ordered list of verts along a
>>> portion of a contiguous edge?
>>>
>>> In other words:
>>> *Given two selected vertices (vert1 and vert2) on a contiguous edge,
>>> select all of the verts from vert1 to vert2 (inclusive) and store them in
>>> that order for future manipulation*.
>>>
>>> That would allow one to do stuff to them (such as create a joint chain
>>> snapped to those points, create cloth constraints along those points, etc).
>>>
>>> Right now it's easy to select the edges manually and convert that
>>> selection to verts and then run scriptX.  The problem with that
>>> semi-automated process is that the order of verts isn't in a straight line
>>> from vert1 to vert2.
>>>
>>> Maya has a command called shortestEdgePath, but it seems to be flawed in
>>> how it calculates the shortestEdgePath (and since it selects an edge path
>>> rather than an ordered set of verts, even if it worked well, it still
>>> wouldn't produce the result I'm looking for)
>>>
>>> Thanks for any ideas you may have to share
>>> C
>>>
>>>  --
>>> view archives: http://groups.google.com/group/python_inside_maya
>>> change your subscription settings:
>>> http://groups.google.com/group/python_inside_maya/subscribe
>>>
>>
>>  --
>> view archives: http://groups.google.com/group/python_inside_maya
>> change your subscription settings:
>> http://groups.google.com/group/python_inside_maya/subscribe
>>
>
>  --
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings:
> http://groups.google.com/group/python_inside_maya/subscribe
>

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to