step-examples/12-3b-wires/Twi290.stp
Sources
- OCCT `StepToTopoDS_TranslateEdge::MakeFromCurve3D` (`StepToTopoDS_TranslateEdge.cxx:459-481`) — non-closed-curve branch: builds a `Geom_Line` between the vertex points when `V1 != V2` ("this edge has null arc length"), otherwise nullifies the result ("NULL EDGE, SKIPPED", Twi018's branch)
Description
An edge's 3D curve cannot be validly trimmed between its two vertex parameters — a near-zero-length or otherwise malformed arc — even though the curve itself is not closed and the two declared vertices are genuinely distinct points. OCCT discards the STEP-specified curve for this edge and substitutes a straight line segment built directly between the two vertex points. This fixture's "right" edge of an ordinary square wire uses a `LINE` anchored at the edge's own midpoint `(10,5,0)` running perpendicular (+Z) to the square's plane; both corner vertices `(10,0,0)` and `(10,10,0)` are distinct 3D points, but each one's orthogonal projection onto this perpendicular line lands at the identical curve parameter `w=0`, so the trim collapses to null arc length on a genuinely open (non-periodic) curve. Twi018 covers the sibling `V1==V2` branch, where the edge is dropped entirely instead of substituted.
Reproducer recipe
`ADVANCED_FACE` on a `PLANE` (square); `EDGE_LOOP` of four edges — three ordinary `LINE`-based edges plus one `EDGE_CURVE('',#v1,#v2,#line,.T.)` where `#line` runs perpendicular to the square's plane through the edge's midpoint, and `#v1`/`#v2` are the square's own (distinct) corner vertices, both of which project orthogonally onto the same point on `#line`.
Expected kernel behavior
detect that the declared curve cannot be validly trimmed between the two vertex parameters (construction failure, e.g. OCCT's `BRepBuilderAPI_LineThroughIdenticPoints`); since `V1 != V2`, substitute a straight `Geom_Line` directly between the two vertex points rather than dropping the edge; or reject the edge as malformed.
Notes
**See also**: Twi018 (the sibling identical-vertices branch — edge dropped, not substituted). Verified live via two independent checks: (1) direct OCP construction — `BRepBuilderAPI_MakeEdge(line, v1, v2, w1=0.0, w2=0.0)` raises `BRepBuilderAPI_LineThroughIdenticPoints` for this exact vertex/curve configuration; (2) full STEP round-trip through this corpus's `occt_heal_on`/`occt_heal_off` oracle — the resulting edge's analytic curve comes back as a fresh `line` with direction `(0,1,0)` (a straight segment from `(10,0,0)` to `(10,10,0)`), NOT the declared perpendicular `(0,0,1)`-direction `LINE` — confirming the fallback substitution fired exactly as the catalog claim describes, and the shape stays a clean single face (`n_faces_total==1`, `brepcheck.valid==True`), unlike the periodic-curve "same parameter -> full period" outcome (Twi017/Twi019) that a `CIRCLE`-based attempt at this mechanism produced instead. Synonyms: "malformed arc trim falls back to straight line", "null arc length on non-closed curve", "distinct vertices same curve parameter", "line substituted for undeclared arc", "BRepBuilderAPI_LineThroughIdenticPoints fallback". Provenance tier: bytes-sufficient.
Expected validation
occt=shape(1)/shape(1) gmsh=shape(9) 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'VERTEX_POINT') == 4count_entity_def(b'EDGE_CURVE') == 4contains(b'(10.0,5.0,0.0)')contains(b'(10.0,0.0,0.0)')contains(b'(10.0,10.0,0.0)')
Tier-3 assertions
face[0].surface_type == "plane"n_edges_total >= 4
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/* Twi290: 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 10x10 square; the 'right' edge (from (10,0,0) to (10,10,0)) is replaced by an EDGE_CURVE whose curve is a LINE anchored at (10,5,0) running along +Z, PERPENDICULAR to the square's own plane â genuinely open/non-closed, never a periodic curve; both (10,0,0) and (10,10,0) are DISTINCT 3D points whose orthogonal projection onto this perpendicular LINE lands at the SAME point (10,5,0) â identical curve parameter w=0 for both â so the trim between them collapses to null arc length despite the curve being open and the vertices genuinely distinct â this IS the mechanism; OCCT's non-closed-curve branch must discard the STEP LINE for this edge and substitute a straight Geom_Line directly between the two vertex points (V1 != V2 -> fallback line, not edge drop); the defect edge IS one of the square's own four EDGE_LOOP members, wired into FACE_OUTER_BOUND, ADVANCED_FACE, OPEN_SHELL â never orphaned, no extra dangling edges */ 3HEADER; 4FILE_DESCRIPTION(('Twi290'),'2;1'); 5FILE_NAME('Twi290.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,0.0,0.0)); 18#9=VERTEX_POINT('',#8); 19#10=CARTESIAN_POINT('',(10.0,10.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=DIRECTION('',(1.0,0.0,0.0)); 24#15=VECTOR('',#14,10.0); 25#16=CARTESIAN_POINT('',(0.0,0.0,0.0)); 26#17=LINE('',#16,#15); 27#18=EDGE_CURVE('',#7,#9,#17,.T.); 28#19=CARTESIAN_POINT('',(10.0,5.0,0.0)); 29#20=DIRECTION('',(0.0,0.0,1.0)); 30#21=VECTOR('',#20,1.0); 31#22=LINE('',#19,#21); 32#23=EDGE_CURVE('',#9,#11,#22,.T.); 33#24=DIRECTION('',(-1.0,0.0,0.0)); 34#25=VECTOR('',#24,10.0); 35#26=CARTESIAN_POINT('',(10.0,10.0,0.0)); 36#27=LINE('',#26,#25); 37#28=EDGE_CURVE('',#11,#13,#27,.T.); 38#29=DIRECTION('',(0.0,-1.0,0.0)); 39#30=VECTOR('',#29,10.0); 40#31=CARTESIAN_POINT('',(0.0,10.0,0.0)); 41#32=LINE('',#31,#30); 42#33=EDGE_CURVE('',#13,#7,#32,.T.); 43#34=ORIENTED_EDGE('',$,$,#18,.T.); 44#35=ORIENTED_EDGE('',*,*,#23,.T.); 45#36=ORIENTED_EDGE('',$,$,#28,.T.); 46#37=ORIENTED_EDGE('',$,$,#33,.T.); 47#38=EDGE_LOOP('',(#34,#35,#36,#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('Twi290','Twi290','',(#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;