Grasshopper

algorithmic modeling for Rhino

hi,

i just want to ask why my first line (0.line-like curve) is not divided and why this line is not a (planar curve) like the others from the list...  why this happened? what "like-curve" means? and is there any way to divide this line according to the others?

best,

d.k

Views: 7707

Attachments:

Replies to This Discussion

Hi Dimitris,

A line-Like Curve is exactly that a curve that is similar to a line. i.e it has a start point and and end point and the curve between them does not deviate from the shortest path. A Line is always a curve but a curve is not always a line.

This curve is getting the same points on it as the others

I'd like to add some more information to Danny's answer. It's not vital you understand this, but it may explain some of the idiosyncrasies of GH and Rhino development.

Rhino is at heart a Nurbs modeler, but it does support other types of geometry. When it comes to curves Rhino actually has logic for a lot of different 'kinds' of curve:

  • Line
  • Polyline
  • Circle
  • Arc
  • Bezier
  • Polynomial
  • Polycurve
  • Nurbs

The first 6 types are just simpler than Nurbs curves. A line is defined by 2 points. A circle by a plane and a radius. etc. etc. However all these kinds of curves can be approximated by Nurbs curves. A line is defined by 2 points (and each point by 3 numbers, so in total 6 numbers define a single line), but you could make a nurbs curve that looks exactly the same. This curve would have two control-points, a degree integer, a knot vector containing 2 numbers, an integer specifying the dimensionality and maybe even a cached boundingbox and spatial-tree. Because of all this overhead we have a Line type to deal with just pure lines.

A polycurve is not really a 'type' of curve at all. It's just a topological construct that allows you to string together a bunch of curves of different type and different degrees into a single entity.

So when you have a curve that looks like a line, it can be any of the following (GH doesn't do beziers and polynomials):

  • an actual honest-to-goodness line
  • a polyline with a single segment (topologically and geometrically indistinguishable from a proper line)
  • a polyline with an arbitrary number of co-linear segments
  • a nurbs curve of degree=1 with two control-points
  • a nurbs curve of some arbitrary degree with an arbitrary number of co-linear control-points.
  • a polycurve combining any number of the above, provided all polycurve segments are co-linear.

In the first case Grasshopper will tell you you've got a "Line". In the other cases you're dealing with a "Line-like curve".

Very much the same goes for polylines, arcs and circles.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

tnx! I really appreciate that! going the definition further i am in front of an other problem... i cannot built an interpolate curve as the rhino example... i want to do the same thing into GH but it cannot accept these points as curve vertices... is there any solution to this problem?

tnx again!

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service