# Problems in space creation from imported grid

**URL:** <https://bempp.discourse.group/t/problems-in-space-creation-from-imported-grid/292>\
**Category:** Bempp\
**Created:** [8 October 2024 14:37 UTC](https://bempp.discourse.group/t/problems-in-space-creation-from-imported-grid/292 "2024-10-08T14:37:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diego](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@diego](https://bempp.discourse.group/u/diego)\
**Post date:** [8 October 2024 14:37 UTC](https://bempp.discourse.group/t/problems-in-space-creation-from-imported-grid/292/1 "2024-10-08T14:37:56Z")

</div>

Hello,

I am new to bempp. I created a grid (using a convex hull algorthm) outside bempp environment and imported it. grid.plot() looks fine. However, when running A0\_int = multitrace\_operator(grid, k\_int, epsilon\_r=epsilon, mu\_r=mu\_r, space\_type=‘all\_rwg’) in a Maxwell scattering problem, I get an error:

Exception: Two elements seem to be connected only by a vertex, not by an edge.

It looks like my mesh is wrong, but I cannot get around it. Could someone give hints on how to create a proper grid for bempp from a 3D surface cloud point? Perhaps, appropriate softwares?

Thank you all!

---

<div class="post-metadata">

**Author:** ![Elwin](https://yyz2.discourse-cdn.com/free1/user_avatar/bempp.discourse.group/elwin/32/38_2.png) [@Elwin](https://bempp.discourse.group/u/Elwin)\
**Post date:** [11 October 2024 19:31 UTC](https://bempp.discourse.group/t/problems-in-space-creation-from-imported-grid/292/2 "2024-10-11T19:31:21Z")

</div>

Your mesh seems to have been created incorrectly. The RWG functions for the Maxwell equations are defined on the connecting edge between triangle pairs. Your mesh seems to have corrupt triangles in the mesh, which causes the exception.

You may want to open the mesh file in external software like Gmsh and visually inspect the grid for artifacts, like loose triangles, degenerate elements, duplicated nodes, etc. There are many mesh generation and visualization programs available. The Bempp library takes Gmsh formats as mesh input.
