Threads: a metric size without a coarse pitch suggests its fine pitches again

The thread forms (b4549d270) parse designations in thread_forms, whose refusal for a plain
M28 said "give it: M28x1" and, for M0 or M1e9, still offered a pitch. The hint the hole
command gave (the two coarsest ISO fine pitches that suit the diameter: M28x2 or M28x1.5) is
now thread_forms::no_coarse_pitch, used by both; a diameter no metric thread has is an
unknown metric thread. The test's "unknown thread" follows the forms' wording ("unknown
metric thread").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-29 12:05:37 -04:00
1 parent f8c2fba077
commit 5cc0d5e9c4
3 files changed
+16 -11

No files matched your search

+2 -1
View File
@@ -270,7 +270,8 @@ fn a_thread_without_a_coarse_pitch_suggests_explicit_pitches() {
}
for designation in ["MNaN", "Minf", "M-28", "M0", "M1e9", "M1e999", "M28x", "M28xNaN"] {
let e = s.execute("solid.thread", &json!({"face": [14, 0, 5], "designation": designation})).unwrap_err().to_string();
assert!(e.contains("unknown thread"), "{designation}: {e}");
// Each thread form names itself in its refusal: `unknown metric thread`.
assert!(e.contains("unknown metric thread"), "{designation}: {e}");
assert_eq!(s.doc.to_json(), saved);
}
run(&mut s, "solid.thread", json!({"face": [14, 0, 5], "designation": "M28x2"}));