gdstk icon indicating copy to clipboard operation
gdstk copied to clipboard

Fixed missing repetition when vector non-standard

Open svollenweider opened this issue 8 months ago • 1 comments

Fixes issue #299

svollenweider avatar Apr 24 '25 13:04 svollenweider

Sorry, I was a bit stressed today and skipped out on the explanation. It seems that in some cases Layout Editor - when you have an array with a single colum or row creates a vectorized repetition pattern (or at least allows it), where the vectors look like this (0,0) and (50,0) in the original code this leads to a pattern which has a spacing of (0,0) so this small change adds a fallback, that if data[3] or data[4] are non zero it is treated as a vecotrized array.

svollenweider avatar Apr 24 '25 16:04 svollenweider

The problem here is that this type of non-orthogonal vectors are not part of the official GDSII specification, afaik (please share with me any reference you night have that specifies that without rotation).

In that sense, please also include a test to make sure the fix works, and that it dies not affect existing layouts.

heitzmann avatar Jul 04 '25 13:07 heitzmann

BTW, your changes don't actually compile properly, so i merged them in https://github.com/heitzmann/gdstk/commit/ecf9675c28006e4b3bfa466f306528f9bb087256.

Please let me know if that works.

heitzmann avatar Jul 04 '25 13:07 heitzmann

I merged it into a new branch, please check and merge into main. Regarding GDSII standard, I agree, but the question arrises if gdstk should support the bare standard, or also the quirks popular editors have. This is up to you to decide.

svollenweider avatar Jul 04 '25 14:07 svollenweider

There's no need to merge this branch anymore, the fix is already in main. I just wanted to know if it really works on your case, if you can compile and test with your mask file.

heitzmann avatar Jul 04 '25 14:07 heitzmann