step-examples/12-3b-wires/Twi286.stp
Sources
- OCCT `BRepCheck_Wire::Closed` / internal-orientation checks (`BRepCheck_Wire.cxx:1048,1051`) — sets/returns `BRepCheck_SelfIntersectingWire`
Description
A wire's own edges cross each other in the host face's parameter space. Four straight edges form the classic bow-tie: `(0,0,0)->(10,10,0)->(10,0,0)->(0,10,0)->(0,0,0)`; edges 0 and 2 are the two diagonals of the nominal square and cross at `(5,5,0)` in both 3D and the plane's UV (identity frame). Deliberately minimal: one `ADVANCED_FACE`, one `PLANE`, one `EDGE_LOOP`, one `OPEN_SHELL` — no second face, no crash-prone geometry, no other defect layered in, isolating the self-intersection from the confounders present in this corpus's earlier attempts at this mechanism (Twi049's two-face setup, Twi076's revisited-vertex framing).
Reproducer recipe
`ADVANCED_FACE` on a `PLANE`; `FACE_OUTER_BOUND` → `EDGE_LOOP` of four `ORIENTED_EDGE`s whose `LINE` geometry forms a bow-tie (diagonals of a square crossing at the centre); `OPEN_SHELL` → `SHELL_BASED_SURFACE_MODEL`.
Expected kernel behavior
detect the self-intersection point(s) in UV/3D; split the wire at the intersection into two simple loops, remove the degenerate sub-loop, or reject the face as malformed. A diagnostic citing the offending edge pair should be available.
Notes
**See also**: Twi049, Twi076 (prior attempts at this mechanism, both carrying an explicit "checker does not fire" annotation). **Live-oracle finding (this fixture, verified against OCCT 7.8.1)**: the reader's default healing sequence repairs self-intersecting wires unconditionally on import — confirmed identical under both heal-on and heal-off oracle settings (neither toggles the import-time operator sequence that performs the split); only bypassing the reader's default resource/sequence entirely — which none of this corpus's oracle configurations do — leaves the wire unrepaired for the validity checker to observe. The reader silently splits the bow-tie into two valid triangular faces (`n_faces_total==2` post-import, `brepcheck.valid==True`) before the validity check ever runs on the original single self-intersecting wire; this is the same "silently heals on import" outcome already documented for Twi009, Twi010, Twi050, Twi076 and the ~120 other self-intersection-adjacent fixtures cataloged in `OCCT_HEAL_COVERAGE.md`. The defect IS genuinely encoded in the DATA-section bytes (one crossing `EDGE_LOOP` on one live `ADVANCED_FACE`, reachable, never orphaned) and IS geometrically self-intersecting by construction; what is not observable via any of this corpus's standard reader configurations is the live self-intersecting-wire validity status on the as-read shape, because the reader's own healing pass resolves it first (runtime-scaffold verification confirms the status fires when the checker is invoked on the unhealed geometry directly). NEEDS-ORACLE-REFRESH: not applicable — Expected validation below was captured live against this exact fixture, not mirrored from a sibling. Synonyms: "bow-tie wire on real face", "wire crosses itself in UV", "figure-eight self-intersecting wire minimal", "diagonals of square wire cross", "self-intersecting wire silently healed on import". Provenance tier: bytes-sufficient.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(13) ifc=schema_n/a
Closure intent
sheet — the open shell is the intended final geometry; a solid-only kernel should cleanly refuse.
Byte assertions
count_entity_def(b'ADVANCED_FACE') == 1count_entity_def(b'EDGE_CURVE') == 4contains(b'(0.0,0.0,0.0)')contains(b'(10.0,10.0,0.0)')
Tier-3 assertions
n_edges_total >= 4face[0].surface_type == "plane"
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/* Twi286: OPEN_SHELL with ONE ADVANCED_FACE on a PLANE (z=0, normal +Z); FACE_OUTER_BOUND references an EDGE_LOOP of four edges forming a bow-tie: (0,0,0)->(10,10,0)->(10,0,0)->(0,10,0)->(0,0,0); edges 0 and 2 are the two diagonals of the nominal square and cross at (5,5,0) in both 3D and the plane's UV; the self-crossing wire IS the mechanism â BRepCheck_Wire::SelfIntersect targets exactly this pattern (BRepCheck_SelfIntersectingWire status); no second face, no other defect layered in â minimal isolation; the EDGE_LOOP IS wired into FACE_OUTER_BOUND, ADVANCED_FACE, OPEN_SHELL, SHELL_BASED_SURFACE_MODEL â never orphaned; kernel must detect the UV/3D crossing, split the wire at the intersection into two simple loops, or reject the face as malformed */ 3HEADER; 4FILE_DESCRIPTION(('Twi286'),'2;1'); 5FILE_NAME('Twi286.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,10.0,0.0)); 18#9=VERTEX_POINT('',#8); 19#10=CARTESIAN_POINT('',(10.0,0.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('',(0.0,0.0,0.0)); 24#15=DIRECTION('',(0.707106781187,0.707106781187,0.0)); 25#16=VECTOR('',#15,14.1421356237); 26#17=LINE('',#14,#16); 27#18=EDGE_CURVE('',#7,#9,#17,.T.); 28#19=ORIENTED_EDGE('',$,$,#18,.T.); 29#20=CARTESIAN_POINT('',(10.0,10.0,0.0)); 30#21=DIRECTION('',(0.0,-1.0,0.0)); 31#22=VECTOR('',#21,10.0); 32#23=LINE('',#20,#22); 33#24=EDGE_CURVE('',#9,#11,#23,.T.); 34#25=ORIENTED_EDGE('',$,$,#24,.T.); 35#26=CARTESIAN_POINT('',(10.0,0.0,0.0)); 36#27=DIRECTION('',(-0.707106781187,0.707106781187,0.0)); 37#28=VECTOR('',#27,14.1421356237); 38#29=LINE('',#26,#28); 39#30=EDGE_CURVE('',#11,#13,#29,.T.); 40#31=ORIENTED_EDGE('',$,$,#30,.T.); 41#32=CARTESIAN_POINT('',(0.0,10.0,0.0)); 42#33=DIRECTION('',(0.0,-1.0,0.0)); 43#34=VECTOR('',#33,10.0); 44#35=LINE('',#32,#34); 45#36=EDGE_CURVE('',#13,#7,#35,.T.); 46#37=ORIENTED_EDGE('',$,$,#36,.T.); 47#38=EDGE_LOOP('',(#19,#25,#31,#37)); 48#39=FACE_OUTER_BOUND('',#38,.T.); 49#40=ADVANCED_FACE('',(#39),#5,.T.); 50#41=OPEN_SHELL('',(#40)); 51#42=SHELL_BASED_SURFACE_MODEL('',(#41)); 52#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 53#9051=PRODUCT('Twi286','Twi286','',(#9050)); 54#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 55#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 56#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 57#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 58#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 59#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 60#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 61#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 62#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 63#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#42),#9060); 64#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 65ENDSEC; 66END-ISO-10303-21;