Twi217 — ShapeFix_Wire.FixSeam pcurve-direction-not-matching-3d

§12.3b

topology

Sources

Description

ShapeFix_Wire.FixSeam pcurve-direction-not-matching-3d

Reproducer recipe

Expected kernel behavior

The first edge's 3D line runs from z=0 up to z=2 while its pcurve runs from v=2 down to v=0, so the two representations of one edge traverse it in opposite directions. Detect the disagreement by evaluating both representations at the ends of the edge's range and comparing the points they yield, then reverse the pcurve (or the edge's sense declaration) so both advance together, and store the corrected parametrisation on the edge so that no stale one is left referenced by the face.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Twi217: Single ADVANCED_FACE on CYLINDRICAL_SURFACE (radius 1, height 2) in CLOSED_SHELL; 4-edge EDGE_LOOP forming patch from u=0 to u=pi; seam edge E0 has 3D LINE going upward (z: 0->2, same_sense=T) but PCURVE 2D direction going downward in UV (v: H->0) — u-orientation of pcurve antiparallel to 3D curve IS the defect; FixSeam corrects pcurve but old 3D geometry becomes orphaned — orphaned 3D curve IS the secondary mechanism; EDGE_LOOP IS wired into FACE_OUTER_BOUND -> ADVANCED_FACE in CLOSED_SHELL — never orphaned */
3HEADER;
4FILE_DESCRIPTION(('Twi217'),'2;1');
5FILE_NAME('Twi217.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=CYLINDRICAL_SURFACE('',#4,1.0);
15#6=CARTESIAN_POINT('',(1.0,0.0,0.0));
16#7=VERTEX_POINT('',#6);
17#8=CARTESIAN_POINT('',(1.0,0.0,2.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('',(-1.0,0.0,0.0));
20#11=VERTEX_POINT('',#10);
21#12=CARTESIAN_POINT('',(-1.0,0.0,2.0));
22#13=VERTEX_POINT('',#12);
23#14=CARTESIAN_POINT('',(1.0,0.0,0.0));
24#15=DIRECTION('',(0.0,0.0,1.0));
25#16=VECTOR('',#15,2.0);
26#17=LINE('',#14,#16);
27#18=CARTESIAN_POINT('',(0.0,2.0));
28#19=DIRECTION('',(0.0,-1.0));
29#20=VECTOR('',#19,2.0);
30#21=LINE('',#18,#20);
31#22=DEFINITIONAL_REPRESENTATION('',(#21),#*);
32#23=PCURVE('',#5,#22);
33#24=SURFACE_CURVE('',#17,(#23),.PCURVE_S1.);
34#25=EDGE_CURVE('',#7,#9,#24,.T.);
35#26=ORIENTED_EDGE('',*,*,#25,.T.);
36#27=CARTESIAN_POINT('',(0.0,0.0,2.0));
37#28=AXIS2_PLACEMENT_3D('',#27,#2,#3);
38#29=CIRCLE('',#28,1.0);
39#30=CARTESIAN_POINT('',(0.0,2.0));
40#31=DIRECTION('',(1.0,0.0));
41#32=VECTOR('',#31,3.14159265359);
42#33=LINE('',#30,#32);
43#34=DEFINITIONAL_REPRESENTATION('',(#33),#*);
44#35=PCURVE('',#5,#34);
45#36=SURFACE_CURVE('',#29,(#35),.PCURVE_S1.);
46#37=EDGE_CURVE('',#9,#13,#36,.T.);
47#38=ORIENTED_EDGE('',*,*,#37,.T.);
48#39=CARTESIAN_POINT('',(-1.0,0.0,2.0));
49#40=DIRECTION('',(0.0,0.0,-1.0));
50#41=VECTOR('',#40,2.0);
51#42=LINE('',#39,#41);
52#43=CARTESIAN_POINT('',(3.14159265359,2.0));
53#44=DIRECTION('',(0.0,-1.0));
54#45=VECTOR('',#44,2.0);
55#46=LINE('',#43,#45);
56#47=DEFINITIONAL_REPRESENTATION('',(#46),#*);
57#48=PCURVE('',#5,#47);
58#49=SURFACE_CURVE('',#42,(#48),.PCURVE_S1.);
59#50=EDGE_CURVE('',#13,#11,#49,.T.);
60#51=ORIENTED_EDGE('',*,*,#50,.T.);
61#52=CARTESIAN_POINT('',(0.0,0.0,0.0));
62#53=AXIS2_PLACEMENT_3D('',#52,#2,#3);
63#54=CIRCLE('',#53,1.0);
64#55=CARTESIAN_POINT('',(3.14159265359,0.0));
65#56=DIRECTION('',(-1.0,0.0));
66#57=VECTOR('',#56,3.14159265359);
67#58=LINE('',#55,#57);
68#59=DEFINITIONAL_REPRESENTATION('',(#58),#*);
69#60=PCURVE('',#5,#59);
70#61=SURFACE_CURVE('',#54,(#60),.PCURVE_S1.);
71#62=EDGE_CURVE('',#11,#7,#61,.T.);
72#63=ORIENTED_EDGE('',*,*,#62,.T.);
73#64=EDGE_LOOP('',(#26,#38,#51,#63));
74#65=FACE_OUTER_BOUND('',#64,.T.);
75#66=ADVANCED_FACE('',(#65),#5,.T.);
76#67=CLOSED_SHELL('',(#66));
77#68=SHELL_BASED_SURFACE_MODEL('',(#67));
78#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
79#9051=PRODUCT('Twi217','Twi217','',(#9050));
80#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
81#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
82#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
83#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
84#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
85#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
86#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
87#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
88#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
89#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#68),#9060);
90#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
91ENDSEC;
92END-ISO-10303-21;