How to make an object automatically take the same height as another object? I am currently working on recreating a city in Blender.
I have two 3D versions of this city: the first one comes from my lidar data, therefore it is deformed and very &quot;raw&quot;.
The second one is a clean 3D version (a simple extrusion of the buildings from an openstreetmaps map), but the buildings do not have the good height.
I am very new to using python with 3D objects, but do you think it is possible to make a script that would make my clean 3D buildings automatically take the height of the buildings of the raw lidar version?
I would imagine, as an example, a script that would make my two objs have the same height when the x and y coordinates are equal?
I would appreciate any help, even by just telling me &quot;where&quot; I should look at to find answers.
Thanks in advance
Victoria H
EDIT 1: Here is an example of my buildings: on the right the &quot;clean&quot; one, which has wrong elevation, and on the left the one that comes from lidar data and is deformed but has good elevation

EDIT 2: I applied a shrinkwrap modifier, and the elevation infos seem to be correctly aquired by my &quot;clean&quot; buildings. However, they are slightly deformed on the x and y axis. Is there a way to apply this modifier only on the height of my objects (Z axis) and not on the x and y axis?

EDIT 3: here is a link to a blender file where I have saved 2 of these buildings: 
SCREEN 4: 
EDIT 5: After using looptools to flatten the roof
Maybe the Shrinkwrap Modifier can help you out. (I think i unlikely but i though I'd propose the idea anyway, just in case.)


Both cities have to be one object each though (Separate &gt; By Loose Parts could be done later)

And in this example (Mode: Project, On Surface) the blocks with the right height slightly overlap the map blocks so the map blocks vertices have a surface right above them to snap on to.


Edit:
I suspected the top faced wouldn't turn out flat. But you can use LoopTools to fix that if needed.
Go to Blender Preferences &gt; Add-ons. Search for &quot;looptools&quot;, and check the box next to Mesh:LoopTools.
Go to the 3D Viewport and in a sideview (Numpad 1 or 3) you should be able to easily select all the top faces of the buildings (select the top vertices in Vertex Select and then switch to Face Select is best i think).
With all the top faces selected, press N to open the 3D Viewport Sidebar Panel (if it isn't op en already) and click the Edit tab. Extent the LoopTools menu. Extent the menu under the Flatten button. Choose Plane:View. Press Numpad 7 to go to topview and press the Flatten button.
All the faces should now be flattened while still being at their own respective heights.