25 Eigen::Vector3d x_magnitude = Eigen::Vector3d::Zero();
26 auto const x_ref = nodes[0]->asEigenVector3d();
28 for (
auto const& node : nodes)
30 auto const x = node->asEigenVector3d();
31 x_magnitude += (x - x_ref).cwiseAbs();
35 if (x_magnitude[2] > 0)
40 const auto computed_dimension = std::count_if(
41 x_magnitude.begin(), x_magnitude.end(),
42 [](
const double x_i_magnitude)
43 { return x_i_magnitude > std::numeric_limits<double>::epsilon(); });
46 if (computed_dimension == 1 && x_magnitude[1] > 0)
51 return static_cast<int>(computed_dimension);