It looks like you're new here. If you want to get involved, click one of these buttons!
Hello,
Let's say that we have two layers A and B. I would like to detect shapes of layer B that are between two layer A shapes - assuming that we are only dealing with rectangular shapes.
This is the shape I would like to be detected.
I was considering using interacting (using min and max) and outside/inside (to exclude overlapping shapes) operations but I am not entirely sure how to avoid detecting this scenario
Thank you
Comments
Hi @kareemfarid,
Here is one solution that is based on the separation of edges into horizontal and vertical ones:
It renders this result:
If you want the L1 rectangle selected, add:
The following, somewhat more esoteric solution, renders the same result in a more efficient way:
Matthias
Thanks a lot.
I got another question. In the case of, this implementation:
How to compute the distance between
l2_with_l1_opposite
edges. I thoughtspace
will not work since the edges belong to same polygon shape (not sure if this is a right assumption). But thenwidth
didn't work either.Thank you
Hi @kareemfarid,
First I should correct the above (second) solution. It has this be this:
Reason: the interacting test will otherwise fail in the general case as l1.edges that are perpendicular to l2.edges are counted as well.
However, testing the resulting edges with "width" works for me:
This gives me this:
Matthias
Yes width appears to be working. Perhaps I missed something while testing. Thanks a lot