perf(tools): skip diagnosis for orient-only runs

This commit is contained in:
hm
2026-10-31 20:38:29 +08:00
parent a1f60fe53b
commit 99cc92d2be
+14 -9
View File
@@ -392,6 +392,20 @@ int main(int argc, char** argv) {
if (shells.size() > 16)
std::printf(" ... %zu more shells\n", shells.size() - 16);
const auto v0 = validate(body);
if (orient) {
try {
const auto rep = fix_shell_orientation_strict(body);
std::printf(" orient: flipped=%d ok=%d\n", rep.flipped_faces, rep.ok ? 1 : 0);
} catch (const std::exception& e) {
std::printf(" orient exception: %s\n", e.what());
}
const auto vo = validate(body);
print_validation("orient", vo);
if (!deep && !heal && !pinch) {
if (!(vo.valid && vo.watertightness > 0.99)) ++bad;
continue;
}
}
print_validation("raw", v0);
print_diag(diagnose_body(body));
if (deep) {
@@ -411,15 +425,6 @@ int main(int argc, char** argv) {
}
const bool body_bad = !(v0.valid && v0.watertightness > 0.99);
if (body_bad) ++bad;
if (orient) {
try {
const auto rep = fix_shell_orientation_strict(body);
std::printf(" orient: flipped=%d ok=%d\n", rep.flipped_faces, rep.ok ? 1 : 0);
} catch (const std::exception& e) {
std::printf(" orient exception: %s\n", e.what());
}
print_validation("orient", validate(body));
}
if (pinch && !heal) {
int n = 0;
try {