diff --git a/CreoManager.cpp b/CreoManager.cpp index b7bda22..83437ee 100644 --- a/CreoManager.cpp +++ b/CreoManager.cpp @@ -1725,6 +1725,10 @@ CreoManager::ShellAnalysisResult CreoManager::AnalyzeShellFeaturesEnhanced(const deletion.part_path = ""; // Not available in current analysis deletion.component_type = "COMPONENT"; + // Set vote count from projection analysis + auto votesIter = visibilityVotes.find(item.feature_id); + deletion.vote_count = (votesIter != visibilityVotes.end()) ? votesIter->second : 0; + if (item.confidence >= 0.8) { // Safe deletion - high confidence internal components result.safe_deletions.push_back(deletion); diff --git a/CreoManager.h b/CreoManager.h index 0e527e0..3be65ef 100644 --- a/CreoManager.h +++ b/CreoManager.h @@ -260,6 +260,7 @@ public: std::string part_path; std::string component_type = "FEATURE"; std::string volume_units = "percentage"; // Added to clarify units + int vote_count = 0; // Number of votes this component received in multi-directional projection analysis }; struct EstimatedReduction { diff --git a/MFCCreoDll.cpp b/MFCCreoDll.cpp index 00a8d14..4faf5fd 100644 --- a/MFCCreoDll.cpp +++ b/MFCCreoDll.cpp @@ -995,7 +995,8 @@ HttpResponse ShellAnalysisHandler(const HttpRequest& request) { << "\"volumeReduction\": " << deletion.volume_reduction << "," << "\"partFile\": \"" << EscapeJsonString(deletion.part_file) << "\"," << "\"partPath\": \"" << EscapeJsonString(deletion.part_path) << "\"," - << "\"componentType\": \"" << EscapeJsonString(deletion.component_type) << "\"" + << "\"componentType\": \"" << EscapeJsonString(deletion.component_type) << "\"," + << "\"voteCount\": " << deletion.vote_count << "}"; } @@ -1016,7 +1017,8 @@ HttpResponse ShellAnalysisHandler(const HttpRequest& request) { << "\"volumeReduction\": " << deletion.volume_reduction << "," << "\"partFile\": \"" << EscapeJsonString(deletion.part_file) << "\"," << "\"partPath\": \"" << EscapeJsonString(deletion.part_path) << "\"," - << "\"componentType\": \"" << EscapeJsonString(deletion.component_type) << "\"" + << "\"componentType\": \"" << EscapeJsonString(deletion.component_type) << "\"," + << "\"voteCount\": " << deletion.vote_count << "}"; } @@ -1037,7 +1039,8 @@ HttpResponse ShellAnalysisHandler(const HttpRequest& request) { << "\"volumeReduction\": " << preserve.volume_reduction << "," << "\"partFile\": \"" << EscapeJsonString(preserve.part_file) << "\"," << "\"partPath\": \"" << EscapeJsonString(preserve.part_path) << "\"," - << "\"componentType\": \"" << EscapeJsonString(preserve.component_type) << "\"" + << "\"componentType\": \"" << EscapeJsonString(preserve.component_type) << "\"," + << "\"voteCount\": " << preserve.vote_count << "}"; }