diff --git a/CreoManager.cpp b/CreoManager.cpp index 113f08c..a9110d6 100644 --- a/CreoManager.cpp +++ b/CreoManager.cpp @@ -35,6 +35,7 @@ const double SHELL_ANALYSIS_MIN_VISIBILITY_RATIO = 0.05; const int SHELL_ANALYSIS_MIN_VOTES = 2; const double SHELL_ANALYSIS_HIGH_VISIBILITY_THRESHOLD = 0.25; const double SHELL_ANALYSIS_MEDIUM_VISIBILITY_THRESHOLD = 0.08; +const double SHELL_ANALYSIS_OCCLUSION_TOLERANCE = 0.5; #include #include #include @@ -2830,8 +2831,8 @@ CreoManager::ProjectionAnalysisData CreoManager::PerformMultiDirectionalProjecti double occlusionBoundary = -std::numeric_limits::max(); for (const auto& proj : projections) { - // If component's nearest point is beyond occlusion boundary, it's visible - if (proj.minProj > occlusionBoundary) { + // If component's nearest point is beyond occlusion boundary (with tolerance), it's visible + if (proj.minProj > occlusionBoundary - SHELL_ANALYSIS_OCCLUSION_TOLERANCE) { result.visibilityVotes[proj.featureId]++; // Update occlusion boundary to this component's farthest point occlusionBoundary = std::max(occlusionBoundary, proj.maxProj);