If this works for you, I must be doing something wrong.....
I get only one accumulation then despite multiple adds the value never changes.
Based on my understanding one Scad this is basically what I expected....so there must be
a trick here I don't grasp.
I declared/initialized the total outside any code (I also tried it inside various places) but if I echo after each add it never changes.
after the loops that drill the object the value echoed is the initial value...like the loops had their own scope...which makes some sense but still I can't accumulate any data even just trying to do accumulations at the global level fails.
Could you post a small example snippet that shows how this works for you?