gdsfactory / kfactory

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

Name collisions due to rounding of floats #165

Closed sebastian-goeldi closed 1 year ago

sebastian-goeldi commented 1 year ago

Describe the bug We are cutting off floatings after a certain number of digits. This can cause name collisions

To Reproduce


>>> b1 = kf.cells.circular.bend_circular(width=1, radius=10.5, layer=kf.kcl.layer(1,0))
>>> b2 = kf.cells.circular.bend_circular(width=1, radius=10.500005, layer=kf.kcl.layer(1,0))
>>> b1
bend_circular_W1_R10p5_L0_ENone_A90_AS1: ports ['o1', 'o2'], 0 instances
>>> b2
bend_circular_W1_R10p5_L0_ENone_A90_AS1: ports ['o1', 'o2'], 0 instances

Expected behavior Clear name distinction. I.e. don't cut of floats