gdstk icon indicating copy to clipboard operation
gdstk copied to clipboard

integer based representation

Open joamatab opened this issue 2 years ago • 6 comments
trafficstars

How could we move from floating point to integer based?

GDS database is integer based, and the rounding errors can cause snapping issues.

See how we fix this in gdsfactory

https://github.com/amccaugh/phidl/issues/140

joamatab avatar Jan 04 '23 00:01 joamatab

I've also been hit with rounding errors and had to questionably resort to fuzzy-matching. It certainly gives me pause about using this vs vendor tools (which have generally terrible APIs/ease-of-use, and I'd prefer to avoid).

nmz787-intel avatar Feb 10 '23 20:02 nmz787-intel

https://gdsfactory.github.io/gdsfactory/notebooks/042_non-manhattan-router.html#Fix-Non-manhattan-connections

joamatab avatar Feb 10 '23 21:02 joamatab

I also ran into significant issues with rounding errors and my project is completely Manhattan routing. I prefer using this tool, but these errors make it difficult. Can we at least get an option for more accurate floats, perhaps use long double by default or a more precise float from the boost library? Although not the robust/performant integer solution, it could at least prevent some of these errors.

alibillalhammoud avatar Jul 07 '23 19:07 alibillalhammoud

@sebastian-goeldi @tvt173

joamatab avatar Jul 08 '23 02:07 joamatab

I also ran into significant issues with rounding errors and my project is completely Manhattan routing. I prefer using this tool, but these errors make it difficult. Can we at least get an option for more accurate floats, perhaps use long double by default or a more precise float from the boost library? Although not the robust/performant integer solution, it could at least prevent some of these errors.

@alibillalhammoud Any chance you can give me an example of error you're facing? Maybe there are strategies to minimize them. As for moving towards integer coordinates, I've been looking into that but it is a very large refactor and I just don't have the time available to do it properly now.

heitzmann avatar Jul 08 '23 10:07 heitzmann