algorithmic modeling for Rhino
Hello there,
I´m not new to grasshopper but very new to regular programming Languages.
I have a simple looking Problem:
I have a point Cloud and I have a Grid of Rectangles.
The point cloud is all over the area of the Rectangles.
Everything is on the same Plane.
What I now need is a list containing sub lists with the points in each rectangle.
I already tried around with the Point in Curves Component, but it unfortunately doesn´t work very well with multiple curves. A friend told me, that it could easily be scripted within C# with a foreach loop, but I just dont get it myself.
Can someone help me?
Tags:
It sounds like there's two ways to approach this, the easy slow way and the hard fast way:
I'll upload a file soon that shows these approaches.
--
David Rutten
david@mcneel.com
Incidentally the Point In Curves component should work fine for this. I don't know why it doesn't for you. Perhaps that's worth looking into as well?
--
David Rutten
david@mcneel.com
See attached for two C# scripts.
--
David Rutten
david@mcneel.com
Hello David,
Thank you very much. I will look into the script as soon as i can :)
The point in curve component just shows me all points in all rectangles, with 2 for containment and 0 for not containment. so i have a list with 256 sub lists with 4000 values each. Maybe it does what it should, but it crashes before...
Greetings,
Florian
David, thank you very much. This problem worked my head for a long time...
Best,
Florian
The second output should tell you in which of the regions each point ended up.
--
David Rutten
david@mcneel.com
Welcome to
Grasshopper
© 2024 Created by Scott Davidson. Powered by