Hello Inkscape developers,
I'm working on an Inkscape function that sorts paths in an order suitable
for 3D rendering. For this, I need to know which polygons contain which
other polygons. In my use case, partial containment does not occur, i.e.
every shape is either fully contained or has no crossings.
I tried to implement this "polygon in polygon" functionality by iterating
over all the points of one polygon and using the 2geom function
Geom::contains(Path, Point) to test them for containment. However, I
found several cases where the function does not yield the expected
The current method I use is to test for partial inclusion (at least one
point is included) and the number of crossings (using the Geom::crossings
function) is 0. This is super slow, however, so my question is: how can I
efficiently test whether a polygon is in another polygon?
B.Sc. Pippijn van Steenhoven, Projektleiter
Tel.: +49 721 486995-22, Fax: -21 (Achtung! Neue Nummern)
Mobil: +49 176 78131934, E-Mail: pippijn@...
Open Experience GmbH, Postfach: 111014, 76060 Karlsruhe
Besucher: Zirkel 2 (im Rechenzentrum, Geb. 20.20), 76131 Karlsruhe
Handelsregister: Mannheim HRB 706815, Ust-IdNr.: DE264743573
Vertretungsberechtigter Geschäftsführer: Konstantin Krahtov