Fix: shape point without projection

This commit is contained in:
Filip Sykala - NTB T15p 2022-07-13 14:50:32 +02:00
parent 8eda845562
commit b9ea049ff4

View File

@ -2747,9 +2747,11 @@ std::vector<bool> priv::select_patches(
const VCutAOIs &cuts)
{
std::vector<bool> in_distances(patches.size(), {false});
for (const ProjectionDistance &d : best_distances)
for (const ProjectionDistance &d : best_distances) {
// exist valid projection for shape point?
if (d.patch_index == std::numeric_limits<uint32_t>::max()) continue;
in_distances[d.patch_index] = true;
}
// For sure of the bounding boxes intersection
const double bb_extension = 1e-10;
const Vec3d bb_ext(bb_extension, bb_extension, bb_extension);
@ -2764,6 +2766,8 @@ std::vector<bool> priv::select_patches(
std::vector<bool> result(patches.size(), {false});
for (const ProjectionDistance &d : best_distances) {
// exist valid projection for shape point?
if (d.patch_index == std::numeric_limits<uint32_t>::max()) continue;
if (result[d.patch_index]) continue;
// Add all connected patches
// This is way to add patche without source shape point