matthuszagh / pyems

High-level python interface to OpenEMS with automatic mesh generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

merge adjacent bounding boxes for mesh when they are coincident and precisely the same size

matthuszagh opened this issue · comments

The coupler example is a good demonstration of the suboptimal behavior of the mesh generation in this case. If you look at the coupler mesh, you will notice that there is a higher mesh density near the inside corners of the miters. The reason for this is that the small miter overhang gets treated as its own bounding box structure even though it is adjacent to a trace with the exact same width and the same y and z positions. The current behavior is desired in most cases, and would be here if the trace and miter did not exactly match. However, because they do match, this mesh density is unnecessary. Because we now handle floating point well (see this commit), we should be able to do this fine.

This may not actually be the wrong behavior. Here's a screenshot of the effect:

miter

Because the taper on the miter begins at the connection between the microstrip and miter, we need enough mesh lines to register the effect of the taper in this region. Of course, 5 lines might be too many, but that is user-configurable. It is worth investigating this further.

Closing for now. May be reopened at a later time if some change here is deemed worthwhile.