commit 1c2c7134939a5ff9a1c1d875190c945cf7e37bf8
Author: Lukas K <lu@0x83.eu>
Date:   Tue Dec 6 23:06:45 2022 +0100

    gerber output: pass plane fragments through polytree
    
    changelog: Bugfixes/Board Editor: properly export gerber for plane
    fragments in holes of enclosed planes
    
    To trigger this bug, this conditions are needed: a plane consiting of
    one fragment with a hole in it surrounded by another plane and that
    plane having a fragment inside of the hole of the first plane.
    
    The outer plane must have a higher fill order than the inner plane.
    
    Gerber's way of representing holes in polyons is by drawing using 'light
    polarity', i.e. erasing everything below the hole. To account for this,
    planes are added to the gerber image highest fill order first. In this
    particular case, that'd go like this:
    
     - Outer fragment of the outer plane
     - Hole of the outer plane
     - Fragment inside of the hole of the outer plane
     - Ring of the inner plane
     - Hole of the inner plane
    
    The bug is that the hole of the inner plane erases the fragment of the
    outer plane.
    
    To fix this, we need to draw things in the right order. This is
    accomplished using clipper's polytree so that all holes get drawn before
    fragments contained within them, regardless which plane they belong to.
