Since LEGO™ pieces are pretty uniform and there are known pieces, it seems that the engineering math would be easy enough. Once someone has done the work of transcribing the 1x1, 2x1, 2x2, etc pieces and plates into a LEGO™ Calculator.
I am sure these already exist in a minimal form to help pack a cup with LEGO pieces when you buy them from a LEGO™ store.
Since LEGO™ pieces are pretty uniform and there are known pieces, it seems that the engineering math would be easy enough. Once someone has done the work of transcribing the 1x1, 2x1, 2x2, etc pieces and plates into a LEGO™ Calculator.
I am sure these already exist in a minimal form to help pack a cup with LEGO pieces when you buy them from a LEGO™ store.