step-examples/12-3b-wires/Twi099.stp
Sources
- OCCT MANTIS#0027580
- bug-reporter language: "edge curve with identical vertices reported on file generated by OCCT itself", "EDGE_CURVE with same start and end vertex", "self-loop edge written by exporter". (OCCT MANTIS tracker 502 as of 2026-05-02)
Sender
OCCT's own STEP writer when round-tripping an edge whose two endpoint vertices are within tolerance and got merged upstream.
Description
An `EDGE_CURVE` references the same `VERTEX_POINT` instance for both its start and end vertex slots. This makes the edge a single-point self-loop; a degenerate edge with zero arc length. The producer is OCCT itself, so the same kernel that emits the file is the only one that fully accepts it; strict downstream readers (STEP-File-Analyzer, JSDAI) flag it as an invariant violation.
Reproducer recipe
`#10=VERTEX_POINT('',#11);` followed by `#20=EDGE_CURVE('',#10,#10,#15,.T.);` referencing the same vertex twice — start and end both `#10`.
Expected kernel behavior
reject — emit `E_DEGENERATE_EDGE` when the start and end vertex of an `EDGE_CURVE` resolve to the same vertex instance unless the underlying curve is closed (e.g., full circle); writers must collapse zero-length edges before export.
Notes
**See also**: Twi045, Tsh021. Synonyms: "edge curve with identical vertices", "self-loop EDGE_CURVE", "zero-length edge written by OCCT", "STEP edge endpoints are the same vertex".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'EDGE_CURVE')matches(rb'EDGE_CURVE\([^)]*#(\d+),#\1')
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/* Twi099: GEOMETRIC_CURVE_SET containing EDGE_LOOP with one EDGE_CURVE; EDGE_CURVE references the SAME VERTEX_POINT for both start and end (self-loop); underlying curve is a LINE (not a closed curve) so edge is degenerate zero-length; OCCT itself generates this when two endpoint vertices fall within tolerance and merge; strict readers flag E_DEGENERATE_EDGE; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty; EDGE_CURVE IS wired into EDGE_LOOP; never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Twi099'),'2;1'); 5FILE_NAME('Twi099.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('',(5.0,5.0,0.0)); 11#2=DIRECTION('',(1.0,0.0,0.0)); 12#3=VECTOR('',#2,1.0); 13#4=CARTESIAN_POINT('',(5.0,5.0,0.0)); 14#5=LINE('',#4,#3); 15#6=VERTEX_POINT('',#1); 16#7=EDGE_CURVE('',#6,#6,#5,.T.); 17#8=ORIENTED_EDGE('',*,*,#7,.T.); 18#9=EDGE_LOOP('',(#8)); 19#10=GEOMETRIC_CURVE_SET('',(#9)); 20#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 21#9051=PRODUCT('Twi099','Twi099','',(#9050)); 22#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 23#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 24#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 25#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 26#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 27#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 28#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 29#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 30#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 31#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#10),#9060); 32#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 33ENDSEC; 34END-ISO-10303-21;