xsection
xsection copied to clipboard
fix: discard non-surface polygons during etch and grow
Addresses issues klayoutmatthias/xsection#22 and klayoutmatthias/xsection#24
The etch/grow function does not consider the masking aspect of the of the underlying geometry, resulting in non-physical operations. That is, an hermetically sealed bubble can be etched or deposited into without creating a hole in it. The operation goes through all layers, even though no :through
argument is specified.
This fix introduces a filter to discard all regions that are not connected to the surface at one point.
It might break the :through
's intended behavior. I have not tested that parameter.