Sorry for taking a while to review your latest patch (btw, did not mean to throw any eggs, you're doing great work!). Your last patch is definitely better, but can you track closedness per subpath? As it is now, if you have two subpaths, one closed and one open they will both become closed (not a major problem, but it would be a shame to introduce a new, albeit less problematic, bug).
Sorry for taking a while to review your latest patch (btw, did not mean to throw any eggs, you're doing great work!). Your last patch is definitely better, but can you track closedness per subpath? As it is now, if you have two subpaths, one closed and one open they will both become closed (not a major problem, but it would be a shame to introduce a new, albeit less problematic, bug).