step-examples/12-5-units/U044.stp
Sources
- OCCT MANTIS#0027980
- bug-reporter language: "gp_Trsf computes incorrect transformation between two gp_Ax3", "placement-to-placement transform is wrong", "STEP MAPPED_ITEM placement gives wrong location". (OCCT MANTIS tracker 502 as of 2026-05-02)
Sender
STEP files with `MAPPED_ITEM` placements where the `mapping_origin` and the `mapping_target` differ in handedness (one is right-handed, the other left-handed).
Description
A `MAPPED_ITEM` requires composing `mapping_target / mapping_origin` to produce the placement transform. When one of the placements is left-handed (the cross product `x × y` does not point along `z`), `gp_Trsf::SetDisplacement` produces a transform that flips the orientation but leaves the geometry in the wrong half-space. The imported instance ends up mirrored or rotated 180° relative to the producer's intent.
Reproducer recipe
STEP file with `MAPPED_ITEM` whose `mapping_origin` is `AXIS2_PLACEMENT_3D(..)` with right-handed axes and `mapping_target` has axes such that `x × y ≠ z`. Imported instance is in the wrong location.
Expected kernel behavior
heal-and-accept; verify both axes orthogonality AND right-handedness when constructing transforms; emit `W_LEFT_HANDED_PLACEMENT` and either flip-and-record or reject. Never produce a silently wrong transform.
Notes
**See also**: U015, U016. Synonyms: "gp_Trsf incorrect transformation between two Ax3", "left-handed placement gives wrong transform", "STEP MAPPED_ITEM placement composition wrong", "AXIS2_PLACEMENT_3D handedness ignored".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'AXIS2_PLACEMENT_3D')contains(b'MAPPED_ITEM') or contains(b'REPRESENTATION_MAP')
Tier-3 assertions
shape_null == True
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* U044: MAPPED_ITEM with left-handed mapping_target AXIS2_PLACEMENT_3D */ 3/* DEFECT: gp_Trsf::SetDisplacement produces wrong transform for left-handed frame */ 4/* mapping_origin: right-handed (z = x cross y = +Z) */ 5/* mapping_target: left-handed (x=(1,0,0), y=(0,-1,0) => x cross y = (0,0,-1) != z=(0,0,1)) */ 6/* Correct receiver: detects handedness mismatch, emits W_LEFT_HANDED_PLACEMENT */ 7/* Buggy receiver: silently computes wrong transform, instance in wrong half-space */ 8HEADER; 9FILE_DESCRIPTION(('U044: Left-handed AXIS2_PLACEMENT_3D in MAPPED_ITEM placement'),'2;1'); 10FILE_NAME('U044.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','',''); 11FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 12ENDSEC; 13DATA; 14/* Standard mm context */ 15#10=(LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.)); 16#11=(NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.)); 17#12=(NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT()); 18#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(0.001),#10, 19 'distance_accuracy_value','maximum model space distance between geometric entities'); 20#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13)) 21 GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12)) REPRESENTATION_CONTEXT('ctx','3D')); 22/* Prototype geometry: a simple point set */ 23#1=CARTESIAN_POINT('proto_origin',(0.,0.,0.)); 24#2=CARTESIAN_POINT('proto_pt_a',(10.,0.,0.)); 25#3=CARTESIAN_POINT('proto_pt_b',(0.,10.,0.)); 26#4=CARTESIAN_POINT('proto_pt_c',(0.,0.,10.)); 27/* mapping_origin: right-handed placement (Z axis = x cross y = +Z) */ 28#20=CARTESIAN_POINT('map_origin_loc',(0.,0.,0.)); 29#21=DIRECTION('map_origin_z',(0.,0.,1.)); 30#22=DIRECTION('map_origin_x',(1.,0.,0.)); 31#23=AXIS2_PLACEMENT_3D('mapping_origin_rh',#20,#21,#22); 32/* mapping_target: left-handed placement */ 33/* x=(1,0,0), y_ref=(0,-1,0) => x cross y_ref = (0,0,-1) which is -Z, not +Z */ 34/* This is the left-handed frame that causes gp_Trsf::SetDisplacement to err */ 35#30=CARTESIAN_POINT('map_target_loc',(50.,0.,0.)); 36#31=DIRECTION('map_target_z',(0.,0.,1.)); 37#32=DIRECTION('map_target_x_lh',(1.,0.,0.)); 38/* Note: ref_direction (0,-1,0) makes the frame left-handed: x cross y_ref = -Z */ 39/* The z-axis parameter still says +Z but the frame is geometrically left-handed */ 40#33=AXIS2_PLACEMENT_3D('mapping_target_lh',#30,#31,#32); 41/* REPRESENTATION_MAP wraps the prototype with its mapping_origin */ 42#40=GEOMETRIC_CURVE_SET('proto_shape',(#1,#2,#3,#4)); 43#41=SHAPE_REPRESENTATION('proto_rep',(#23,#40),#14); 44#42=REPRESENTATION_MAP(#23,#41); 45/* MAPPED_ITEM: places the prototype using mapping_target */ 46/* The transform = mapping_target / mapping_origin; left-handed target causes error */ 47#50=MAPPED_ITEM('placed_instance',#42,#33); 48/* Model entity is GEOMETRIC_CURVE_SET â OCC returns empty shape */ 49#60=GEOMETRIC_CURVE_SET('left-handed-placement-wrong-transform',(#50)); 50ENDSEC; 51END-ISO-10303-21;