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

feature request: create an option to have strmxor generate results xor'ing with "empty" layers #1901

Open
stefanottili opened this issue Oct 18, 2024 · 4 comments

Comments

@stefanottili
Copy link

This is a feature request to have strmxor behave the same way as "all the other lvl tools out there".

If one file has a layer:datatype that's "empty" in the other file, strmxor by default will report the layer as missing to stdout. But it won't output any geometry into the result file. This is in contrast to all the other layers, which will get results. So the result file by itself is not sufficient to "see" what changed when loading it into klayout with the -m option.

The strmxor -l option will write the flattened geometry into the result file.

I would like strmxor to gain an option for the 3rd possible behavior and enable it by default:
Run "scanline xor" against the "empty" 2nd layer:datatype, effectively running an "or" and output that as the result.

This is computationally the most expensive option, but is what all other lvl tools do by default. And thus it makes it easier to compare e.g. the number of result polygon per layer.

@klayoutmatthias
Copy link
Collaborator

Actually, with -l, the implementation is like that, but the non-merging behavior is a consequence of the internal optimization: if a polygon set is XOR'd against an empty one, it is simply copied. It can be turned off ("strict mode"), but there is no option available for this for the strmxor too.

@stefanottili
Copy link
Author

stefanottili commented Oct 19, 2024

I don’t get the last sentence, ..

It can be turned off ("strict mode")

what does strict (oasis) mode have to do with scanline xor ?

but there is no option available for this for the strmxor too.

Well there is currently no option, I know.
But it should be possible to add an option to strmxor to feed the flattened polygon into the scanline instead of bypassing it, no ?

@klayoutmatthias
Copy link
Collaborator

Sorry, that was confusing. I referred to "boolean strict handling" (https://www.klayout.de/doc-qt5/code/class_Region.html#method259).

@klayoutmatthias
Copy link
Collaborator

That is turned off in strmxor and there is no user option to turn it on for now.

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

No branches or pull requests

2 participants