There is a program written in js on which users draw a floor plan, draw in 2D and then convert it into 3D, and you need to find the outside to paint a brick facade on the outside, and on the other wallpaper. How to find the outside?

enter image description here

  • Is the building always solid, or with holes inside, or maybe even with unrelated parts? - Kromster
  • The exterior of the building (in the simple case) is the result of combining all the 2D objects drawn. Those. this is the outline of the plan. How to find it - combine all 2D parts into one. Go in a cycle in all parts and combine them with all (can you find the algorithm for connecting 2 parts?). If the part does not unite with anything, it means that it is separately standing. Difficulties arise if you can draw a plan with holes inside (like a donut) or a plan of several unrelated parts. - Kromster
  • Thanks, everything worked out - user2955933

0