Skip to content

Conversation

@sebastian-goeldi
Copy link
Collaborator

Summary

Adds a connectivity like check for overlapping instances on some layers

Test Plan

import gdsfactory as gf

gf.gpdk.PDK.activate()


@gf.cell
def pads() -> gf.Component:
    c = gf.Component()

    p1 = c << gf.get_component("pad")
    p2 = c << gf.get_component("pad")

    p1.movey(-250)
    p2.movey(250)

    gf.routing.route_bundle(
        c,
        [p1.ports["e2"]],
        [p2.ports["e4"]],
        layer=gf.get_layer("M3"),
        route_width=1,
    )

    return c


c = gf.Component("Overlap1")
i1 = c << pads()
i2 = c << pads()
i2.movex(100)

c2 = gf.Component("Overlap2")
c_i1 = c2 << c
c_i2 = c2 << c

c_i2.rotate(90)

db = gf.kf.utils.check_instance_touching(
    c2, layers=[gf.kcl.get_info(gf.get_layer("M3"))], recursive=True
)
print(db.num_items())
gf.kf.show(c2, lyrdb=db)

@github-actions github-actions bot added the enhancement New feature or request label Jan 22, 2026
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 14.89362% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.69%. Comparing base (bed97b3) to head (805bf31).

Files with missing lines Patch % Lines
src/kfactory/utils/check.py 13.04% 40 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #862      +/-   ##
==========================================
- Coverage   65.87%   65.69%   -0.19%     
==========================================
  Files          71       72       +1     
  Lines       13434    13481      +47     
  Branches     2595     2605      +10     
==========================================
+ Hits         8850     8856       +6     
- Misses       3769     3811      +42     
+ Partials      815      814       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants