Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interacting operation between EdgePairs and Region (or edges) #1816

Closed
tvt173 opened this issue Aug 1, 2024 · 3 comments · Fixed by #1821
Closed

interacting operation between EdgePairs and Region (or edges) #1816

tvt173 opened this issue Aug 1, 2024 · 3 comments · Fixed by #1821
Assignees
Milestone

Comments

@tvt173
Copy link

tvt173 commented Aug 1, 2024

Hi @klayoutmatthias ,

Sometimes it is useful to filter edge pairs based on those which interact with a Region. I know I can convert the EdgePairs to a region or edges and then run interacting between those two objects. However, in some cases it would be nice to keep the result of the operation as EdgePairs, and I'm not sure if there is a straightforward way to do that today. The best I could think of would be to implement an EdgePairFilter that checks interacting between each of the edges in the pair and Region and returns True if either are True. Obviously this is an extra hoop, and I assume there would also be a performance hit vs. a native implementation in C code.

What do you think about implementing this operation? I think it would be useful, and it seems pretty straightforward.

Thanks,
Troy

@klayoutmatthias
Copy link
Collaborator

Yes, I think that makes sense and it is possible. There is a certain effort, because EdgePairs are not primary objects, but that can be changed.

@klayoutmatthias klayoutmatthias added this to the 0.29.6 milestone Aug 4, 2024
@klayoutmatthias klayoutmatthias linked a pull request Aug 4, 2024 that will close this issue
@klayoutmatthias klayoutmatthias self-assigned this Aug 4, 2024
@klayoutmatthias
Copy link
Collaborator

klayoutmatthias commented Aug 4, 2024

The linked PR provides a first implementation.

Use is straightforward - the following DRC functions now also act on edge pair layers:

  • pull_interacting (with edge and polygon layers)
  • interacting (with edge and polygon layers, with count if needed)
  • not_interacting (with edge and polygon layers, with count if needed)
  • split_interacting (with edge and polygon layers)
  • inside (with polygon layers)
  • not_inside (with polygon layers)
  • split_inside (with polygon layers)
  • outside (with polygon layers)
  • not_outside (with polygon layers)
  • split_outside (with polygon layers)
  • The corresponding select_... methods (in-place)

All features work in deep or flat mode.

For these operations, edge pairs are treated like polygons covering the area between the edges of the pair. Edge pairs are not treated as two edges. That makes some difference when considering interactions between edge pairs and polygons shooting between the edges.

@tvt173
Copy link
Author

tvt173 commented Aug 5, 2024

this is great @klayoutmatthias ! thank you!

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

Successfully merging a pull request may close this issue.

2 participants