Grasshopper

algorithmic modeling for Rhino

Hi.

 

I have a curve which I have divided in points from intersecting lines. For evaluation purposes, I would like to know the parameters of these points on the curve. Is there a function either in GH  or in C# to give me this?

 

Cheers,

 

Eirik

Views: 12714

Replies to This Discussion

Curve Closest Point. There is both a Curve CP component and the Curve class in RhinoCommon has ClosestPoint and ClosestParameter methods.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks a lot David.

 

My project is about how to align boxes of various sizes along a curve, and change their depth by a function of the curvature. I have not found a satisfying formula (at the moment I just us the radius) that can distort this interestingly for each layer, but it is a start.

 

Cheers,

Eirik

Attachments:

Hi Erik,

You could use the CurvatureAt method and use this as part of the function for the depth of the boxes. You would probably need to map the curvatureAt value to fall within the width and height of the boxes so have variation within certain sizes.

I hope this helps!

Cheers

Evert

Hi David.

 

What if I have the opposite? A curve, a parameter, and I need the point? .. Eval in GH. How to solve that in c# .. I'm a bit lost searching the RhinoCommons Sdk at the moment..

 

thanks, Eirik

sorry. the Curve..::..PointAt Method .. seems to give me what I want.

Hi Eirik,

I seem to have a similar problem like you had:

How do I get the parameter of a curve on a specific point?

What I want to do is to split multiple curves at their intersection points using the shatter command. For that I obviously need the parameter on those points (shatter asks me for a "parameter t to split at").

Unfortunately, I don´t find the Curve..::..PointAt Method that you mentioned above.

Would be great if you still remember how you solved it.

Thanks,

Lion

Hallo Lion.

I don't know if you are looking for the C# code or the grasshopper solution, as Shatter is a grasshopper component.

I included both a C# solution and a pure grasshopper one in the files, have a look if it's what you need.

Viel Erfolg!

cheers, Eirik

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service