algorithmic modeling for Rhino
Here's the problem:
I have points that share duplicate X,Y values, but not Z values. I would like to be able to select a field of points, determine if the points share X,Y coordinates, and if they do, combine their Z values and create a point with these X,Y,Z values. Any thoughts on best practices? I have a start at some test files if interested.
Tags:
I've attached the files that I was working with - the grasshopper script is just the start, but I am not sure how to proceed from here.
Thanks Nikos. But, say I have three points which share the same X,Y coordinates? How can I compare the X,Y values, break them into branches, combine the Z and then create a new point with that Z value?
You are right, you never said it was only for two points, I wrongly assumed it from the rhino file...
This is a little more complex but it works:
I am not sure what you mean by "combine their Z value". This calculates the average point, but you could also add the z values or whatever... Also this definition ignores points if they don't have a matching point. If you don't want that you can connect [average] to the previous [cull] component.
Last but not least, this def checks for equality between float numbers which is not a good practice. If it doesn't work as intended you should replace the [equality] component with something like: absolute difference > 0.01 or something....
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by