Question

Merge adjacent faces

  • 21 October 2022
  • 5 replies
  • 8 views

Hello,

 

Is there a transformer capable of merging adjacent faces? Ie. I have 4 adjacent faces (walls, roof) and I want to create a single object (building).

 

Thanks!


5 replies

Userlevel 4
Badge +26

You can use the Aggregator - if you have a common ID to group by (like a building id) then you can use this to create individual buildings.

 

If your models also have a ground surface you can try the SolidBuilder which will attempt to build a closed solid out of the surfaces.

You can use the Aggregator - if you have a common ID to group by (like a building id) then you can use this to create individual buildings.

 

If your models also have a ground surface you can try the SolidBuilder which will attempt to build a closed solid out of the surfaces.

Unfortunately I have neither common ID nor ground surface 😔

Userlevel 4
Badge +26

Unfortunately I have neither common ID nor ground surface 😔

Yeah then that adds a bit more complexity but in theory it's still doable but will very much depend of the data. The idea would be to create 2D features from the 3D surfaces - you can use a SurfaceFootprintReplacer for example (be sure to use a GeometryExtractor to keep the original 3D geometry for restoring later).

 

Once you have the 2D features you can dissolve them to create polygons which, in theory, should represent 2D building footprints. Give these footprints an ID, buffer these a bit (e.g., 10-20 cm) and then use a SpatilFilter to pass the footptint ID to the 2D features. Now you can restore your walls and roofs back with their original 3D geometry but they now have a building ID which you can use to aggregate by.

 

Going a step further you can give that buffered footprint a height (e.g., the min height from the aggregated result) and turn it into a Face and you have yourself a GroundSurface.

 

Here, I put together an example - it isn't perfect and there are quite a few edge cases where this workflow wouldn't work but it should help get you in the right track.

 

Unfortunately I have neither common ID nor ground surface 😔

Thank you very much for your help and your time, I will work on that! !

Unfortunately I have neither common ID nor ground surface 😔

My final solution is based on normals: I use the walls normals to calculate a point that is inside the building (inside the roof footprint) and I aggregate all this! So there is no need to dissolve or buffer and no edge cases afaik.

Reply