The Construction of Cubature Formulae and Ideals of Principal Classes