Grasshopper

algorithmic modeling for Rhino

I am starting a project an would like to know if there are any commands in grasshopper  that are similar to the Rhino 5 commands of "list" and "InsertKnot". I need to read the knots for a curve and then insert more knots. I have searched through the forms and Google and have not found anything, hence why I am posting. Any direction would be greatly appreciated. Thanks! 

Views: 1059

Replies to This Discussion

You can get all the information from a nurbs curve, including the knot vector, but there are no components for inserting knots, or inserting kinks, or inserting control-points. It can be done relatively easily using a scripted component.

The question that remains is how do you want to define where you want these knots inserted?

--

David Rutten

david@mcneel.com

I would like to insert the knots relative to a different curve.

e.g.

I will have two curves with lengths of A and B. Curve A would have knots on the %25th and %66th of the total length. Curve B will have a knot on the %50th of the total length of the curve. I would then like it for both curves to have knots on the %25th, %50th, and %66th of the total length. I want this for lofting purposes of course.

That can certainly be done. I assume you may in fact have a list of curves, rather than just 2? Are lengths measured in curve parameter space or in world space? Should there be a tolerance rejection? I.e. what if curve A has a knot at 55.6% and curve B has a knot at 55.7%, do you still want to add a knot to each one?

--

David Rutten

david@mcneel.com

We do have a list of curves that we are trying to work with. The curves we're working with exist in a curve parameter space. 

In the example you provided we would add knots to both curves.

Thanks,

Alexis

As I understand Rhino already inserts those knots during Loft, but perhaps you're dealing with corner cases where it doesn't...

I attached a GH file with a C# script that makes sure all curves in a list have the same knot topology*.

--

David Rutten

david@mcneel.com

* Not quite actually, I don't carry over knot multiplicity, only knot location. If you also want the former, I can adapt the script.

Attachments:

Thank you David, you have sped up my project greatly.

-- Alexis 

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