Grasshopper

algorithmic modeling for Rhino

Hi, 

Does anyone have an GH example using NurveCrv comp? I have problem in using curve control weight parameters, how should I input them and where they come from?

Another question: What is the difference between "Curve control point" in NurbCrv comp and "Control point count" in Knots comp?

Any help would be appreciated.

Thanks all,

Nick

Views: 12937

Replies to This Discussion

Thanks for your help Hannes, but I want to change the weights, I tried to assign a weight for each cp but it didn't work!

Attachments:

That's because you're feeding the Knot vector component the actual control-points rather than an integer describing how many there are. You need to insert a [List Length] component between your point parameter and your knot component.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Your def doesn't apply weigths... so I cannot see your problem.

Just to show how changing the weigths, I made this quick def.

Attachments:

 I saw that you altered one value of the 4 values in the weight list, can we alter all 4 of them and how?

Thanks

Hi Nick,  

the number of knots equals the degree + controlpointcount - 1. A degree 3 curve with 7 control points should then result in 3 + 7 - 1 = 9 knot values. You'll also find that for non-periodic curves (open curves and closed curves that have a kink at the seam) that the first few and last few knot values are identical. In fact, you need a few identical values at the start and end to ensure the curve reaches all the way to the first and last control-point. This is called "clamping". The number of repeated (or "multiplicity" or "valence") knots must be equal to the degree. So with the above example of a degree 3 curve with 7 control-points, a valid knot vector would be:

0;0;0;1;2;3;4;4;4

9 values, with the first three and last three being identical. You are never allowed to repeat the same knot value more often than the degree, and you are never allowed to decrease the values either.

Weights are single numbers attached to individual control-points. Weights are most often used to create Conic Section curves (arcs, ellipses, parabolas, hyperbolas) and these are always degree=2. You can also assign weights to freeform curves if you want of course. When you choose to do so, you must supply an equal number of weights and control-points. Furthermore, weights are relative only to each other. If you assign a weight value of 1.0 to all control-points, you get the exact same curve as you assign a weight of 4.9 to all control-points.

The difference between "Curve control points" in NurbCrv and "Control point count" in the Knot component is that one actually represents a list of points, whereas the other is merely an integer representing how long that list is.

In order to create a valid knot vector, all I need to know is the degree, the number of control-points involved and whether or not the curve is supposed to be periodic or not (periodic curves are a special case of nurbs curve, best to stay away until you're comfortable with the regular nurbs curve type). It doesn't matter where the control-points are, I only care about how many there are.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks David for the great explanation....

I developed the attached GH definition to find the curves on the NURBS Surface, but at the end of the definition, the brep comp. gives me 12 edges instead of 10! I know it is because that it counts all 4 edges of sub surfaces. 

Is there anyone who can help me to find the 10 curves?

Thanks,,

Nick

Attachments:

I came up with the new definition, Is there any better way to find the curve on the surface? Also, this definition gives me the continuous curve in which I need to find the divided curves (Curves between the vertices separately)!!!

I would be appreciated if anyone could give me some info.!!!

N

Attachments:

Oh thanks, I also needed this information

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service