Grasshopper

algorithmic modeling for Rhino

Hi,everyone,I need help about a question. How can I calculate the total number of some points which are on a surface?Thanks

Views: 5643

Replies to This Discussion

Hi Zhang,

if they are all on the surface, you just need List Length to compute how many points you have. If you have a list of points and you want to count how many of them are on the surface, then you need the Brep/Surface CP component (CP = Closest Point), which will tell you the distance between each point and the surface. If this distance is less than -say- 0.001 then the point can be considered to be on the surface. So all that is left now is to compute how many small distances there are in your list.

I used [Smaller Than] to create a list of True/False values (True=point is close to surface; False=point is far from surface) and then [Mass Addition] to count how many True values there are.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you,David.

My question I asked yesterday is not very clear.I have a list of surfaces and some points on these surfaces.But I have solved the problem using your method. 

If you have multiple target surfaces, you're better off using [Pull Points] instead of [Surface CP] or [Brep CP].

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service