M171 — AP238 thread_turning pitch differs from thread-spec pitch

§12.8 mixed (sub-class: AP238 deep machining)

spec-violation

Sources

Description

A `THREAD_TURNING` op declares a lead/pitch of 1.5 mm while the referenced thread feature's spec is M10x1.0 (pitch 1.0 mm). The controller cuts a thread whose pitch doesn't match the design intent; the mating fastener won't thread in. Bug-reporter language: "AP238 thread pitch mismatch", "STEP-NC thread-turn wrong lead", "M10x1 cut as M10x1.5".

Reproducer recipe

a `THREAD` feature with spec pitch 1.0 mm and a `THREAD_TURNING` op whose declared pitch is 1.5 mm; the two attributes refer to the same feature.

Expected kernel behavior

validate that thread-turning pitch matches the referenced thread feature's spec; reject as malformed or warn loudly.

Notes

Synonyms: "AP238 thread pitch disagrees with spec", "STEP-NC thread-turn lead wrong", "thread feature vs op pitch mismatch", "lathe cuts wrong thread pitch".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* M171: AP238 thread_turning pitch differs from thread-spec pitch */
3/* DEFECT: THREAD_TURNING pitch=1.5mm; THREAD feature spec pitch=1.0mm (M10x1.0) */
4/* Controller cuts M10x1.5 thread; M10x1.0 mating fastener won't engage */
5/* STEP-NC programmer used coarse-thread template instead of fine-thread */
6/* Per ISO 10303-238 §5.8 thread_turning pitch must match feature spec */
7/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
8/* Byte assertion: contains(b'THREAD_TURNING') */
9/* Byte assertion: contains(b'THREAD(') */
10HEADER;
11FILE_DESCRIPTION(('M171: AP238 thread_turning pitch 1.5mm vs thread-spec M10x1.0'),'2;1');
12FILE_NAME('M171.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
13/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
14FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 3 1 1 1 }'));
15ENDSEC;
16DATA;
17/* Standard unit context (mm) */
18#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
19#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
20#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
21#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
22  'distance_accuracy_value','maximum model space distance between geometric entities');
23#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3)
24  GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
25  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12))
26  REPRESENTATION_CONTEXT('ctx','3D'));
27/* mm length unit reference for MEASURE_WITH_UNIT */
28#15=SI_UNIT(.MILLI.,.METRE.);
29/* GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty */
30#20=GEOMETRIC_CURVE_SET('ap238-thread-turning-pitch-1p5mm-vs-thread-spec-1p0mm',
31  (#52,#60));
32/* WORKPLAN 'thread_turn_program' — AP238 top-level NC program */
33#50=WORKPLAN('thread_turn_program','M10x1.0 thread turning workplan',(),$,(#51));
34/* MACHINING_WORKINGSTEP links workpiece to thread-turning operation */
35#51=MACHINING_WORKINGSTEP('thread_turn_step','Thread turning workingstep',#52,#60,$);
36/* Byte assertion: contains(b'THREAD(') */
37/* THREAD 'M10x1p0_thread': M10x1.0 feature — spec pitch = 1.0mm */
38#61=MEASURE_WITH_UNIT(POSITIVE_LENGTH_MEASURE(1.0),#15);
39#60=THREAD('M10x1p0_thread','M10x1.0 thread feature',$,#61,$);
40/* Byte assertion: contains(b'THREAD_TURNING') */
41/* DEFECT: THREAD_TURNING pitch = 1.5mm, but THREAD feature spec is 1.0mm */
42#53=MEASURE_WITH_UNIT(POSITIVE_LENGTH_MEASURE(1.5),#15);
43#52=THREAD_TURNING('thread_turn_pass',$,$,$,#53,#60,$);
44/* Product chain */
45#100=APPLICATION_CONTEXT('mechanical design');
46#101=PRODUCT_CONTEXT('',#100,'mechanical');
47#102=PRODUCT('M171','M171','M171',(#101));
48#103=PRODUCT_DEFINITION_FORMATION('','',#102);
49#104=PRODUCT_DEFINITION_CONTEXT(#100,'design');
50#105=PRODUCT_DEFINITION('','',#103,#104);
51#106=PRODUCT_DEFINITION_SHAPE('','',#105);
52#107=SHAPE_REPRESENTATION('',(#20),#14);
53#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107);
54ENDSEC;
55END-ISO-10303-21;