Manipulate object grips while python script is running

rhino
python
grips

#1

I would like to run a script which at one point will stop and let the user manipulate the grips of a simple line.
Once done, user hits enter, and the script will calculate the resulting length of the line.

I assume that i need to use the Rhino library for this, i can’t find anything within rhinoscriptsyntax.


#2

@Bogdan_Chipara,

open the python editor using _EditPythonScript, from the menu access the helpfile then look on the left for the section “grips” under “rhinoscript Package”:

c.


#3

Hi clement,
I realized that i can actually use the move command in rhino while running GetObjectGrips method.
The fact that the gumball was not showing up made me think that i can’t edit the grips.

Do you know how i can make the gumball show up?

import rhinoscriptsyntax as rs

line = rs.GetObject(“select line”)
print (“line length=” + str(rs.CurveLength (line)))

rs.EnableObjectGrips (line, enable=True)
grips = rs.GetObjectGrips(“Select curve grips”)
#now i need the gumball on
print (“new line length=” + str(rs.CurveLength (line)))

Thanks.

According to this i can’t:


#4

@Bogdan_Chipara, yes i guess it is not possible. Whenever you’re in a command, the gumball is hidden. You may want to go the same route as described in above post and split things up into 2 scripts.

c.


#5

I was hoping that i could use the Rhino.UI.Gumball, but i don’t understand RhinoCommon.
And i don’t want to split it into parts either.