Grasshopper Bug: Cannot Set Line

Hi,

I’ve found a strange little bug in Grasshopper. I cannot reliably set (capture) lines from Rhino to Grasshopper–especially in the Z’ed axis. I can set (capture) a point, but when I want to read a line, it always asks me to instead draw one. I’ve seen bad parameter behavior before, but it just won’t let me capture a line at all. It will allow me to capture it as a curve, but not a line.

Right after this screenshot, it will ask me to just draw a line.

Any suggestions?

Hi Brenda,

I guess that’s normal. In my experience, it’s always been that way.

Lines have to be set by defining two points.
This is probably because a simple line is an object defined by two end points, and not a linear curve, like you probably have in Rhino. A workaround would thus be to simply set a curve instead.

1 Like

Thank you.

It’s confusing, because I was so gullible, I kept trying to redo it. I even dragged out a panel to see that I was making a Line-like curve.
As for the function, implied quality, it’s not : )

Yes, it’s something that’s probably hard to understand, unless you’ve spend some time with the API (RhinoCommon). I didn’t really grasp it before I embarked on a little scripting adventure either.

In RhinoCommon, there is a Rhino.Geometry.Line() structure (cf. documention) and a Rhino.Geometry.LineCurve() class (cf. documention) .
The first one is a simple, abstract data object, defined by two end points, with limited methods (i.e. what you can do with it). The latter one inherits from the prototypical Rhino.Geometry.Curve() class, and thus can do pretty much everything that’s relevant to curves.
It’s like I wrote about above, there’s a difference between a line and a linear curve, as there is between a polyline and a polyline curve.

1 Like