New dimension functions $\Cal{G}$-dim and $\Cal{R}$-dim, where $\Cal{G}$ is a class of finite simplicial complexes and $\Cal{R}$ is a class of $ANR$-compacta, are introduced. Their definitions are based on the theorem on partitions and on the theorem on inessential mappings to cubes, respectively. If $\Cal{R}$ is a class of compact polyhedra, then for its arbitrary triangulation $\tau$, we have ${\Cal{R}}_\tau\text{-dim}\,X={\Cal{R}}\text{-dim}\,X$ for an arbitrary normal space $X$. To investigate the dimension function $\Cal{R}$-dim we apply results of extension theory. Internal properties of this dimension function are similar to those of the Lebesgue dimension. The following inequality $\Cal{R}\text{-dim}\,X\leq\tx{\rm dim}\,X$ holds for an arbitrary class $\Cal{R}$. We discuss the following Question: When $\Cal{R}$-$\text{\rm dim}\,X<\infty\Rightarrow\text{\rm dim}\,X<\infty$?