Discount area between overlapping geometries

I am developing a program in Dynamo, which helped me fill out my layout. However, I have come across a difficulty! I need to calculate the area of ​​my “talhão” so that this calculation takes into account the area of ​​the tree or other object that is inside my “talhão”.

  1. Group the curves by type
  2. Pull the geometry (and generate polycurves from each if they aren’t polycurves already)
  3. Generate a surface of each by patching
  4. Generate a polysurface for each group of surfaces
  5. Intersect poly surface A with polysurface B
  6. Get the area of the resulting polysurface - this is the number you requested