M101 — AP238 two5d_milling_operation applied to a 3D-only feature

§12.8 mixed (sub-class: AP238 operation/feature compatibility)

P1 — silent data loss

spec-violation

Sources

Sender

deduced — CAM publisher mis-classifying feature dimensionality

Description

A `TWO5D_MILLING_OPERATION` (Z-constant, X-Y contour pass) references a feature whose toolpath topology is intrinsically 3D; e.g. a `FREEFORM_FEATURE` on a sculpted surface. The 2.5D Z-step semantics cannot represent the surface; consumers either silently approximate (gouging the surface or leaving stock) or fail to plan motion. Bug-reporter language: "AP238 2.5D op on 3D feature", "STEP-NC contour can't follow surface", "wrong operation type for feature".

Reproducer recipe

A `TWO5D_MILLING_OPERATION` whose `its_feature` attribute references a freeform-surface feature.

Expected kernel behavior

validate operation-feature dimensionality match; reject or warn that operation is geometrically inadequate.

Notes

Synonyms: "2.5D vs 3D mismatch", "AP238 operation feature dimensionality", "Z-step on freeform".

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/* M101: AP238 TWO5D_MILLING_OPERATION applied to a 3D-only feature */
3/* DEFECT: TWO5D_MILLING_OPERATION references FREEFORM_FEATURE (sculpted surface) */
4/* 2.5D Z-step semantics cannot follow intrinsically 3D surface curvature */
5/* Violates ISO 10303-238 §5.8 two5d_milling_operation applicability constraints */
6/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
7/* Byte assertion: contains(b'TWO5D_MILLING_OPERATION') */
8HEADER;
9FILE_DESCRIPTION(('M101: AP238 TWO5D_MILLING_OPERATION on 3D freeform feature'),'2;1');
10FILE_NAME('M101.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
11/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
12FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 1 0 0 }'));
13ENDSEC;
14DATA;
15#1=APPLICATION_CONTEXT('step_nc_mim');
16#2=APPLICATION_PROTOCOL_DEFINITION('international standard',
17  'ap238_step_nc_mim',2007,#1);
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('nc','3D'));
28/* DEFECT target: FREEFORM_FEATURE is an intrinsically 3D feature */
29/* Sculpted surfaces require simultaneous X, Y, Z motion — incompatible with 2.5D */
30#50=FREEFORM_FEATURE('sculpted_surface',$,$,$,$,$);
31/* Ball-end mill for the (incorrectly typed) operation */
32#60=MACHINING_TOOL('ballmill_6mm',$,$,$);
33/* Byte assertion: contains(b'TWO5D_MILLING_OPERATION') */
34/* DEFECT: TWO5D_MILLING_OPERATION references its_feature=#50 (FREEFORM_FEATURE) */
35/* A 2.5D operation cannot represent 3D surface curvature — gouge or stock remains */
36#70=TWO5D_MILLING_OPERATION('contour_2p5d',#60,$,$,$,$,$,$,#50,$,$);
37/* Workingstep and workplan */
38#80=MACHINING_WORKINGSTEP('contour_step',#50,#70,$);
39#90=WORKPLAN('main',(#80),$,$,$);
40/* GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty */
41#300=GEOMETRIC_CURVE_SET('ap238-two5d-milling-op-on-3d-freeform-feature',
42  (#50,#60,#70,#80,#90));
43/* Product chain */
44#400=APPLICATION_CONTEXT('mechanical design');
45#401=PRODUCT_CONTEXT('',#400,'mechanical');
46#402=PRODUCT('M101','M101','M101',(#401));
47#403=PRODUCT_DEFINITION_FORMATION('','',#402);
48#404=PRODUCT_DEFINITION_CONTEXT(#400,'design');
49#405=PRODUCT_DEFINITION('','',#403,#404);
50#406=PRODUCT_DEFINITION_SHAPE('','',#405);
51#407=SHAPE_REPRESENTATION('',(#300),#14);
52#408=SHAPE_DEFINITION_REPRESENTATION(#406,#407);
53ENDSEC;
54END-ISO-10303-21;