Gp176 — `COMPOSITE_CURVE` segment list out of connected geometric order (segment 2 before segment 1)

§12.2a pcurve (sub-class: composite-curve segment reordering — `stp-compcurve-reorder`)

P2 — spec deviation (no data loss)

geometry

Sources

Sender

STEP translators/exporters that serialise a composite curve's segment list in construction order rather than connectivity order.

Description

A `COMPOSITE_CURVE` used as the 3D curve of a single bottom `EDGE_CURVE` (on the standard rectangular `PLANE` wire, cf. Gp034) lists its two `LINE`-backed `COMPOSITE_CURVE_SEGMENT`s out of connected order: the segment spanning `(5,0,0)->(10,0,0)` (which should come second) is listed before the segment spanning `(0,0,0)->(5,0,0)` (which should come first). Unlike Gp034 (which uses a genuine 5mm positional gap between segments), here the two segments connect EXACTLY — both meet at `(5,0,0)` — so a correct reordering pass recovers a perfectly continuous curve; the sole defect is list order.

Reproducer recipe

`COMPOSITE_CURVE('',(seg_B,seg_A),.F.)` where `seg_A` and `seg_B` are `COMPOSITE_CURVE_SEGMENT`s wrapping two `LINE`s that connect exactly end-to-end once read in the order `(seg_A,seg_B)`; the composite curve is the `edge_geometry` (via `SURFACE_CURVE`) of one `EDGE_CURVE` bounding an `ADVANCED_FACE`.

Expected kernel behavior

detect the disorder by connectivity (matching endpoints, not list position), reorder the segments, and assemble a single continuous wire edge; or reject with a specific disorder diagnostic.

Notes

**See also**: Gp034 (same `COMPOSITE_CURVE_SEGMENT`/`LINE` construction, but a positional gap defect instead of an ordering defect), Twi007 (negative space — scrambles `EDGE_LOOP`, not `COMPOSITE_CURVE`, a different translation path entirely). **OCC behavior**: a correctly-ordered control fixture (segments listed `(seg_A,seg_B)`, otherwise byte-identical) produces the *same* signature as this reordered fixture — both `shape(1)` with `n_edges_total == 0` and an unbounded (`~2e100`-extent) face — indicating OCCT's translator drops the wire construction for `COMPOSITE_CURVE`-based edges in this configuration regardless of segment order, the same "dropped on the floor without diagnostic" behavior documented on Gp034. The reordering defect is genuinely encoded in the bytes; the live oracle currently cannot distinguish it from the well-ordered case because neither reaches a bounded wire. Synonyms: "composite curve segments listed out of order", "COMPOSITE_CURVE segment 2 given before segment 1", "composite-curve segment reordering not exercised by EDGE_LOOP scrambling", "composite curve reorder-on-import", "segment list order mismatches connectivity".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

Gp034, Twi007

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Gp176: COMPOSITE_CURVE bottom-edge 3D curve lists its two LINE segments out of connected order: segment[0]=(5,0,0)->(10,0,0) (should be second) precedes segment[1]=(0,0,0)->(5,0,0) (should be first). Endpoints connect exactly (no gap, unlike Gp034) once reordered by connectivity -- exercises composite-curve-level FixReorder, not an EDGE_LOOP-level scramble (cf. Twi007). */
3HEADER;
4FILE_DESCRIPTION(('Gp176'),'2;1');
5FILE_NAME('Gp176.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=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D'));
16#7=CARTESIAN_POINT('',(0.0,0.0,0.0));
17#8=CARTESIAN_POINT('',(10.0,0.0,0.0));
18#9=CARTESIAN_POINT('',(10.0,5.0,0.0));
19#10=CARTESIAN_POINT('',(0.0,5.0,0.0));
20#11=VERTEX_POINT('',#7);
21#12=VERTEX_POINT('',#8);
22#13=VERTEX_POINT('',#9);
23#14=VERTEX_POINT('',#10);
24#15=CARTESIAN_POINT('',(5.0,0.0,0.0));
25#16=DIRECTION('',(1.0,0.0,0.0));
26#17=VECTOR('',#16,5.0);
27#18=LINE('',#7,#17);
28#19=DIRECTION('',(1.0,0.0,0.0));
29#20=VECTOR('',#19,5.0);
30#21=LINE('',#15,#20);
31#22=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,.T.,#18);
32#23=COMPOSITE_CURVE_SEGMENT(.CONTINUOUS.,.T.,#21);
33#24=COMPOSITE_CURVE('reordered_composite',(#23,#22),.F.);
34#25=CARTESIAN_POINT('',(0.0,0.0));
35#26=DIRECTION('',(1.0,0.0));
36#27=VECTOR('',#26,10.0);
37#28=LINE('',#25,#27);
38#29=DEFINITIONAL_REPRESENTATION('pc_bot',(#28),#6);
39#30=PCURVE('bot_pc',#5,#29);
40#31=SURFACE_CURVE('bottom_composite',#24,(#30),.PCURVE_S1.);
41#32=EDGE_CURVE('bottom_edge',#11,#12,#31,.T.);
42#33=DIRECTION('',(0.0,1.0,0.0));
43#34=VECTOR('',#33,5.0);
44#35=LINE('',#8,#34);
45#36=CARTESIAN_POINT('',(10.0,0.0));
46#37=DIRECTION('',(0.0,1.0));
47#38=VECTOR('',#37,5.0);
48#39=LINE('',#36,#38);
49#40=DEFINITIONAL_REPRESENTATION('pc_right',(#39),#6);
50#41=PCURVE('right_pc',#5,#40);
51#42=SURFACE_CURVE('right_edge',#35,(#41),.PCURVE_S1.);
52#43=EDGE_CURVE('right_edge',#12,#13,#42,.T.);
53#44=DIRECTION('',(1.0,0.0,0.0));
54#45=VECTOR('',#44,10.0);
55#46=LINE('',#10,#45);
56#47=CARTESIAN_POINT('',(0.0,5.0));
57#48=DIRECTION('',(1.0,0.0));
58#49=VECTOR('',#48,10.0);
59#50=LINE('',#47,#49);
60#51=DEFINITIONAL_REPRESENTATION('pc_top',(#50),#6);
61#52=PCURVE('top_pc',#5,#51);
62#53=SURFACE_CURVE('top_edge',#46,(#52),.PCURVE_S1.);
63#54=EDGE_CURVE('top_edge',#14,#13,#53,.T.);
64#55=DIRECTION('',(0.0,-1.0,0.0));
65#56=VECTOR('',#55,5.0);
66#57=LINE('',#10,#56);
67#58=CARTESIAN_POINT('',(0.0,5.0));
68#59=DIRECTION('',(0.0,-1.0));
69#60=VECTOR('',#59,5.0);
70#61=LINE('',#58,#60);
71#62=DEFINITIONAL_REPRESENTATION('pc_left',(#61),#6);
72#63=PCURVE('left_pc',#5,#62);
73#64=SURFACE_CURVE('left_edge',#57,(#63),.PCURVE_S1.);
74#65=EDGE_CURVE('left_edge',#14,#11,#64,.T.);
75#66=ORIENTED_EDGE('',$,$,#32,.T.);
76#67=ORIENTED_EDGE('',$,$,#43,.T.);
77#68=ORIENTED_EDGE('',$,$,#54,.F.);
78#69=ORIENTED_EDGE('',$,$,#65,.T.);
79#70=EDGE_LOOP('',(#66,#67,#68,#69));
80#71=FACE_OUTER_BOUND('',#70,.T.);
81#72=ADVANCED_FACE('',(#71),#5,.T.);
82#73=OPEN_SHELL('',(#72));
83#74=SHELL_BASED_SURFACE_MODEL('',(#73));
84#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
85#9051=PRODUCT('Gp176','Gp176','',(#9050));
86#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
87#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
88#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
89#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
90#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
91#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
92#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
93#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
94#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
95#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#74),#9060);
96#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
97ENDSEC;
98END-ISO-10303-21;