1

with my python script I create a cross-section out of several polygons. They are different surfaces with different material parameter. My problem is that I have severall polygons which are very close to each other but not connected. For further calculations I need to connect these polygons. I don´t want to have one big polygon. I just want to have the small gaps closed between the different polygons and they should stay still seperated by bounds.

Somehow I tried a lot but at the end everything got to a big single polygon.

Here a code snippet: I create so called "sections" with the section_multiplane and out of this i create the polygons with the shapely polygon tool. And these polygons, in this case just as example, are very close to each other and I just want to close the gap between these two.

sections = mesh_kr.section_multiplane(plane_origin=mesh_kr.bounds[0], 
                                   plane_normal=[1,0,0], 
                                   heights=x_levels)

sections_belag = mesh_belag.section_multiplane(plane_origin=mesh_kr.bounds[0], 
                                   plane_normal=[1,0,0], 
                                   heights=x_levels)

poly_kr = sections[20].polygons_full[0]
poly_belag = sections_belag[20].polygons_full[0]

Need to edit I can easily generate vertices of the polygons. So maybe there is a way to combine the vertices?

  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 09 '22 at 14:13
  • Please elaborate on what you mean by "I just want to have the small gaps closed between the different polygons and they should stay still seperated by bounds"? How do you expect to connect polygons but still have gaps? – itprorh66 Sep 10 '22 at 14:37

1 Answers1

0

sorry for elaborating not correctly. i added 2 pictures to this answer here. As you can see in the zoomed picture, there is a gap between the two meshes. And I´m looking for something that this gap gets closed, by connecting the two meshes together. But the goal is that the meshes will stay as seperated meshes. enter image description here

enter image description here