Problem with extracting pieces with same Z-coordinate

I am having a weird issue with extracting items with same z-coordinates.

In this example, I have more than four pieces having their centroid having the same z value but it’s not coming out to be right.

The tagging of centroids with respect to their z values is coming fine but the extraction isn’t happneing properly. What’s going wrong here and how to solve it?


FLOOR EXTRACTION ISSUE.gh (876.4 KB)

don’t use Equality unless you are comparing integers :slight_smile:

best solution is to check if the difference between number A and number B is small enough to be considered negligible:

FLOOR EXTRACTION ISSUE_inno.gh (882.3 KB)

just one of the many threads on the topic, Problem with "Equality" - #3 by nathanletwory you can use the forum search function to find many more of those

1 Like

Thanks! This works well!