step-examples/12-3b-wires/Twi077.stp
Sources
- OCCT `ShapeAnalysis_Wire::CheckTail` (`ShapeAnalysis_Wire.hxx:519`)
Description
Two consecutive edges of a wire fold back on themselves at near-180° over a width below tolerance. The "tail" is a degenerate geometric feature (a stick poking into the face). The check identifies the four sub-edges produced when the tail's two long sides are split at their crossing point.
Reproducer recipe
A wire with two long (10–20 mm) edges meeting at a sharp angle, the second edge nearly retracing the first over a 1e-5 mm offset (byte: `CARTESIAN_POINT('',(-10.0,1.0E-05,0.0))`). Small relative to the wire's span, but ~100× ABOVE the file's own 1e-7 mm tolerance — not sub-tolerance.
Expected kernel behavior
detect the tail, report the four sub-edges, and either remove the tail (collapse to a single corner) or reject.
Notes
Distinct from a notch (Twi054): a tail is a fold-back; a notch is a small detour. Synonyms: "wire has 180-degree fold-back", "two edges retrace each other under tolerance", "tail spike sticking into face", "edge pair forms a fold over near-zero width".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'B_dir_retrace_with_1e6_offset')contains(b'(-10.0,0.00001,0.0)')contains(b'tail_pair')
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/* Twi077: GEOMETRIC_CURVE_SET containing EDGE_LOOP with a tail pair; edge A 'tail_pair': (0,0,0)â(10,0,0) â 10-unit forward stroke along X; edge B 'B_dir_retrace_with_1e6_offset': (10,0,0)â(-10.0,0.00001,0.0) â nearly retraces edge A in reverse with sub-tolerance Y offset 1e-5, creating near-180° fold (tail width < 1e-6); CheckTail identifies the 4 sub-edges at the fold-back crossing; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty; all EDGE_CURVEs ARE wired into EDGE_LOOP; never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Twi077'),'2;1'); 5FILE_NAME('Twi077.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=VERTEX_POINT('',#1); 12#3=CARTESIAN_POINT('',(10.0,0.0,0.0)); 13#4=VERTEX_POINT('',#3); 14#5=CARTESIAN_POINT('',(-10.0,1.0E-05,0.0)); 15#6=VERTEX_POINT('',#5); 16#7=DIRECTION('',(1.0,0.0,0.0)); 17#8=VECTOR('',#7,10.0); 18#9=CARTESIAN_POINT('',(0.0,0.0,0.0)); 19#10=LINE('tail_pair',#9,#8); 20#11=EDGE_CURVE('',#2,#4,#10,.T.); 21#12=ORIENTED_EDGE('',$,$,#11,.T.); 22#13=DIRECTION('',(-1.0,5.0E-07,0.0)); 23#14=VECTOR('',#13,20.0); 24#15=CARTESIAN_POINT('',(10.0,0.0,0.0)); 25#16=LINE('B_dir_retrace_with_1e6_offset',#15,#14); 26#17=EDGE_CURVE('',#4,#6,#16,.T.); 27#18=ORIENTED_EDGE('',$,$,#17,.T.); 28#19=EDGE_LOOP('',(#12,#18)); 29#20=GEOMETRIC_CURVE_SET('',(#19)); 30#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 31#9051=PRODUCT('Twi077','Twi077','',(#9050)); 32#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 33#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 34#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 35#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 36#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 37#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 38#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 39#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 40#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 41#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#20),#9060); 42#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 43ENDSEC; 44END-ISO-10303-21;