Subtract sheres from surfaces

Hi Everyone,

I would like to subtract the volume of some spheres from surfaces.
As you can see, my script works just for one Surface. The second one stays untrimmed.
How will it include the second Surface?

Greetings Markus

area_difference_problem.3dm (26.2 KB) (7.7 KB)

it’s not a data structure, but a geometry problem. it tries to trim the surface, but fails. if you rebuild the patched surfaces or the curves going into the patch, it works on both surfaces.