step-examples/12-3b-wires/Twi131.stp
Sources
- synthesized — no external source cited
Description
ShapeFix_Wire.FixLacking degenerate-edge insertion
Reproducer recipe
Expected kernel behavior
The chain (0,0,0) to (10,0,0) to (10,10,0) to (0,10,0) to (5,5,0) ends with a degenerate edge: a degree-1 B-spline with both control points at (5,5,0) over the null knot range (0.0, 0.0), carrying the same vertex at both ends. A degenerate edge is legitimate only where the underlying surface collapses to a point and where its parametric length is non-zero; there is no surface here and no singularity, so remove it as spurious. What remains is a 7.07-unit gap from (5,5,0) back to (0,0,0), which must be reported as a genuine missing segment or closed with a real edge — never with another degenerate edge, whose direction would be undefined because its ends coincide.
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Tier-3 assertions
shape_null == True
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Twi131: GEOMETRIC_CURVE_SET containing EDGE_LOOP with 5 edges; e1: (0,0,0)â(10,0,0) bottom; e2: (10,0,0)â(10,10,0) right; e3: (10,10,0)â(0,10,0) top; e4: (0,10,0)â(5,5,0) backward jump (non-standard); e5: degenerate EDGE_CURVE (5,5,0)â(5,5,0) param range [0,0] undefined direction IS defect; FixLacking must insert degenerate edge but start==end gives no orientation cue; GEOMETRIC_CURVE_SET IS model entity â OCC yields empty; all EDGE_CURVEs ARE wired into EDGE_LOOP; never orphaned */ 3HEADER; 4FILE_DESCRIPTION(('Twi131'),'2;1'); 5FILE_NAME('Twi131.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,10.0,0.0)); 15#6=VERTEX_POINT('',#5); 16#7=CARTESIAN_POINT('',(0.0,10.0,0.0)); 17#8=VERTEX_POINT('',#7); 18#9=CARTESIAN_POINT('',(5.0,5.0,0.0)); 19#10=VERTEX_POINT('',#9); 20#11=CARTESIAN_POINT('',(0.0,0.0,0.0)); 21#12=DIRECTION('',(1.0,0.0,0.0)); 22#13=VECTOR('',#12,10.0); 23#14=LINE('',#11,#13); 24#15=EDGE_CURVE('',#2,#4,#14,.T.); 25#16=ORIENTED_EDGE('',$,$,#15,.T.); 26#17=CARTESIAN_POINT('',(10.0,0.0,0.0)); 27#18=DIRECTION('',(0.0,1.0,0.0)); 28#19=VECTOR('',#18,10.0); 29#20=LINE('',#17,#19); 30#21=EDGE_CURVE('',#4,#6,#20,.T.); 31#22=ORIENTED_EDGE('',$,$,#21,.T.); 32#23=CARTESIAN_POINT('',(10.0,10.0,0.0)); 33#24=DIRECTION('',(-1.0,0.0,0.0)); 34#25=VECTOR('',#24,10.0); 35#26=LINE('',#23,#25); 36#27=EDGE_CURVE('',#6,#8,#26,.T.); 37#28=ORIENTED_EDGE('',$,$,#27,.T.); 38#29=CARTESIAN_POINT('',(0.0,10.0,0.0)); 39#30=DIRECTION('',(0.707106781187,-0.707106781187,0.0)); 40#31=VECTOR('',#30,7.07106781187); 41#32=LINE('',#29,#31); 42#33=EDGE_CURVE('',#8,#10,#32,.T.); 43#34=ORIENTED_EDGE('',$,$,#33,.T.); 44#35=CARTESIAN_POINT('',(5.0,5.0,0.0)); 45#36=CARTESIAN_POINT('',(5.0,5.0,0.0)); 46#37=B_SPLINE_CURVE_WITH_KNOTS('',1,(#35,#36),.UNSPECIFIED.,.F.,.F.,(2,2),(0.0,0.0),.UNSPECIFIED.); 47#38=EDGE_CURVE('',#10,#10,#37,.T.); 48#39=ORIENTED_EDGE('',$,$,#38,.T.); 49#40=EDGE_LOOP('',(#16,#22,#28,#34,#39)); 50#41=GEOMETRIC_CURVE_SET('',(#40)); 51#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 52#9051=PRODUCT('Twi131','Twi131','',(#9050)); 53#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 54#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 55#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 56#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 57#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 58#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 59#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 60#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 61#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 62#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#41),#9060); 63#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 64ENDSEC; 65END-ISO-10303-21;