M096 — AP238 trajectory missing connecting curves between adjacent segments

§12.8 mixed (sub-class: AP238 trajectory continuity)

P1 — silent data loss

crash spec-violation

Sources

Sender

deduced — CAM post-processor emitting tool-up moves implicitly

Description

A `TRAJECTORY` consists of two `COMPOSITE_CURVE_SEGMENT`s whose endpoints don't coincide; segment A ends at `(10,0,0)` and segment B starts at `(20,0,0)`, with no connecting `CURVE` between them. The CAM tool presumably intended a rapid-traverse retract / reposition, but emitted no explicit connector. The controller either fails to plan motion or executes a feed-rate move through the workpiece. Bug-reporter language: "AP238 toolpath has gap", "STEP-NC missing rapid move", "trajectory segments don't connect".

Reproducer recipe

`COMPOSITE_CURVE` with two segments `(0,0,0)→(10,0,0)` and `(20,0,0)→(30,0,0)`, with no third connecting segment, used as a `TRAJECTORY` basis curve.

Expected kernel behavior

validate adjacent-segment continuity; insert a rapid-traverse connector and warn, or reject as discontinuous.

Notes

Synonyms: "AP238 trajectory gap", "missing rapid retract", "trajectory segments don't connect", "STEP-NC composite curve not chained", "toolpath has unconnected segments".

Expected validation

occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a

Byte 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/* M096: AP238 trajectory missing connecting curve between adjacent segments */
3/* DEFECT: COMPOSITE_CURVE segment A ends at (10,0,0); segment B starts at (20,0,0) */
4/* 10 mm gap has no connector — violates ISO 10303-238 §6.2 G0 continuity */
5/* Controller either E-stops at gap or drives tool through workpiece material */
6/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
7/* Byte assertion: contains(b'TRAJECTORY') */
8/* Byte assertion: contains(b'COMPOSITE_CURVE_SEGMENT') */
9HEADER;
10FILE_DESCRIPTION(('M096: AP238 TRAJECTORY with gap between composite curve segments'),'2;1');
11FILE_NAME('M096.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
12/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */
13FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 1 0 0 }'));
14ENDSEC;
15DATA;
16#1=APPLICATION_CONTEXT('step_nc_mim');
17#2=APPLICATION_PROTOCOL_DEFINITION('international standard',
18  'ap238_step_nc_mim',2007,#1);
19/* Standard unit context — mm */
20#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
21#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
22#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
23#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10,
24  'distance_accuracy_value','maximum model space distance between geometric entities');
25#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3)
26  GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
27  GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12))
28  REPRESENTATION_CONTEXT('nc','3D'));
29/* Segment A geometry: (0,0,0) → (10,0,0) */
30#20=CARTESIAN_POINT('seg_a_start',(0.,0.,0.));
31#21=CARTESIAN_POINT('seg_a_end',(10.,0.,0.));
32#22=DIRECTION('seg_a_dir',(1.,0.,0.));
33#23=LINE('seg_a_line',#20,VECTOR('seg_a_vec',#22,10.));
34/* Byte assertion: contains(b'COMPOSITE_CURVE_SEGMENT') */
35/* Segment A: cutting pass from (0,0,0) to (10,0,0) */
36#24=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,#23);
37/* Segment B geometry: (20,0,0) → (30,0,0) */
38/* DEFECT: starts at (20,0,0) — 10 mm gap from segment A endpoint (10,0,0) */
39#30=CARTESIAN_POINT('seg_b_start',(20.,0.,0.));
40#31=CARTESIAN_POINT('seg_b_end',(30.,0.,0.));
41#32=DIRECTION('seg_b_dir',(1.,0.,0.));
42#33=LINE('seg_b_line',#30,VECTOR('seg_b_vec',#32,10.));
43/* Segment B: cutting pass from (20,0,0) to (30,0,0) */
44/* Endpoint of #24 is (10,0,0); start of #34 is (20,0,0) — 10 mm gap — DEFECT */
45#34=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,#33);
46/* DEFECT: COMPOSITE_CURVE with only (#24, #34) — no connector between them */
47/* Adjacent segment endpoints: #24 ends at (10,0,0), #34 starts at (20,0,0) */
48/* Correct: add a third segment (10,0,0)→(20,0,0) for rapid traverse */
49#40=COMPOSITE_CURVE('gapped_toolpath',(#24,#34),.F.);
50/* Byte assertion: contains(b'TRAJECTORY') */
51/* TRAJECTORY uses the gapped COMPOSITE_CURVE as its basis curve */
52#50=TRAJECTORY('toolpath_a',#40,$,$,$,$,$);
53/* Machining setup */
54#60=MACHINING_TOOL('drill_a',$,$,$);
55#70=MACHINING_OPERATION('cut_path',#60,$,$,$,$,$,$,$,$,#50);
56#80=MACHINING_WORKINGSTEP('cut_step',$,#70,$);
57#90=WORKPLAN('main',(#80),$,$,$);
58/* GEOMETRIC_CURVE_SET IS the model entity — OCC yields empty */
59#300=GEOMETRIC_CURVE_SET('ap238-trajectory-missing-connecting-curve-between-segments',
60  (#23,#33,#40,#50,#60,#70,#80,#90));
61/* Product chain */
62#400=APPLICATION_CONTEXT('mechanical design');
63#401=PRODUCT_CONTEXT('',#400,'mechanical');
64#402=PRODUCT('M096','M096','M096',(#401));
65#403=PRODUCT_DEFINITION_FORMATION('','',#402);
66#404=PRODUCT_DEFINITION_CONTEXT(#400,'design');
67#405=PRODUCT_DEFINITION('','',#403,#404);
68#406=PRODUCT_DEFINITION_SHAPE('','',#405);
69#407=SHAPE_REPRESENTATION('',(#300),#14);
70#408=SHAPE_DEFINITION_REPRESENTATION(#406,#407);
71ENDSEC;
72END-ISO-10303-21;