There's a command in the PathItem object called evenodd. I think if you get a member path of a compound path and change the evenodd property, you may get a desired result.
The path has been disconnected, possibly from AUTOCAD
Now, I want to connect them, and be able to fill correctly
I tried to do two JS, one to connect the path, one to fill the path
But the efficiency is too low,
Do not know if you have a more sophisticated approach