| 150 | } |
| 151 | |
| 152 | size_t getVertexIndex(const Point3d& point3d, std::vector<Point3d>& allPoints, double tol = 0.001) { |
| 153 | size_t n = allPoints.size(); |
| 154 | for (size_t i = 0; i < n; ++i) { |
| 155 | if (std::sqrt(std::pow(point3d.x() - allPoints[i].x(), 2) + std::pow(point3d.y() - allPoints[i].y(), 2) |
| 156 | + std::pow(point3d.z() - allPoints[i].z(), 2)) |
| 157 | < tol) { |
| 158 | return i; |
| 159 | } |
| 160 | } |
| 161 | allPoints.push_back(point3d); |
| 162 | return (allPoints.size() - 1); |
| 163 | } |
| 164 | |
| 165 | std::string getBoundaryMaterialName(const ThreeUserData& userData) { |
| 166 | std::string result; |