puiseux
24th November 2014, 17:28
hello,
P and Q are two QPolygonF, with Q strictly included in P. (think about donut, Q is the hole)
This instruction :
PmQ = P.subtracted(Q)
provides a new polygon PmQ, I can easily break down to obtain two polygons, say A and B. One is P, other is Q.
Later on, I need two recognize
- does PmQ comes from subtraction or union of two polygons ?
- which one is the hole ? Is it A or B ?
As I do this a lot of times, I'd like to avoid testing if A is included in B or B included in A.
Is there a simple solution ?
Thanks for your answer.
P and Q are two QPolygonF, with Q strictly included in P. (think about donut, Q is the hole)
This instruction :
PmQ = P.subtracted(Q)
provides a new polygon PmQ, I can easily break down to obtain two polygons, say A and B. One is P, other is Q.
Later on, I need two recognize
- does PmQ comes from subtraction or union of two polygons ?
- which one is the hole ? Is it A or B ?
As I do this a lot of times, I'd like to avoid testing if A is included in B or B included in A.
Is there a simple solution ?
Thanks for your answer.