Skip to content

Commit

Permalink
TypeLayer PCell parameters ignored when converting layout to code
Browse files Browse the repository at this point in the history
  • Loading branch information
qpavsmi committed Nov 12, 2024
1 parent 347f8a6 commit ab52719
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions klayout_package/python/kqcircuits/util/layout_to_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def get_waveguide_code(inst, pcell_type, instance_names_defined_so_far):

wg_params = "" # non-default parameters of the cell
for k, v in inst.pcell_declaration().get_schema().items():
if k in _params and v.data_type != pdt.TypeShape and _params[k] != v.default:
if k in _params and v.data_type not in [pdt.TypeShape, pdt.TypeLayer] and _params[k] != v.default:
wg_params += f", {k}={_params[k]}"

for i, path_point in enumerate(wg_points):
Expand Down Expand Up @@ -311,9 +311,11 @@ def _pcell_params_as_string(cell):
params_list = []
for param_name, param_declaration in params_schema.items():
if (
params[param_name] != param_declaration.default
not isinstance(params[param_name], pya.LayerInfo)
and params[param_name] != param_declaration.default
and param_name != "refpoints"
and not (param_name.startswith("_") and param_name.endswith("_parameters"))
and not param_name.startswith("_")
and not param_name.endswith("_parameters")
):
param_value = params[param_name]
if isinstance(param_value, str):
Expand Down

0 comments on commit ab52719

Please sign in to comment.