algorithmic modeling for Rhino
Hi Mathew.
The question is a bit vague, can you post an example of what you want to do? Or a sketch?
Hi Matthew,
You can call the "Move" command from rs.Command function
import rhinoscriptsyntax as rs
import Rhino
pt = rs.AddPoint(0,0,0)
print "initial pt coordinates: ", rs.PointCoordinates(pt)
rs.Command("_-Move")
print "edited pt coordinates: ", rs.PointCoordinates(pt)
But if I understood correctly you want to connect the initial point with "moved" one? Then try using "Copy" instead of "Move" command:
pt1 = rs.AddPoint(0,0,0)
rs.Command("_-Copy")
pt2 = rs.FirstObject()
ln = rs.AddLine(pt1,pt2)
There's also rs.GetLine function:
lnPts = rs.GetLine()
ln = rs.AddLine(lnPts[0],lnPts[1])
The gumball can be used all along with above moving and copying, but it looks a bit buggy: even though it's turned on, for some reason you have to turn it off, then on (or just leave it turned off before running the script, then turn it on during the script) for it to work.
Thanks for the response djordje,
i did think about this as an option, but i guess i was really more interested in the ability to have something less 'final'. the move command sort of gives me only 1 chance to move, then its finished. i feel like what im looking for would be accessing something deeper like rhinocommon or system drawing or something more advanced like that.
i have been looking at the meier UI and starmaker scripts, and they have the ability to preview in real time (with help from sliders) a visual state change. i was curious if this sort of realtime feedback could take advantage of very fluid movements (similar to what gumball allows) not linked to sliders, but approaching the ease that rhinos interface allows.
Hi Naruto,
Thanks for the response. my goal isnt quite just to get a line drawn from two points. i think a good example of what im looking for is a user interaction much like in grasshopper, how it displays the line between two points while you are actively dragging a referenced point around. it would be a script that would be running WHILE you are moving the point around.
Hi Mathew,
This may be the answer you want,Writing not perfect
Naruto, this is really great! this is getting very close to what i was looking for!
would you have any idea how we could get the points to be moved by the Gumball, or something that allowed for single axis movements? your current method makes it hard to put the points anywhere in space without some sort of reference geometry to snap to.
Thanks!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by