Returns the next grip index from a specified grip index of an object.
rhinoscriptsyntax.NextObjectGrip (object_id, index, direction=0, enable=True)
rhinoscript.grips.NextObjectGrip (object_id, index, direction=0, enable=True)
object_id |
Required. String or Guid. The identifier of the object. |
index |
Required. Number. The zero-based grip index from which to get the next grip index. |
direction |
Optional. Number. The direction to get the next grip index, either 0=U or 1=V. The default value is 0. Note, this argument only applies when dealing with surfaces. |
enable |
Optional. Boolean. If True (default), the next grip index found will be selected. Otherwise, it will not be selected. |
Number |
The index of the next grip from the specified grip index. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
object_id = rs.GetObject("Select curve", rs.filter.curve)
if object_id:
rs.EnableObjectGrips( object_id )
count = rs.ObjectGripCount( object_id )
for i in range(0,count,2):
rs.NextObjectGrip(object_id, i, 0, True)