Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I am trying to extract points from a list according to its z distance. I wanted to extract all the points that have its z = 0. Do any of you know a way to do this? Thank you in advance for your help.

Views: 2406

Replies to This Discussion

Two ways that make sense:

  1. Measure the distance from each point to the World XY plane. If the absolute distance is less than some tolerance (say 1e-6) then the point is 'at' zero.
  2. Extract the z coordinate of each point and compare its absolute value to a tolerance.

Two is more straightforward, one is more flexible. Do be sure to use Less Than and Absolute instead of Equals. You're dealing with floating point values here so if these numbers are the result of some computation, they are likely to not be exactly zero, but rather something like 0.000000000000000008

Hi David,

Thank you so much for your advice. I can understand it now. 

Or use [Equality] instead of [Similarity] if you know that there are points with exactly z=0.

Hi Daniel,

Thank you so much for the grasshopper definition. I appreciate it very much.

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