step-examples/12-3b-wires/Twi062.stp
Sources
- OCCT `ShapeAnalysis_Edge::CheckCurve3dWithPCurve` (`ShapeAnalysis_Edge.hxx:193`)
Description
At the edge's first parameter `t=0`, the 3D curve evaluates to the start vertex but the pcurve, lifted through the host surface, evaluates to the end vertex (and vice versa at `t=1`). The two representations disagree about which way the edge runs. Reprojection-based imports often produce this when the projector picks the opposite sweep.
Reproducer recipe
A square face where one edge's pcurve runs `(10,0)→(10,10)` in UV but the corresponding 3D curve was emitted with reversed `LINE` direction.
Expected kernel behavior
detect the directional mismatch; flip the pcurve sense (or the 3D curve's parameter direction), re-validate same-parameter, and continue. Alternative: reject as malformed.
Notes
FixReversed2d (existing entry) is the corresponding healer. Synonyms: "spatial and parametric edge directions disagree", "reversed parametric trace direction", "edge runs forward in 3D backward in UV", "import direction confusion on edge".
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a
Closure intent
sheet — the open shell is the intended final geometry; a solid-only kernel should cleanly refuse.
Tier-3 assertions
n_edges_total >= 4face[0].surface_type == "plane"n_vertices_total >= 8
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi062: ADVANCED_FACE on a PLANE (10x10 square); the right edge uses a SURFACE_CURVE with a 3D LINE running (10,0,0)â(10,10,0) (+Y direction) as the 3D curve; its embedded PCURVE in UV space runs from UV=(10,10) to UV=(10,0) â exactly reversed: pcurve direction is -V while 3D direction is +Y; at t=0 the 3D curve evaluates to start vertex (10,0,0) but the pcurve lifts to (10,10,0) which is the END vertex â direction mismatch IS mechanism; CheckCurve3dWithPCurve detects this: 3D and pcurve traverse edge in opposite senses; all EDGE_CURVEs ARE wired into EDGE_LOOP â FACE_OUTER_BOUND â ADVANCED_FACE in CLOSED_SHELL â never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Twi062'),'2;1'); 5FILE_NAME('Twi062.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=CARTESIAN_POINT('',(0.0,0.0,0.0)); 11#2=DIRECTION('',(0.0,0.0,1.0)); 12#3=DIRECTION('',(1.0,0.0,0.0)); 13#4=AXIS2_PLACEMENT_3D('',#1,#2,#3); 14#5=PLANE('',#4); 15#6=CARTESIAN_POINT('',(0.0,0.0,0.0)); 16#7=VERTEX_POINT('',#6); 17#8=CARTESIAN_POINT('',(10.0,0.0,0.0)); 18#9=VERTEX_POINT('',#8); 19#10=CARTESIAN_POINT('',(10.0,10.0,0.0)); 20#11=VERTEX_POINT('',#10); 21#12=CARTESIAN_POINT('',(0.0,10.0,0.0)); 22#13=VERTEX_POINT('',#12); 23#14=CARTESIAN_POINT('',(5.0,0.0,0.0)); 24#15=VERTEX_POINT('',#14); 25#16=CARTESIAN_POINT('',(5.0,10.0,0.0)); 26#17=VERTEX_POINT('',#16); 27#18=CARTESIAN_POINT('',(0.0,5.0,0.0)); 28#19=VERTEX_POINT('',#18); 29#20=CARTESIAN_POINT('',(10.0,5.0,0.0)); 30#21=VERTEX_POINT('',#20); 31#22=CARTESIAN_POINT('',(0.0,0.0,0.0)); 32#23=DIRECTION('',(1.0,0.0,0.0)); 33#24=VECTOR('',#23,10.0); 34#25=LINE('',#22,#24); 35#26=EDGE_CURVE('',#7,#9,#25,.T.); 36#27=ORIENTED_EDGE('',$,$,#26,.T.); 37#28=CARTESIAN_POINT('',(10.0,0.0,0.0)); 38#29=DIRECTION('',(0.0,1.0,0.0)); 39#30=VECTOR('',#29,10.0); 40#31=LINE('',#28,#30); 41#32=CARTESIAN_POINT('',(10.0,10.0)); 42#33=DIRECTION('',(0.0,-1.0)); 43#34=VECTOR('',#33,10.0); 44#35=LINE('',#32,#34); 45#36=DEFINITIONAL_REPRESENTATION('',(#35),#*); 46#37=PCURVE('',#5,#36); 47#38=SURFACE_CURVE('',#31,(#37),.PCURVE_S1.); 48#39=EDGE_CURVE('',#9,#11,#38,.T.); 49#40=ORIENTED_EDGE('',*,*,#39,.T.); 50#41=CARTESIAN_POINT('',(10.0,10.0,0.0)); 51#42=DIRECTION('',(-1.0,0.0,0.0)); 52#43=VECTOR('',#42,10.0); 53#44=LINE('',#41,#43); 54#45=EDGE_CURVE('',#11,#13,#44,.T.); 55#46=ORIENTED_EDGE('',$,$,#45,.T.); 56#47=CARTESIAN_POINT('',(0.0,10.0,0.0)); 57#48=DIRECTION('',(0.0,-1.0,0.0)); 58#49=VECTOR('',#48,10.0); 59#50=LINE('',#47,#49); 60#51=EDGE_CURVE('',#13,#7,#50,.T.); 61#52=ORIENTED_EDGE('',$,$,#51,.T.); 62#53=EDGE_LOOP('',(#27,#40,#46,#52)); 63#54=FACE_OUTER_BOUND('',#53,.T.); 64#55=ADVANCED_FACE('',(#54),#5,.T.); 65#56=CLOSED_SHELL('',(#55)); 66#57=SHELL_BASED_SURFACE_MODEL('',(#56)); 67#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 68#9051=PRODUCT('Twi062','Twi062','',(#9050)); 69#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 70#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 71#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 72#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 73#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 74#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 75#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 76#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 77#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 78#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#57),#9060); 79#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 80ENDSEC; 81END-ISO-10303-21;