Smarter rebuild nurbs curves (and surfaces)

I hope I didn’t come off as discouraging. I think it’s a great solution - different tradeoffs produce different results, and they results you’re getting are very nice. No “problem” that I can see.

Your animations are also excellent. :slight_smile:

I have done so, see last post from this thread: (I used the Linear least square approach)

I do indeed earn money with this kind of stuff, although the people I work for don’t really value this kind of effort. In the end they want to see a generative part… Nobody cares which tools or methods or software packages you have used. That’s the sad part about it :slight_smile:

1 Like

Hi @maje90

what exactly do you mean by “picking only the near ones (near by curve parameter)” ??

@maje90 Greville points interesting! I would like to test it :pray:t2:

1 Like

Sorry… I almost forgot about this topic lately.
I’ll try to put up a plug-in for this…
(Any good place where to start? I’m “good” with c# directly on gh, but never done through visual studio…)

4 Likes

can you pls pls see that it works with mac either?

I can always recommend this:
https://icd.uni-stuttgart.de/?p=22773

2 Likes

Take Tim’s suggestion (and since you have the code already, it’s gonna be mainly a copy / paste job) . Feel free to pm me if you have any questions about the VS or icon making parts, I think it’s a plugin worth making, get to it :smiley:

4 Likes

I’m trying to improve a bit the code and to implement closed and periodic curves.
I’d like to have some opinions: Should I try to implement weights and knots?

For example, a 90 degree arc is a degree 2 nurbs curve with just 3 points. If we rebuild that curve it will have all points with weight=1 (is this right?) and also it will always result in an inaccurate copy (even with a large amount of control point and/or high degree, only simple arcs/circles are perfectly round)

This made me think that some shape might be reached easily and/or more correctly with a “proper” use of weights and knots. (even tough i still have no deep knowledge of this matter)

If I have to finish this, it should be a good idea to take into account every possible situation before planning the final code…

This said, another secondary question: are non-uniform-weights-curves (weights!=1) welcome?

I think you have made a beautiful tool as it is. I wouldn’t bother to start using weights. But maybe that’s because I never use weighted curves.

1 Like

I agree that arc stuff is an entirely different animal that I think doesn’t really warent the same solution if at all (is it even appropriate to rebuild arcs? They are pretty optimized as a curvature as it is)

i would skip knots completely, also weights are rather a pain. rather an option that it automatically adds a CP in case the accuracy is not sufficient enough. i think what one wants is a clean as possible curve for modelling further. weights and knots would only get in the way, at least imho.

This is what i mean:
weight
Red is 5 points, degree=3, weights != 1 .
Black is the best approach with again 5 points, degree=3 but weights=1 .
The shape is completely different, to achieve similar result to red, black would need 2 more points.

Another example:
weight2
Red: 3 points, degree 3, weights != 1;
Black: 5 points, degree=3, weights = 1
Black and Red are almost perfectly the same curve.

It seems like we could almost get filleted corners with very few points…

I have the feeling that ignoring weights and knots would be a big missed chance… is it not?

This is what i’m thinking… maybe weights and knots would be interesting, but then it backfire in many other situations… like during “evaluate curve” maybe a constant-weight curve is more uniform than a weighted one.

I don’t want to enforce my opinion, I’m just re-expressing my question (with more detail)
I really want to know if it would be worth or not to manage weights…

i fully understand your concerns, i am glad that you are taking that serious making this a real useful tool, something which should actually be part of vanilla rhino and has also been discussed.

i dont want to put a devil into weighted shoes. but i can remember talks about weights, that these only yield difficulties down the road when creating surfaces but also when interchanging between other software packages. --> if a weight can be replaced by just more CPs i think it would be preferable, again thats just my opinion and i believe @pascal wrote that weights in rhino are actually nothing else than added but hidden extra cp´s anyway.

if you want to put more effort into it then looking at your 2nd example deconstructing its purpose a bit i could think of measuring angles between CP´s and if they are aligned then the following bends (maybe in a specifiable region) could be set to G1 G2 etc adding more CPs if needed of course.

mmmaybe adding kinks would be an idea, sometimes sharp corners want to be kept.

I hope I did not write that… it’s not so, to my current so-called knowledge anyway, though I do forget things.

-Pascal

well i am sorry then, i thought you did, somebody from mcneel or so i thought, maybe it was also that it changes the curve to a higher degree, i might have that mixed up.

Are there still plans to get this beautiful concept in a plugin?

1 Like

Control point weights do not affect the degree of a curve.

somewhere it must accelerate or decelerate the curvature changing the value of the function locally meaning actually increasing or decreasing the degree. the definition may not say that but i also dont know enough maths to conclude that wisely enough and i have absolutely no idea how Rhino handles weights.

The effect of changing weights of individual control points may result in curves which are superficially similar to cuves of a different degree, but the degree of the polynomials does not change, and I do not think it is generally possible to match a rational curve (weights not all the same) with a non-rational curve (weights all the same) of a different degrees.

Changing the weights does not change the number of control points in single span curve or the degree of continuity between spans in multi-span curves. Those are a result of the degree of the curve, not the values of the weights.