Returns or modifies the location of an object's grip.
rhinoscriptsyntax.ObjectGripLocation (object_id, index, point=None)
rhinoscript.grips.ObjectGripLocation (object_id, index, point=None)
object_id |
Required. String or Guid. The identifier of the object. |
index |
Required. Number. The zero-based index of the grip to either query or modify. |
point |
Optional. List of 3 numbers or Point3d. A 3-D point identifying the new location of the grip. |
List |
If point is not specified, the current location of the grip referenced by index if successful. |
List |
If point is specified, the previous location of the grip referenced by index if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select curve", rs.filter.curve)
if obj:
rs.EnableObjectGrips(obj)
point = rs.ObjectGripLocation(obj, 0)
point[0] = point[0] + 1.0
point[1] = point[1] + 1.0
point[2] = point[2] + 1.0
rs.ObjectGripLocation(obj, 0, point)
rs.EnableObjectGrips(obj, False)