M178 — AP238 inspection_probing path passes through workpiece body

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

crash spec-violation

Sources

Description

An `INSPECTION_PROBING` op's approach segment runs from the probe-storage position straight through the workpiece body to reach the touch point. The probe stylus shears or breaks. Bug-reporter language: "AP238 probe path through part", "STEP-NC inspection collision", "stylus crashes against workpiece".

Reproducer recipe

an `INSPECTION_PROBING` op whose probe path `POLYLINE` runs from `(50,50,200)` to `(50,50,-5)` while the workpiece body occupies the box `(0.100, 0.100, 0.50)`.

Expected kernel behavior

collision-check probe paths against workpiece envelope; reject the op or warn loudly.

Notes

Synonyms: "AP238 probe collision", "STEP-NC inspection path crashes", "probe stylus shears", "inspection trajectory through workpiece".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(3) 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/* M178: AP238 inspection_probing path passes through workpiece body */
3/* DEFECT: INSPECTION_PROBING probe path POLYLINE runs (50,50,200) to (50,50,-5) */
4/* Workpiece 'inspection_block' occupies box (0..100, 0..100, 0..50) */
5/* Probe descends from z=200 through workpiece top face (z=50) to z=-5 */
6/* Probe stylus shears against workpiece body — safe approach required */
7/* Per ISO 10303-238 §6.2 probe paths must be collision-free with workpiece envelope */
8/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
9/* Byte assertion: contains(b'INSPECTION_PROBING(') */
10/* Byte assertion: contains(b'probe_path_through_part') */
11HEADER;
12FILE_DESCRIPTION(('M178: AP238 inspection_probing path through workpiece body'),'2;1');
13FILE_NAME('M178.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/* Probe path points: from storage position straight through workpiece body */
29#30=CARTESIAN_POINT('probe_storage',(50.0,50.0,200.0));
30#31=CARTESIAN_POINT('probe_target',(50.0,50.0,-5.0));
31/* Byte assertion: contains(b'probe_path_through_part') */
32/* DEFECT: POLYLINE descends from (50,50,200) through workpiece body to (50,50,-5) */
33/* Workpiece top face is at z=50; probe enters body at z=50, exits below z=0 */
34#32=POLYLINE('probe_path_through_part',(#30,#31));
35/* GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty */
36#20=GEOMETRIC_CURVE_SET('ap238-inspection-probing-path-through-workpiece-body',
37  (#32,#52,#60));
38/* Byte assertion: contains(b'INSPECTION_PROBING(') */
39/* DEFECT: INSPECTION_PROBING op whose approach path runs through workpiece */
40#52=INSPECTION_PROBING('probe_collision_op',$,#32,$,$,$);
41/* WORKPIECE 'inspection_block': occupies box (0..100, 0..100, 0..50) */
42/* Probe path (50,50,200)->(50,50,-5) passes through this body */
43#60=WORKPIECE('inspection_block','Inspection block workpiece (0..100 0..100 0..50)',$,$,$,$,$);
44/* MACHINING_WORKINGSTEP 'probe_collision_step' links op to workpiece */
45#51=MACHINING_WORKINGSTEP('probe_collision_step','Probe collision workingstep',#52,#60,$);
46/* WORKPLAN: single inspection step with colliding probe path */
47#50=WORKPLAN('probe_collision_program','Probe collision inspection workplan',(),$,(#51));
48/* Product chain */
49#100=APPLICATION_CONTEXT('mechanical design');
50#101=PRODUCT_CONTEXT('',#100,'mechanical');
51#102=PRODUCT('M178','M178','M178',(#101));
52#103=PRODUCT_DEFINITION_FORMATION('','',#102);
53#104=PRODUCT_DEFINITION_CONTEXT(#100,'design');
54#105=PRODUCT_DEFINITION('','',#103,#104);
55#106=PRODUCT_DEFINITION_SHAPE('','',#105);
56#107=SHAPE_REPRESENTATION('',(#20),#14);
57#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107);
58ENDSEC;
59END-ISO-10303-21;