algorithmic modeling for Rhino
Tags:
You need to find the closest points ignoring the z coordinate. CPs returns not only the closest point but also its index in the list. You can now use this index to select the point from the original list of points with non-zero z.
Thanks Hannes
Opening your gh file gave me a pop up event log message "Object reference not set to an instance of an object", and then fails to open. I'm using 0.9.0006. Is there something I need to do to open this?
Meanwhile, I'll try to replicate using your description above. Thanks very much for the response.
Mike
I haven't opened the files because I'm not in my working computer, so I'll try and explain it.
From what I have read, can't you just project the point which has the z-value (height of the building) and the points that have the centroid of the building onto the same plane, then used the Find Closest Points (this component, not the other one), use as the cloud points the centroids projected, and as the point the elevation projected, and then use the index number of the closest point as a place-holder to use in the extrude component.
Sorry that I can't post a definition right now. Maybe what I wrote is what Hannes did...
Thanks, that's a pretty clear explanation. I think I'm missing something obvious about sorting lists. I've gotten as far as getting the non-z pts on the same xy plane as the centroids, and found the closest pairings using the component you suggest above. Where I'm confused now is how I use the index number out of this component to sort the original z points for the extrude component. Screenshot attached.
I think you have to set the N to 2 and then cull the first value.
Also shouldn't the graphed lists go in "P" and the non graphed list go on "C"?
This is as close as I can get without opening your gh file. I may be on the wrong track. I use the PlaneCP(CP) component to find the closest pairings ignoring the z value of the original points. Now I have the correct pairings of centroids to zero z value height points. Now I can't figure out how to relate this index of zero-z pts back to the original list of non-zero z pts. argh. What you're saying sounds so clear.
I got a version to work, thank you both for the input. I find it hard still to visualize and work with lists. Jesus, for some reason I can only make it work with the 'other' CP component (the one without the 'n' value. But anyway this works. I've added two lines to help visualize the pairings (first non-z and then actual-z).
I hope this can help somebody else who is trying to mass extrude buildings on a GIS derived site plan. Also would be really curious if there's a cleaner way to do it.
Thanks again,
Mike
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