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: f271344 [formerly 27e176c]
Former-commit-id: f9e19d9dd132399d1cd4b7bf134ab9d10e27ff6b
  • Loading branch information
joamatab committed Dec 20, 2022
2 parents 3784d1f + 30d7926 commit b81a6f9
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 b81a6f9

Please sign in to comment.