[Solved] A question to someone with deeper knowledge of nurbs

Are you making them in the same exact way with the same curves and same commands? (Some picture or file would help)

Yes, exactly the same, though I do not have the curves from which Rhino surface was created, so I extracted the control points instead. But I know that the curves were of degree-5.

Unfortunately, I cannot provide neither picture nor file.
I’ll investigate the change of control points, that I mentioned in my last post. This seems interesting. I extracted the control points to txt from Rhino, then coordinate by coordinate I created the points in Grasshopper. I don’t see reason why they would be different. Could be my mistake, must check.

Without the exact curves it is almost impossible to get the exact same surface (I assume you are taking the control points and making curves through them?), I think you will have a better result by taking the control points of the surface and using them to remake with surface from points.

Interesting approach, I’ll try that, thanks.

I used curves because I didn’t know if (surface from points) will figure out the order of the points.

Not exactly through the points, I used the control points of the surface to create the curves using this:

0696_

UPDATE:
I fixed my coordinate issue but the difference in areas is still signifficant.

I’m surprised it actually succeeded creating a surface, anyways, the result was even worse:

What is the meaning of “greville uv points”, because they are so so different between ones created inside GH and the one coming from RH?

Greville points are like edit points at knot averages (Like the points a curve interpolates through, rather than control points) So they are the points on the surface or curve. Similar to using Rhino’s EditPtOn or SurfaceEditPoints command.

https://docs.mcneel.com/rhino/5/help/en-us/commands/pointson.htm

I’m surprised it actually succeeded creating a surface, anyways, the result was even worse:

It is just really hard to exactly replicate a surface without knowing all the options that made it. For instance if it was a Loft of degree 5, was it lofted Uniformly, Loosly, ect. Was it simplified, was it a loft using rebuild or refit options? Did all curves have the same structure for contol point count, weights, knot vectors (otherwise there is some auto matching and interpolation that would happen behind the scenes in the loft command) I know you answered some of that but really having all the information is key.

Here I get pretty close cuz I know the settings I used to loft with. However, there is still a difference in area doing it this way (without using the curves I lofted with)

Options:
20 nurbs degree 5, with 14 points each.
Loose loft (no refit, no simplify, these are dirty words in ship design cad)

2018-06-19%2022_02_08-Rhinoceros%206%20Commercial%20-%20%5BPerspective%5D

they are all on XY plane, not points on curve nor the surface. And Greville points of the surfaces created in GH are like scaled 1:1000x. Which makes no sense to me, yet.

they are all on XY plane, not points on curve nor the surface.

Because you are plugging them into a point component. Look at my above screenshot. They are UV coordinates as in they should be evaluated on a surface. Plug them into the uv input on an Evaluate Surface component.

plugging them in a point component is the way to take only the points out of the data. Unless I got it wrong.

If plugging 3d points in a point component projects the point in XY plane something is wrong with the component. It’s supposed to be a container without transforming them.

If plugging 3d points in a point component projects the point in XY plane something is wrong with the component. It’s supposed to be a container without transforming them.

Nothing is wrong and no transformation is happening - if used in a Point container it is literally using those coordinates which are meant for uv. They are uv Points (see output description says Greville uv points). Notice z is always 0.0 (which in this case is not actually z, it is w - which is like the z of a surfaces space, so 0.0 means on surface). They are meant to be used as uv coordinates. (uv means on surface) The z is there in case you want to use them as XYZ points which would be like a remapping to the XY Plane.

it is weird though, getting placed on the XY plane, perhaps this is what’s used when unrolling curved surfaces.

Anyways, some breakthrough, what if the original surface was not created using curves and loose loft, but rather a plane surface rebuilt to have different number of points and degree 5, then stretched. Would that make the surface impossible to re-make in GH using the control points from the surface, creating nurbs with these control points, and so on?

Here’s an example of such surface.
TST.3dm (135.6 KB)

UPDATE:
And this is what I try to do with GH:
TST.gh (66.1 KB)

If I may interfere …

Why not to use a script component and rebuild the surface from CVs, weights, degrees and knots ? :slight_smile:

BTW, If Loft works in GH like it does in Rhino, I think it should interpolate the curves.
If we build the curves from the surface’s CVs, they are not on the surface (except the first and last curve).
… Or am I missing something ? :confused:

Regards

Because then it’s not parameterizing the surface, but rather copying it to GH.
I want to re-make the surface in GH instead of taking anything from the Rhino surface (except for the coordinates). If you look at the files above, imagine the points in GH are made using “Construct Point” component. Then I’ll have full control over how these points move and restrict them so that each curve is not crossing the other to mess up the loft or create “bad” surface (ship-wise).

NURBS consist of 3 basic properties:

Control Points
Knots - they determine the degree and order, if periodic etc
Weights

If you retrieve these properties and create another surface with the same values, you will get the same shape +/- floating point tolerance and rounding error. You need to script this, gh components are insufficient here

Good point Tom, but is there a way to manipulate surface by changing only its knots, without touching the control points. Since as shown above my control points, degree and weigths are matching the original surface, the only thing different are the knots.

Could anyone move this thread to GrashopperDeveloper section, please?

Thanks in advance.

EDIT: nvm, I got it :smiley:

Knots are no points in 3d space. The knotvector is a list of floating numbers, determine where a subcurve starts and ends in relation to the parameter. Its more a parameter domain. NURBS are basically an extension to Beziersplines, where you can define a curve through more than one Bezier spline. Furthermore the ‘R’ stand for rational, meaning that you can weight the influence of each Controlpoint, however there are also rational (=weighted) Beziersplines.
The knot determines the degree of each subcurve (they are all the same) and the internal continuity between each segment. You can even modify the knotvector in a way thatthe first curve segment and the last segment are continuous as well = making a curve periodic.
Generally spoken you can modify the knotvector, but this has no design critical advantage.
It makes sense for Interpolation or Approximation(=Fitting) algorithms.
You can also modify the greville points when using an interpolation algorithm, but this topic is very complex and an advanced chapter of NURBS math. Its basically DeBoor in reverse. And because you have no Cps, you need to provide a third information, the knot layout, to solve for Cps. This is what the knotspacing refers to.

The most simple tutorial about Bezier and Nurbs out there:

Apparently it has critical influence on the final surface.

0696_

Is there RhinoCommon function that can manipulate Knots or KnotVectors?