step-examples/12-8-mixed/M102.stp
Sources
- deduced from ISO 10303-238 §5.8 drilling_operation positional uniqueness convention
Sender
deduced — CAM publisher producing drill-table from CAD with duplicate features
Description
A workplan emits two `DRILLING_OPERATION`s targeting features whose locator placements are coincident (within tolerance). The second drill attempts to enter an already-fully-drilled hole and breaks the tool from a zero-load entry, or wastes cycle time. Bug-reporter language: "AP238 two drills at same point", "STEP-NC duplicate hole position", "drilling same hole twice".
Reproducer recipe
Two `DRILLING_OPERATION`s whose feature locator `AXIS2_PLACEMENT_3D`s have identical origins `(50,30,0)`.
Expected kernel behavior
detect coincident hole positions; warn or collapse duplicate operations.
Notes
Synonyms: "duplicate hole drill", "coincident drilling targets", "AP238 two drill ops at same point", "STEP-NC redundant drill", "drill-on-drill collision".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'AP238_STEP_NC_MIM')count_entity_def(b'DRILLING_OPERATION') >= 2
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M102: AP238 drilling sequence with coincident hole positions */ 3/* DEFECT: two DRILLING_OPERATIONs target features at identical position (50,30,0) */ 4/* Second drill enters already-drilled hole â breaks tool or wastes cycle time */ 5/* Violates ISO 10303-238 §5.8 drilling_operation positional uniqueness */ 6/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 7/* Byte assertion: count_entity_def(b'DRILLING_OPERATION') >= 2 */ 8HEADER; 9FILE_DESCRIPTION(('M102: AP238 two DRILLING_OPERATIONs at coincident positions'),'2;1'); 10FILE_NAME('M102.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/* First hole locator at (50,30,0) */ 29#20=CARTESIAN_POINT('origin_a',(50.,30.,0.)); 30#21=DIRECTION('z_a',(0.,0.,1.)); 31#22=AXIS2_PLACEMENT_3D('locator_a',#20,#21,$); 32/* DEFECT: Second hole locator at IDENTICAL position (50,30,0) */ 33/* Correct fix: use a distinct position for hole_b, e.g. (100.,30.,0.) */ 34#23=CARTESIAN_POINT('origin_b',(50.,30.,0.)); 35#24=DIRECTION('z_b',(0.,0.,1.)); 36#25=AXIS2_PLACEMENT_3D('locator_b',#23,#24,$); 37/* Feature declarations â hole_a and hole_b at same position */ 38#50=MACHINED_FEATURE('hole_a',$,$,$,$,#22); 39/* hole_b has same locator position â this is the coincident defect */ 40#51=MACHINED_FEATURE('hole_b',$,$,$,$,#25); 41/* Drill bit â 8mm diameter */ 42#60=MACHINING_TOOL('drill_8mm',$,$,$); 43/* Byte assertion: count_entity_def(b'DRILLING_OPERATION') >= 2 */ 44/* First DRILLING_OPERATION on hole_a */ 45#70=DRILLING_OPERATION('drill_a',#60,$,$,$,$,$,$,#50,$,$); 46/* DEFECT: Second DRILLING_OPERATION on hole_b â same position as hole_a */ 47/* Enters already-drilled hole: tool slams through or zero material removal */ 48#71=DRILLING_OPERATION('drill_b',#60,$,$,$,$,$,$,#51,$,$); 49/* Workingsteps in sequence */ 50#80=MACHINING_WORKINGSTEP('drill_step_a',#50,#70,$); 51#81=MACHINING_WORKINGSTEP('drill_step_b',#51,#71,$); 52/* WORKPLAN sequences both steps â second step drills into already-finished hole */ 53#90=WORKPLAN('main',(#80,#81),$,$,$); 54/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 55#300=GEOMETRIC_CURVE_SET('ap238-drilling-sequence-coincident-hole-positions', 56 (#22,#25,#50,#51,#60,#70,#71,#80,#81,#90)); 57/* Product chain */ 58#400=APPLICATION_CONTEXT('mechanical design'); 59#401=PRODUCT_CONTEXT('',#400,'mechanical'); 60#402=PRODUCT('M102','M102','M102',(#401)); 61#403=PRODUCT_DEFINITION_FORMATION('','',#402); 62#404=PRODUCT_DEFINITION_CONTEXT(#400,'design'); 63#405=PRODUCT_DEFINITION('','',#403,#404); 64#406=PRODUCT_DEFINITION_SHAPE('','',#405); 65#407=SHAPE_REPRESENTATION('',(#300),#14); 66#408=SHAPE_DEFINITION_REPRESENTATION(#406,#407); 67ENDSEC; 68END-ISO-10303-21;