Write attributes from multiple geometries to multiple other geometries

Hello community,
I hope someone can help me with my confusion. I wanted to assign the attributes (key-value-list) from a group of mesh surfaces to a group of 3D polysurfaces.
A little background: Due to a conversion problem and the resulting data loss, I’m currently importing geo data as 2D surfaces (= building footprint) into Rhino with some additional data stored within the Rhino Object properties as key-value pairs. The 3D data comes in as .stl-file, but without any further information whatsoever.
I thought, it would be smart to match the 3D buildings with their footprint surfaces (that lie at approx. the same coordinates x and y-wise, not z) and write the footprint attributes on the according 3D buildings. My attempt was to use the centroids of the different geometries, but it seems like each polysurface AND each surface (footprint) has multiple centroids, leading to wrong connections. As you can see below even a very simple building (pic. 1) has usually at least 2 connecting lines (even though I thought it should only be one) and sometimes one building is connected to the wrong footprint (pic. 2).

So my questions are: Is there any way to simplify the centroids, so there is only one per surface and building? And am I even on the right track writing the attributes from surface to building using the centroids? My further steps would be trying to use the ModifyRhinoObjects command on the 3D buildings referencing the surfaces. But I haven’t quite figured that out yet. Maybe there is a better way that I’m currently just not seeing. So I appreciate any input :slight_smile:

Thanks in advance and please let me know, if I am totally off the road :sweat_smile:

writeAttributesOn3Ddata_internalize.gh (199.2 KB)

hi @reich

You can use project poit for this:
writeAttributesOn3Ddata_internalize.gh (195.1 KB)

Hi Erik,

thank you so much, this is brilliant! Project points is exactly what I was looking for. And MeshEdit is a really helpful extension.
Thanks again and sorry for the delay. I’m here only once a week.