#include "MRMesh/MRMeshLoad.h"
#include "MRMesh/MRPointsToMeshProjector.h"
#include "MRMesh/MRMesh.h"
#include <iostream>
{
if ( !refMesh.has_value() )
{
std::cerr << refMesh.error();
return 1;
}
if ( !mesh.has_value() )
{
std::cerr << mesh.error();
return 1;
}
auto minmax = std::minmax_element(
MR::begin( vertDistances ),
MR::end( vertDistances ) );
std::cout << "Distance between reference mesh and the closest point of target mesh is " << *minmax.first << "\n";
std::cout << "Distance between reference mesh and the farthest point of target mesh is " << *minmax.second << "\n";
return 0;
}
MR_BIND_IGNORE auto begin(const BitSet &a)
MR_BIND_IGNORE auto end(const BitSet &)
MRMESH_API Expected< Mesh > fromAnySupportedFormat(const std::filesystem::path &file, const MeshLoadSettings &settings={})
MRMESH_API VertScalars findSignedDistances(const Mesh &refMesh, const VertCoords &testPoints, const VertBitSet *validTestPoints={}, const MeshProjectionParameters ¶ms={}, IPointsToMeshProjector *projector={})