M170 — AP238 turning feed-direction ambiguous (radial vs axial conflict)

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

spec-violation

Sources

Description

A `TURNING_OPERATION` carries two contradictory feed-direction attributes: one says radial (X-axis), the other says axial (Z-axis). The controller has no way to decide whether to perform a face-turning or longitudinal-turning move; some implementations pick the first, some the second, some refuse. Bug-reporter language: "AP238 turning feed direction ambiguous", "STEP-NC radial-vs-axial feed conflict", "turning op declares two feed axes".

Reproducer recipe

a `TURNING_OPERATION` populated with both `radial_feed = DIRECTION((1.0,0.0,0.0))` and `axial_feed = DIRECTION((0.0,0.0,1.0))` as separate non-null feed_direction-class attributes.

Expected kernel behavior

detect contradictory feed-direction attributes; reject as malformed or pick a documented default and warn.

Notes

Synonyms: "AP238 feed direction conflict", "STEP-NC turning has two feeds", "radial vs axial ambiguity", "turning operation feed axis undecidable".

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/* M170: AP238 turning feed-direction ambiguous (radial vs axial conflict) */
3/* DEFECT: TURNING_OPERATION has both radial_feed (X) and axial_feed (Z) populated */
4/* Per ISO 10303-238 §5.8 a turning op must have a single feed_direction invariant */
5/* Controller cannot decide face-turning vs longitudinal-turning — behaviour diverges */
6/* STEP-NC programmer merged two template operations, leaving both attributes non-null */
7/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
8/* Byte assertion: contains(b'TURNING_OPERATION(') */
9/* Byte assertion: contains(b'radial_feed') */
10/* Byte assertion: contains(b'axial_feed') */
11HEADER;
12FILE_DESCRIPTION(('M170: AP238 turning_operation radial vs axial feed direction conflict'),'2;1');
13FILE_NAME('M170.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
14/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
15FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 3 1 1 1 }'));
16ENDSEC;
17DATA;
18/* Standard unit context (mm) */
19#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
20#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
21#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
22#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
23  'distance_accuracy_value','maximum model space distance between geometric entities');
24#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3)
25  GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
26  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12))
27  REPRESENTATION_CONTEXT('ctx','3D'));
28/* GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty */
29#20=GEOMETRIC_CURVE_SET('ap238-turning-operation-radial-vs-axial-feed-conflict',
30  (#52,#60));
31/* WORKPLAN 'turn_ambiguous_program' — AP238 top-level NC program */
32#50=WORKPLAN('turn_ambiguous_program','Ambiguous feed turning program',(),$,(#51));
33/* MACHINING_WORKINGSTEP links workpiece to turning operation */
34#51=MACHINING_WORKINGSTEP('ambiguous_feed_step','Ambiguous feed workingstep',#52,#60,$);
35/* Byte assertion: contains(b'radial_feed') */
36/* Byte assertion: contains(b'axial_feed') */
37/* DEFECT: both feed_direction attributes non-null simultaneously */
38/* radial_feed: (1.0,0.0,0.0) — face-turning direction */
39#53=DIRECTION('radial_feed',(1.0,0.0,0.0));
40/* axial_feed: (0.0,0.0,1.0) — longitudinal-turning direction */
41#54=DIRECTION('axial_feed',(0.0,0.0,1.0));
42/* Byte assertion: contains(b'TURNING_OPERATION(') */
43/* TURNING_OPERATION: tool=$ speed=$ feed=radial_feed feed2=axial_feed ... */
44#52=TURNING_OPERATION('turn_ambiguous_feed',$,$,#53,#54,$,$);
45/* WORKPIECE 'turn_workpiece' */
46#60=WORKPIECE('turn_workpiece','Workpiece for ambiguous-feed turning',$,$,$,$,$);
47/* Product chain */
48#100=APPLICATION_CONTEXT('mechanical design');
49#101=PRODUCT_CONTEXT('',#100,'mechanical');
50#102=PRODUCT('M170','M170','M170',(#101));
51#103=PRODUCT_DEFINITION_FORMATION('','',#102);
52#104=PRODUCT_DEFINITION_CONTEXT(#100,'design');
53#105=PRODUCT_DEFINITION('','',#103,#104);
54#106=PRODUCT_DEFINITION_SHAPE('','',#105);
55#107=SHAPE_REPRESENTATION('',(#20),#14);
56#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107);
57ENDSEC;
58END-ISO-10303-21;