step-examples/12-8-mixed/M183.stp
Sources
- 16-iso-spec ISO 10303-238 §5.4 workpiece_setup machine-axis-alignment guidance
- bug-reporter language: "AP238 workpiece setup rotated", "STEP-NC setup not square to machine", "fixture skew without rotary axis".
Description
A `WORKPIECE_SETUP`'s placement axes are rotated 17.3 degrees about the machine Z-axis with no rotational fixturing declared. The machine cannot drive its X/Y stages along the workpiece's local axes; every toolpath issues compound moves that exceed acceleration limits. Bug-reporter language: "AP238 workpiece-setup rotation without rotary axis", "STEP-NC setup not aligned to machine", "workpiece coords skewed".
Reproducer recipe
`WORKPIECE_SETUP` whose `AXIS2_PLACEMENT_3D` x-axis is `DIRECTION((0.9550, 0.2974, 0.0))` (17.3 deg rotation), with no rotary fixturing referenced.
Expected kernel behavior
validate workpiece-setup orientation against machine axes when no rotary stage is declared; warn or reject.
Notes
Synonyms: "AP238 workpiece-setup rotated", "STEP-NC fixture not square", "setup CS skew without rotary stage", "workpiece coords misaligned".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'AP238_STEP_NC_MIM')contains(b'WORKPIECE_SETUP')contains(b'workpiece_csys_rotated')
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/* M183: AP238 workpiece_setup coordinate system not aligned with machine axes */ 3/* DEFECT: WORKPIECE_SETUP x-axis (0.9550, 0.2974, 0.0) â 17.3 deg rotation about Z */ 4/* No rotary fixturing or rotary stage declared in this file */ 5/* Machine cannot drive linear X/Y stages along skewed workpiece axes */ 6/* Every toolpath requires compound simultaneous moves exceeding acceleration limits */ 7/* Per ISO 10303-238 §5.4 setup orientation must align with machine axes (no rotary) */ 8/* Byte assertion: contains(b'AP238_STEP_NC_MIM') */ 9/* Byte assertion: contains(b'WORKPIECE_SETUP') */ 10/* Byte assertion: contains(b'workpiece_csys_rotated') */ 11HEADER; 12FILE_DESCRIPTION(('M183: AP238 workpiece_setup rotated 17.3 deg with no rotary fixturing'),'2;1'); 13FILE_NAME('M183.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/* mm length unit reference for MEASURE_WITH_UNIT */ 29#15=SI_UNIT(.MILLI.,.METRE.); 30/* GEOMETRIC_CURVE_SET IS the model entity â OCC yields empty */ 31#20=GEOMETRIC_CURVE_SET('ap238-workpiece-setup-coordinate-system-not-aligned-with-machine-axes', 32 (#41,#52,#60)); 33/* Setup origin at machine zero */ 34#30=CARTESIAN_POINT('setup_origin',(0.0,0.0,0.0)); 35/* Machine Z-axis (vertical) */ 36#31=DIRECTION('machine_z',(0.0,0.0,1.0)); 37/* DEFECT: x-axis rotated 17.3 degrees â cos(17.3 deg)=0.9550, sin(17.3 deg)=0.2974 */ 38#32=DIRECTION('rotated_x',(0.9550,0.2974,0.0)); 39/* DEFECT: skewed coordinate system â 17.3 deg rotation about Z-axis */ 40#33=AXIS2_PLACEMENT_3D('rotated_csys',#30,#31,#32); 41/* NC workpiece being positioned in the skewed setup */ 42#40=WORKPIECE('nc_workpiece','Workpiece for skewed setup test',$,$,$,$,$); 43/* Byte assertion: contains(b'WORKPIECE_SETUP') */ 44/* Byte assertion: contains(b'workpiece_csys_rotated') */ 45/* DEFECT: WORKPIECE_SETUP using rotated_csys â 17.3 deg skew, no rotary stage */ 46#41=WORKPIECE_SETUP('workpiece_csys_rotated',#33,#40,$,$,$); 47/* WORKPIECE 'mill_workpiece' for the milling step */ 48#60=WORKPIECE('mill_workpiece','Workpiece for skewed-setup milling',$,$,$,$,$); 49/* MILLING_OPERATION for the skewed setup scenario */ 50#52=MILLING_OPERATION('mill_op',$,$,$,$,$,$,$,$,$,$,$,$); 51/* MACHINING_WORKINGSTEP links milling op to workpiece */ 52#51=MACHINING_WORKINGSTEP('mill_step','Skewed setup mill step',#52,#60,$); 53/* WORKPLAN: milling on skewed workpiece setup without rotary stage */ 54#50=WORKPLAN('skewed_setup_program','Skewed setup milling workplan',(),$,(#51)); 55/* Product chain */ 56#100=APPLICATION_CONTEXT('mechanical design'); 57#101=PRODUCT_CONTEXT('',#100,'mechanical'); 58#102=PRODUCT('M183','M183','M183',(#101)); 59#103=PRODUCT_DEFINITION_FORMATION('','',#102); 60#104=PRODUCT_DEFINITION_CONTEXT(#100,'design'); 61#105=PRODUCT_DEFINITION('','',#103,#104); 62#106=PRODUCT_DEFINITION_SHAPE('','',#105); 63#107=SHAPE_REPRESENTATION('',(#20),#14); 64#108=SHAPE_DEFINITION_REPRESENTATION(#106,#107); 65ENDSEC; 66END-ISO-10303-21;