Skip to content

Commit

Permalink
Merge pull request gdsfactory#1023 from simbilod/empty_layers_uz_meshing
Browse files Browse the repository at this point in the history
parse empty polygons uz meshing

Former-commit-id: 27e176c
  • Loading branch information
joamatab committed Dec 20, 2022
2 parents 65fdda3 + 5e592ea commit f271344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gdsfactory/simulation/gmsh/parse_gds.py
Expand Up @@ -40,7 +40,9 @@ def cleanup_component(component, layerstack, round_tol=2, simplify_tol=1e-2):
layerstack_dict = layerstack.to_dict()
return_dict = {}
for layername, layer in layerstack_dict.items():
if layer["layer"] != LAYER.WAFER:
if layer["layer"] is None:
continue
elif layer["layer"] != LAYER.WAFER:
return_dict[layername] = fuse_polygons(
component,
layername,
Expand Down
5 changes: 5 additions & 0 deletions gdsfactory/simulation/gmsh/uz_xsection_mesh.py
Expand Up @@ -104,6 +104,11 @@ def get_uz_bounds_layers(

layer_dict = layerstack.to_dict()

# Remove empty entries
inplane_bounds_dict = {
key: value for (key, value) in inplane_bounds_dict.items() if value
}

for layername, (
gds_layername,
next_layername,
Expand Down

0 comments on commit f271344

Please sign in to comment.