Rigid foam modeling for cubing applications