Select nth vertice or every second vertice


#1

Is there a way to select every 2nd vertice in Rhino3d, either with or without plugins, aside from selecting everyone separately using the shift key.? This sofa was done in cinema4d. I would like to be able to do it in Rhino3d, t-splines and grasshopper if need be. Imagine there being vertices beween the tufting and not choosing these vertices when doing a inner extrude, reverse extrude and then a vertice collapse. Red areas are where all 1st vertices are that were not selected. The tufted areas are where every 2nd vertice was selected.It would be great if grasshopper, rhino3d or t-splines had this function built in. Maybe there is a plugin that can do this or an equation or setup in grasshopper. As I can see no option to attach a file, please see the post at t-splines. Kind Regards, Brent Kjernisted
http://www.tsplines.com/forum/viewtopic.php?f=9&t=61718&p=75631#p75631


#2

Hi Brent, you could make such n-th selection of object grips with a python script or RhinoScript. Below is an python example which works on single surfaces and meshes only. You can paste it in the Python editor to test it out. (use _EditPythonScript command to open the editor).


import rhinoscriptsyntax as rs

def SelectNthObjectGrips():

    """select Nth object grip of surface or mesh"""

    obj_id = rs.GetObject("Select mesh or surface", 8+32, True, False)
    if not obj_id: return False

    if not rs.ObjectGripsOn(obj_id): 
        rs.EnableObjectGrips(obj_id, True)

    count = rs.ObjectGripCount(obj_id)
    if not count: return False

    intNum = rs.GetInteger("Enter Nth number", 2, 1, count)
    if not intNum: return False

    rs.EnableRedraw(False)

    for i in xrange(0,count,intNum):
        rs.SelectObjectGrip(obj_id,i)

    rs.EnableRedraw(True)

if __name__ == "__main__":
    SelectNthObjectGrips()

To make it do what you´re after your surface or mesh should have a grid like structure. I´m in doubt this works on a t-spline object.

c.


#3

Thankyou very much clement! I will give it a try and let you know.