Grasshopper

algorithmic modeling for Rhino

Hi, all,

 

How can I evaluate points on curve with distance value starting from middle point?

 

pt.DivideEquidistant(double dist);

 

Above curve method evaluates point from start point.... is there way to normalize curve domain '-1 to 1' to get 0 domain value at middle point?

 

or is there more simpler way to do it?

Views: 4399

Replies to This Discussion

I used 'SetStartPoint(0.5)', then it works now.

Hi YJ,

 

no, there's no overload to get a point along a curve length, starting at a given length. Here's two ways to approach this:

 

1) Trim the curve so you're only left with the portion you want to measure. This involves actually changing the curve, so it's fairly hefty solution.

 

2) If you want to find the point 2 unit beyond the middle of the curve, just measure the entire length (L) and then measure the PointAtLength using (0.5*L + 2.0)

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

2) If you want to find the point 2 units beyond the middle of the curve, just measure the entire length (L) and then measure the PointAtLength using (0.5*L + 2.0)
The point you are evaluating is 2 units beyond the middle i.e. Halfway + 2. Not the middle. This was an example of how to get a point on a curve when using the middle as a starting reference.

"...If you want to find the point 2 unit beyond the middle of the curve..."

I understand. Excuse me for my inattention ...

Interesting way, I do not know.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service