From d032cbcad15a66ebe5d12803bc734b79fb3f2f50 Mon Sep 17 00:00:00 2001 From: hm-thinkbook14p Date: Wed, 4 Nov 2026 20:23:57 +0800 Subject: [PATCH] fix(cli): reuse body diagnostics instead of re-running diagnose --- tools/CMakeLists.txt | 4 ++++ tools/vde_brep_check.cpp | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index a4e59c49..3f1ab052 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -52,6 +52,10 @@ if(TARGET vde_brep) add_executable(vde_brep_check vde_brep_check.cpp) target_link_libraries(vde_brep_check PRIVATE vde) target_compile_features(vde_brep_check PRIVATE cxx_std_17) + if(MSVC) + target_link_options(vde_brep_check PRIVATE + "/MAP:${CMAKE_BINARY_DIR}/vde_brep_check.map") + endif() if(VDE_INSTALL_SDK) include(GNUInstallDirs) install(TARGETS vde_brep_check RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/tools/vde_brep_check.cpp b/tools/vde_brep_check.cpp index ff9037ab..c51afd67 100644 --- a/tools/vde_brep_check.cpp +++ b/tools/vde_brep_check.cpp @@ -723,7 +723,10 @@ int run_check(int argc, char** argv) { } } print_validation("raw", v0); - print_diag(diagnose_body(body)); + if (bi < imported.diagnostic.body_diagnostics.size()) + print_diag(imported.diagnostic.body_diagnostics[bi]); + else + print_diag(diagnose_body(body)); bool deep_tolerance_bad = false; if (deep) { const auto tol = tolerance_analysis(body);