Is there a good way to determine whether one path is included in another?

Is there a good way to determine whether one path is included in another?

Good question. This is tricky, specially with overlapping paths.
One criteria would be if all nodes are inside the other path. But in a case like “A” with a bar being a rect, all points are inside the bigger shape but the path would still be considered outside.

If it judge after execute layer.removeoverlap()?
I want to delete the fragmented small paths contained in the large path after removeoverlap(). Just want to keep the outermost outline paths.

Check path.direction. All positive vales are counters.