Twi304 — Multi-face shared full-circle edge that must NOT be collapsed as a "small edge" (protection case)

§12.3b wire-loop (sub-class: `tkshh-wire-small-edge`, PARTIAL, missing subvariant "small edge shared by faces where a circle-like closed curve must NOT be collapsed, protection case")

P2 — spec deviation (no data loss)

topology

Sources

Description

The SAME full-circle `EDGE_CURVE` (`shared_small_circle_edge`, radius 0.02, small relative to the model's 1×1 bounding box) is used as BOTH the `FACE_BOUND` (hole) of a big square face AND the `FACE_OUTER_BOUND` of a small disk face — a genuinely shared entity, not independently duplicated, referenced by TWO different `ADVANCED_FACE`s. `shared_small_circle_edge`'s start==end vertex (naive endpoint distance 0) but its midpoint (the antipodal point on the circle, 0.04 away — 2× radius) is far enough from the vertex that `CheckSmall`'s midpoint test must correctly NOT flag it as a small/degenerate edge. Dropping it would corrupt BOTH faces at once (the big face loses its hole, the disk face loses its entire boundary).

Reproducer recipe

`big_face`: `FACE_OUTER_BOUND` = 1×1 square, `FACE_BOUND` = `shared_small_circle_edge` reversed (hole at center `(0.5,0.5)` radius 0.02); `disk_face`: `FACE_OUTER_BOUND` = the SAME `shared_small_circle_edge`, forward. Both `ADVANCED_FACE`s in one `OPEN_SHELL`.

Expected kernel behavior

protect the circle-like closed edge from being dropped as a small/degenerate edge despite the naive zero endpoint distance.

Notes

**See also**: Twi013, N010, N014, Twi138, Twi237, Twi184 (single-face sliver cases; this fixture raises the stakes by genuinely sharing the protected edge across two faces). Live-verified (this worktree, OCP/OCCT 7.8.1): `occt=shape(1)/shape(1)`, `n_faces_total=2` (both planes), `n_edges_total=6`, `n_vertices_total=12`, `brepcheck.valid=True`; `count_entity_def(b'EDGE_CURVE')==5` confirms the circle edge is genuinely shared (5 definitions for 6 oriented-edge uses across 2 faces). Synonyms: "circle-like closed curve protection", "shared hole boundary must not collapse", "multi-face small edge protection", "midpoint test leaves and returns", "full circle edge naive zero distance". Provenance tier: bytes-sufficient.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(12) ifc=schema_n/a

Closure intent

sheet — the open shell is the intended final geometry; a solid-only kernel should cleanly refuse.

Byte assertions

Tier-3 assertions

Cross-references

Twi013, N010, N014, Twi138, Twi237, Twi184

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Twi304: OPEN_SHELL with TWO ADVANCED_FACEs on the SAME PLANE (z=0, normal +Z): big_face (FACE_OUTER_BOUND = 1x1 square, FACE_BOUND = shared_small_circle_edge reversed, hole at center (0.5,0.5) radius 0.02) and disk_face (FACE_OUTER_BOUND = the SAME shared_small_circle_edge, forward) -- a genuinely SHARED EDGE_CURVE entity (not independently duplicated) referenced by BOTH faces' loops; shared_small_circle_edge is a full CIRCLE, start==end at one VERTEX_POINT (naive endpoint distance 0) but midpoint is 0.04 away (2x radius) from that vertex -- ShapeAnalysis_Wire::CheckSmall's midpoint test must protect it from being dropped as a small/degenerate edge despite the naive zero endpoint distance; dropping it would corrupt BOTH faces at once; EDGE_LOOPs IS wired into FACE_OUTER_BOUND/FACE_BOUND, ADVANCED_FACE, OPEN_SHELL; never orphaned */
3HEADER;
4FILE_DESCRIPTION(('Twi304'),'2;1');
5FILE_NAME('Twi304.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('',(1.0,0.0,0.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('',(1.0,1.0,0.0));
20#11=VERTEX_POINT('',#10);
21#12=CARTESIAN_POINT('',(0.0,1.0,0.0));
22#13=VERTEX_POINT('',#12);
23#14=DIRECTION('',(1.0,0.0,0.0));
24#15=VECTOR('',#14,1.0);
25#16=CARTESIAN_POINT('',(0.0,0.0,0.0));
26#17=LINE('sq_bottom',#16,#15);
27#18=EDGE_CURVE('sq_bottom',#7,#9,#17,.T.);
28#19=DIRECTION('',(0.0,1.0,0.0));
29#20=VECTOR('',#19,1.0);
30#21=CARTESIAN_POINT('',(1.0,0.0,0.0));
31#22=LINE('sq_right',#21,#20);
32#23=EDGE_CURVE('sq_right',#9,#11,#22,.T.);
33#24=DIRECTION('',(-1.0,0.0,0.0));
34#25=VECTOR('',#24,1.0);
35#26=CARTESIAN_POINT('',(1.0,1.0,0.0));
36#27=LINE('sq_top',#26,#25);
37#28=EDGE_CURVE('sq_top',#11,#13,#27,.T.);
38#29=DIRECTION('',(0.0,-1.0,0.0));
39#30=VECTOR('',#29,1.0);
40#31=CARTESIAN_POINT('',(0.0,1.0,0.0));
41#32=LINE('sq_left',#31,#30);
42#33=EDGE_CURVE('sq_left',#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=CARTESIAN_POINT('',(0.52,0.5,0.0));
49#40=VERTEX_POINT('',#39);
50#41=CARTESIAN_POINT('',(0.5,0.5,0.0));
51#42=AXIS2_PLACEMENT_3D('',#41,#2,#3);
52#43=CIRCLE('',#42,0.0200000000);
53#44=EDGE_CURVE('shared_small_circle_edge',#40,#40,#43,.T.);
54#45=ORIENTED_EDGE('',*,*,#44,.F.);
55#46=EDGE_LOOP('',(#45));
56#47=FACE_OUTER_BOUND('',#38,.T.);
57#48=FACE_BOUND('',#46,.F.);
58#49=ADVANCED_FACE('',(#47,#48),#5,.T.);
59#50=ORIENTED_EDGE('',*,*,#44,.T.);
60#51=EDGE_LOOP('',(#50));
61#52=FACE_OUTER_BOUND('',#51,.T.);
62#53=ADVANCED_FACE('',(#52),#5,.T.);
63#54=OPEN_SHELL('',(#49,#53));
64#55=SHELL_BASED_SURFACE_MODEL('',(#54));
65#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
66#9051=PRODUCT('Twi304','Twi304','',(#9050));
67#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
68#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
69#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
70#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
71#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
72#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
73#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
74#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
75#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
76#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#55),#9060);
77#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
78ENDSEC;
79END-ISO-10303-21;