ISO 7035 is specifically for rigid cellular plastics. Flexible materials (like upholstery foam) require ISO 845. Rubber-based foams may need other standards.
Based on the official method described in the standard (and in a legitimate ISO 7035 PDF), here is the general procedure for determining apparent density in rigid cellular plastics. iso 7035 pdf
Where: