add: multiple debug log points to trace execution flow
This commit is contained in:
parent
8e2d78c304
commit
854bc2edc9
@ -1562,6 +1562,21 @@ CreoManager::HierarchyDeleteResult CreoManager::DeleteHierarchyComponents(const
|
||||
CreoManager::ShellAnalysisResult CreoManager::AnalyzeShellFeaturesEnhanced(const ShellAnalysisRequest& request) {
|
||||
ShellAnalysisResult result;
|
||||
|
||||
// Create analysis log file immediately
|
||||
try {
|
||||
SessionInfo sessionInfo = GetSessionInfo();
|
||||
if (sessionInfo.is_valid) {
|
||||
xstring workdir = sessionInfo.session->GetCurrentDirectory();
|
||||
std::string workingDir = XStringToString(workdir);
|
||||
std::string logPath = workingDir + "\\shell_analysis_start.txt";
|
||||
std::ofstream logFile(logPath);
|
||||
logFile << "Shell Analysis Started" << std::endl;
|
||||
logFile << "Time: " << GetCurrentTimeString() << std::endl;
|
||||
logFile << "Working Directory: " << workingDir << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
} catch (...) {}
|
||||
|
||||
try {
|
||||
// Get session
|
||||
SessionInfo sessionInfo = GetSessionInfo();
|
||||
@ -1857,6 +1872,20 @@ CreoManager::ShellAnalysisResult CreoManager::AnalyzeShellFeaturesEnhanced(const
|
||||
|
||||
// Shell Analysis implementation using real OTK geometry APIs
|
||||
CreoManager::ShellAnalysisResult CreoManager::AnalyzeShellFeatures(const ShellAnalysisRequest& request) {
|
||||
// Create test log file immediately
|
||||
try {
|
||||
SessionInfo sessionInfo = GetSessionInfo();
|
||||
if (sessionInfo.is_valid) {
|
||||
xstring workdir = sessionInfo.session->GetCurrentDirectory();
|
||||
std::string workingDir = XStringToString(workdir);
|
||||
std::string testPath = workingDir + "\\test_log.txt";
|
||||
std::ofstream testFile(testPath);
|
||||
testFile << "Test log created at: " << GetCurrentTimeString() << std::endl;
|
||||
testFile << "Working dir: " << workingDir << std::endl;
|
||||
testFile.close();
|
||||
}
|
||||
} catch (...) {}
|
||||
|
||||
return AnalyzeShellFeaturesEnhanced(request);
|
||||
}
|
||||
// Geometry analysis: determine if feature touches model boundary
|
||||
@ -2776,6 +2805,21 @@ std::pair<double, double> CreoManager::CalculateOBBProjectionRange(const OBB& ob
|
||||
CreoManager::ProjectionAnalysisData CreoManager::PerformMultiDirectionalProjectionAnalysis(pfcAssembly_ptr assembly) {
|
||||
ProjectionAnalysisData result;
|
||||
|
||||
// Create projection analysis log file
|
||||
try {
|
||||
SessionInfo sessionInfo = GetSessionInfo();
|
||||
if (sessionInfo.is_valid) {
|
||||
xstring workdir = sessionInfo.session->GetCurrentDirectory();
|
||||
std::string workingDir = XStringToString(workdir);
|
||||
std::string logPath = workingDir + "\\projection_analysis.txt";
|
||||
std::ofstream logFile(logPath);
|
||||
logFile << "Projection Analysis Started" << std::endl;
|
||||
logFile << "Time: " << GetCurrentTimeString() << std::endl;
|
||||
logFile << "Working Directory: " << workingDir << std::endl;
|
||||
logFile.close();
|
||||
}
|
||||
} catch (...) {}
|
||||
|
||||
// Step 1: Collect all components
|
||||
result.components = CollectAllComponents(assembly);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user