matthuszagh / pyems

High-level python interface to OpenEMS with automatic mesh generation
GNU General Public License v3.0
81 stars 18 forks source link

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

Open matthuszagh opened 4 years ago

matthuszagh commented 4 years ago

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.

matthuszagh commented 4 years ago

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.

matthuszagh commented 4 years ago

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

matthuszagh commented 4 years ago

See this comment.