Hello
I'm trying to figure out how big a percent an area of a surface is compared to the area of multiple surfaces.
Hope somebody has any idea of how this can be achieved, basically, I want to know how big a percent each of the A3 is compared to the sum of all the A3's. This is the code I have been writing.
attr rotateLot = 0
attr b1 = 40
attr r1 = 10
attr s1 = 40
attr r2 = 20
attr a0Dist =50
attr dist01 = 10
lot -->
alignScopeToGeometry(yUp, 1)
rotateScope (0,rotateLot,0)
split(x) { b1 : A01 | r1 : B01 | ~1 : A01 | r2: C01 | s1 : D01}
A01 -->
split(z) {a0Dist : A02 | a0Dist : A02 | ~1 : Grass}
A02 -->
innerRectangle(edge) {shape : A03(geometry.area) | remainder = Grass}
A03(area)-->
print(area)
when running the script the console prints the area for the four A03 shapes, is there any way to get the sum of that "list"? If I find the sum the goal is to take the sum and then divide that by the area of each individual shape in order to figure out how large a percent each shape is compared to the whole.
I hope somebody knows how this can be done, or at least an idea of where to look.