Skip to content

Commit

Permalink
Merge pull request #1461 from gdsfactory/6653
Browse files Browse the repository at this point in the history
make sure via stack fits at least one via
  • Loading branch information
joamatab committed Mar 22, 2023
2 parents 9ad56e2 + a7c295c commit 8dbe74d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gdsfactory/components/via_stack.py
Expand Up @@ -72,6 +72,12 @@ def via_stack(
g = via_type.info["enclosure"]
pitch_x, pitch_y = via_type.info["spacing"]

min_width = w + g
min_height = h + g

if min_width > width or min_height > height:
raise ValueError(f"size {size} is too small to fit a {(w, h)} um via")

nb_vias_x = (width + 2 * offs - w - 2 * g) / pitch_x + 1
nb_vias_y = (height + 2 * offs - h - 2 * g) / pitch_y + 1

Expand Down

0 comments on commit 8dbe74d

Please sign in to comment.