# Unable to do Mass Addition from a list

Im trying to build an Area calculation, and im almost there. I have 147 polysurfaces in Rhino which are defined in a brep, the brep is the exploded and the lowest Z center is defined with a list item. From there the list is lacking a series ( everything is defined as 0 ) so the mass addition is not able to add Ive attached a screenshot and the gh file. I will be using it to calculate area of the lower surface of a polysurface.

Area2.gh (12.2 KB)

I guess youâ€™re looking for this

Flatten the tree before mass addition

Yes! that solved it. Thankyou! But I ran into another problem. I used a Deconstruct component to explode the brep to isolate out the lowest surface on Z. This works as long as the polysurface is square ( with 6 surfaces ) . Is there another way to isolate the lowest surface in a polysurface? If the lowest one was always 0 it would work in this case since I could isolate it wuth the list view

To explain why your original example failed to do what you wanted, you inputted 147 different lists with 1 item each into Mass Addition, so it outputs a mass-added value for each one of those lists. If you flatten the input, have a single list with 147 items, which is the mass addition you were expecting to get.

As for your new question, try this:

DeBrep gives you a list per input object with all of that objectsâ€™ faces. I plugged those lists into a Sort List component, using the Centroid Z values as the sortable keys, so I know that the first item in the list is always the lowest surface in that polysurface.

Thank you so much for the thorough explanation. I havent done alot of these commands in grasshopper , and Im on deep water, . I recreated it again, but im having trouble assigning the 0 to the list generated from the Debrep. Its now taking an arbitrary value as zero. Than you for your patience.

The idea is to sort the faces by z coordinate and plug simultaneously the area values into the sort list component. If needed to sort also other things like faces, you can just insert another input parameter by zooming into the component and clicking on the +.

The output are sorted lists. All you need to do is get the first value of the sorted area list.
Does it make sense to you?
Look at this:

Great! Everything worked out now, and its finally working. Thankyou!!