Grasshopper

algorithmic modeling for Rhino

This is what I want to do.

 

Take a set of lines

divide the lines in two

select the midpoint of each line

 

I am not sure how the tree system works.  I want to select the second item of each list of points, not the points from the second line in the list of lines.

Views: 1269

Replies to This Discussion

Hope this helps.

 

Chris

Here's the ghx file.

 

Chris

Attachments:
That's it!  Thanks!

thanks for a new way to get it :-)

 

DeDackel

I made a few weeks ago a list of exatctly what you are looking for. Myself was introduced by Danny to the CurvePoint component. After that I decided to think of how many ways do exist to reach the same result. That is what I love about Grasshopper. :-)

 

Best Regards

 

DeDackel

Attachments:

Hi DeDackel,

 

Be very careful about using domians to find mid points. These two methods:

Will not necessarily return a valid midpoint.

1) Create a Line in Rhino.

2) Reference it in GH with your definition

3) Notice that you get the expected results.

4) Now rebuild the Line in Rhino. Point Count = 5, Degree = 3

5) Still the same results

6) Now show control points in Rhino.

7) Delete the 4th Control Point ie. not the mid point or the two ends but either (not both) of the other two

8) Now you will see a mid domain point biased to one end.

oh, thanks for this hint!

There is no need to use them here. So I will exclude them as a good solution.

 

Many Thanks Danny

 

Best Regards

 

DeDackel

The great thing is that in your description you wrote the pseudocode for the processs:

yeah, thats cool... :-) I am wondering if there are more ways to get the Pt ?

 

Best Regards

 

DeDackel

You missed the Evaluate Length Component.

damn, you are right! :-)

 

Best Regards

 

DeDackel

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service