Loading tools/mesh_converter/MeshElement.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -69,13 +69,17 @@ double MeshElement::get_distance(size_t index, Point& qp) const { } bool MeshElement::isValid(double volume_cut, Point& qp) const { // Check if we should apply coplanar/colinear criterions: if(volume_cut > 0) { if(std::fabs(volume_) < MIN_VOLUME) { LOG(TRACE) << "Invalid tetrahedron, all vertices are " << (dimension_ == 3 ? "coplanar" : "colinear"); return false; } else if(std::fabs(volume_) <= volume_cut) { LOG(TRACE) << "Invalid tetrahedron with volume " << std::fabs(volume_) << " smaller than volume cut " << volume_cut; LOG(TRACE) << "Invalid tetrahedron with volume " << std::fabs(volume_) << " smaller than volume cut " << volume_cut; return false; } } for(size_t i = 0; i < dimension_ + 1; i++) { if(volume_ * get_sub_volume(i, qp) < 0) { Loading tools/mesh_converter/MeshElement.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ namespace mesh_converter { /** * @brief Checks if the tetrahedron is valid for the interpolation * @param volume_cut Threshold for the minimum tetrahedron volume * @param volume_cut Threshold for the minimum tetrahedron volume. Values <= 0 disable coplanarity checks * @param qp Desired point for the interpolation */ bool isValid(double volume_cut, Point& qp) const; Loading Loading
tools/mesh_converter/MeshElement.cpp +10 −6 Original line number Diff line number Diff line Loading @@ -69,13 +69,17 @@ double MeshElement::get_distance(size_t index, Point& qp) const { } bool MeshElement::isValid(double volume_cut, Point& qp) const { // Check if we should apply coplanar/colinear criterions: if(volume_cut > 0) { if(std::fabs(volume_) < MIN_VOLUME) { LOG(TRACE) << "Invalid tetrahedron, all vertices are " << (dimension_ == 3 ? "coplanar" : "colinear"); return false; } else if(std::fabs(volume_) <= volume_cut) { LOG(TRACE) << "Invalid tetrahedron with volume " << std::fabs(volume_) << " smaller than volume cut " << volume_cut; LOG(TRACE) << "Invalid tetrahedron with volume " << std::fabs(volume_) << " smaller than volume cut " << volume_cut; return false; } } for(size_t i = 0; i < dimension_ + 1; i++) { if(volume_ * get_sub_volume(i, qp) < 0) { Loading
tools/mesh_converter/MeshElement.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ namespace mesh_converter { /** * @brief Checks if the tetrahedron is valid for the interpolation * @param volume_cut Threshold for the minimum tetrahedron volume * @param volume_cut Threshold for the minimum tetrahedron volume. Values <= 0 disable coplanarity checks * @param qp Desired point for the interpolation */ bool isValid(double volume_cut, Point& qp) const; Loading