generative modeling for Rhino
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.
Weights are optional and define how closely the curve follows the specific control points. If you use weigths, you need to specify one weigth for each CP (I think). If you leave the weigths, the curve is buildt the standard way rhino does.
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!
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.
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:
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.
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?
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.!!!