This paper, about a fluid-like system of spatially confined particles, reveals the analytic structure for both, the canonical and grand canonical partition functions. The studied system is inhomogeneously distributed in a region whose boundary is made by planar faces without any particular symmetry. This type of geometrical body in the d-dimensional space is a polytope. The presented result in the case of d = 3 gives the conditions under which the partition function is a polynomial in the volume, surface area, and edges length of the confinement vessel. Equivalent results for the cases d = 1, 2 are also obtained. Expressions for the coefficients of each monomial are explicitly given using the cluster integral theory.