gdsfactory / kfactory

gdsfactory with a klayout backend
https://gdsfactory.github.io/kfactory/
MIT License
28 stars 10 forks source link

support KCell.min, KCell.min , Instance.xmin, INstance.ymin ... in um #283

Closed joamatab closed 2 months ago

joamatab commented 3 months ago

How could we support xmin, ymin, in um both for KCells and Instances?

sebastian-goeldi commented 3 months ago

How would you even do that?

joamatab commented 3 months ago

How about doing that gdsfactory side, by subclassing KCell and Instance?

sebastian-goeldi commented 3 months ago

yes, but you will have the problem of needing to overload create_instance etc.

Maybe we can do it by using

DKCLayout and DKCell/DInstance but it's a rather large task and not everything is straightforward

joamatab commented 3 months ago

I see, okay, maybe then we need to make a big tutorial and explan that people need to use Instance.d.xmin instead

sebastian-goeldi commented 3 months ago

I think it's a reasonable request, but whether we do it in kfactory or gdsfactory is about the same amount of work with gdsfactory having to do even more wrapping because you want to inherit

joamatab commented 3 months ago

yes, im concerned about lots of people Pcells will break if we don't keep backwards compatibility

joamatab commented 2 months ago

Can we just inherit from UMKCell?

sebastian-goeldi commented 2 months ago

Yes you can if you are willing to call .parent anytime you call anything kfactory which requires a KCell