step-examples/12-8-mixed/M172.stp
Sources
- 16-iso-spec ISO 10303-238 §5.8 turning_operation rotational-workpiece prerequisite
- bug-reporter language: "AP238 turning a block", "STEP-NC lathe op on non-rotating part", "turning workpiece has no spindle axis".
Description
A `TURNING_OPERATION` targets a `WORKPIECE` that has no rotational-axis declaration (no spindle_axis, no axis_of_revolution placement). The controller has no axis to spin the stock around; turning is meaningless on a non-rotating workpiece. Bug-reporter language: "AP238 turn op on prismatic block", "STEP-NC missing rotation axis", "lathe op without spindle axis".
Reproducer recipe
a `WORKPIECE` declared with no axis_of_revolution; a `TURNING_OPERATION` whose workingstep mounts that workpiece.
Expected kernel behavior
validate that the workpiece declares a rotational axis when targeted by a turning operation; reject or warn.
Notes
Synonyms: "AP238 turning prismatic part", "STEP-NC missing rotation axis on lathe op", "block targeted by turning operation", "turn op without spindle axis".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'AP238_STEP_NC_MIM')contains(b'TURNING_OPERATION(')contains(b'WORKPIECE(')
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/* M172: AP238 turning_operation on workpiece without rotation axis */ 3/* DEFECT: WORKPIECE 'prismatic_block' has no axis_of_revolution or spindle_axis */ 4/* Turning requires workpiece to rotate about spindle axis â none declared */ 5/* STEP-NC programmer applied lathe op template to milling-machine workpiece */ 6/* Per ISO 10303-238 §5.8 turning op workpiece must declare rotational axis */ 7/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 8/* Byte assertion: contains(b'TURNING_OPERATION(') */ 9/* Byte assertion: contains(b'WORKPIECE(') */ 10HEADER; 11FILE_DESCRIPTION(('M172: AP238 turning_operation on workpiece with no rotation axis'),'2;1'); 12FILE_NAME('M172.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 13/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 14FILE_SCHEMA(('AP238_STEP_NC_MIM { 1 0 10303 238 3 1 1 1 }')); 15ENDSEC; 16DATA; 17/* Standard unit context (mm) */ 18#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 19#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 20#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 21#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 22 'distance_accuracy_value','maximum model space distance between geometric entities'); 23#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) 24 GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 25 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) 26 REPRESENTATION_CONTEXT('ctx','3D')); 27/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 28#20=GEOMETRIC_CURVE_SET('ap238-turning-operation-on-workpiece-without-rotation-axis', 29 (#52,#60)); 30/* WORKPLAN 'turn_no_axis_program' â AP238 top-level NC program */ 31#50=WORKPLAN('turn_no_axis_program','Turning no-axis defect workplan',(),$,(#51)); 32/* MACHINING_WORKINGSTEP links workpiece to turning operation */ 33#51=MACHINING_WORKINGSTEP('turn_no_axis_step','No-rotation-axis turning workingstep',#52,#60,$); 34/* Byte assertion: contains(b'TURNING_OPERATION(') */ 35#52=TURNING_OPERATION('turn_no_axis',$,$,$,$,$,$); 36/* Byte assertion: contains(b'WORKPIECE(') */ 37/* DEFECT: WORKPIECE has no axis_of_revolution â all optional axis fields are null */ 38/* A prismatic block with no rotation axis is an invalid target for turning operations */ 39#60=WORKPIECE('prismatic_block','Prismatic block workpiece no rotation axis',$,$,$,$,$); 40/* Product chain */ 41#100=APPLICATION_CONTEXT('mechanical design'); 42#101=PRODUCT_CONTEXT('',#100,'mechanical'); 43#102=PRODUCT('M172','M172','M172',(#101)); 44#103=PRODUCT_DEFINITION_FORMATION('','',#102); 45#104=PRODUCT_DEFINITION_CONTEXT(#100,'design'); 46#105=PRODUCT_DEFINITION('','',#103,#104); 47#106=PRODUCT_DEFINITION_SHAPE('','',#105); 48#107=SHAPE_REPRESENTATION('',(#20),#14); 49#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107); 50ENDSEC; 51END-ISO-10303-21;