Gp128 — ShapeFix_Edge.FixAddPCurve transform surface down_cast failure

§12.2a pcurves

geometry

Sources

Description

Non-identity location with offset surface causes Transformed() to return incompatible type; down_cast fails, exception handling missing.

Reproducer recipe

Expected kernel behavior

the file supplies a complete, connected planar face bounded by four edges that carry pcurves, so a correct kernel must not answer with an empty shape. Either build the face — dropping or approximating the single defective curve and reporting that it did so — or reject the file with a diagnostic naming the curve. Returning nothing without an error silently discards a well-formed model, which is the worst of the three outcomes for the user.

Notes

synthesized fixture from v3 deep-pass; falsifiable claim per Minimal reproducer

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Gp128: OFFSET_SURFACE (offset=0.0 on PLANE Z=0); defect edge: bare EDGE_CURVE (no SURFACE_CURVE/pcurve); 3D B_SPLINE_CURVE_WITH_KNOTS degree-2 C-1 break at t=0.5 (CP[2]=(1.5,0,0) vs CP[3]=(3.0,0,0), 1.5-unit gap) drives shape_null; FixAddPCurve.Transformed() on OFFSET_SURFACE returns surface incompatible with down_cast<Geom_Plane> — null dereference; shape_null=True */
3HEADER;
4FILE_DESCRIPTION(('Gp128'),'2;1');
5FILE_NAME('Gp128.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=(GEOMETRIC_REPRESENTATION_CONTEXT(2)PARAMETRIC_REPRESENTATION_CONTEXT()REPRESENTATION_CONTEXT('UV','2D'));
11#2=CARTESIAN_POINT('',(0.0,0.0,0.0));
12#3=DIRECTION('',(0.0,0.0,1.0));
13#4=DIRECTION('',(1.0,0.0,0.0));
14#5=AXIS2_PLACEMENT_3D('',#2,#3,#4);
15#6=PLANE('',#5);
16#7=OFFSET_SURFACE('offset_plane',#6,0.0,.F.);
17#8=CARTESIAN_POINT('',(0.0,0.0,0.0));
18#9=CARTESIAN_POINT('',(5.0,0.0,0.0));
19#10=CARTESIAN_POINT('',(5.0,2.0,0.0));
20#11=CARTESIAN_POINT('',(0.0,2.0,0.0));
21#12=VERTEX_POINT('',#8);
22#13=VERTEX_POINT('',#9);
23#14=VERTEX_POINT('',#10);
24#15=VERTEX_POINT('',#11);
25#16=CARTESIAN_POINT('',(5.0,0.0,0.0));
26#17=DIRECTION('',(0.0,1.0,0.0));
27#18=VECTOR('',#17,2.0);
28#19=LINE('',#16,#18);
29#20=CARTESIAN_POINT('',(5.0,0.0));
30#21=DIRECTION('',(0.0,1.0));
31#22=VECTOR('',#21,2.0);
32#23=LINE('',#20,#22);
33#24=DEFINITIONAL_REPRESENTATION('pcdef',(#23),#1);
34#25=PCURVE('pc',#7,#24);
35#26=SURFACE_CURVE('sc',#19,(#25),.PCURVE_S1.);
36#27=EDGE_CURVE('ec',#13,#14,#26,.T.);
37#28=CARTESIAN_POINT('',(5.0,2.0,0.0));
38#29=DIRECTION('',(-1.0,0.0,0.0));
39#30=VECTOR('',#29,5.0);
40#31=LINE('',#28,#30);
41#32=CARTESIAN_POINT('',(5.0,2.0));
42#33=DIRECTION('',(-1.0,0.0));
43#34=VECTOR('',#33,5.0);
44#35=LINE('',#32,#34);
45#36=DEFINITIONAL_REPRESENTATION('pcdef',(#35),#1);
46#37=PCURVE('pc',#7,#36);
47#38=SURFACE_CURVE('sc',#31,(#37),.PCURVE_S1.);
48#39=EDGE_CURVE('ec',#14,#15,#38,.T.);
49#40=CARTESIAN_POINT('',(0.0,2.0,0.0));
50#41=DIRECTION('',(0.0,-1.0,0.0));
51#42=VECTOR('',#41,2.0);
52#43=LINE('',#40,#42);
53#44=CARTESIAN_POINT('',(0.0,2.0));
54#45=DIRECTION('',(0.0,-1.0));
55#46=VECTOR('',#45,2.0);
56#47=LINE('',#44,#46);
57#48=DEFINITIONAL_REPRESENTATION('pcdef',(#47),#1);
58#49=PCURVE('pc',#7,#48);
59#50=SURFACE_CURVE('sc',#43,(#49),.PCURVE_S1.);
60#51=EDGE_CURVE('ec',#15,#12,#50,.T.);
61#52=CARTESIAN_POINT('',(0.0,0.0,0.0));
62#53=CARTESIAN_POINT('',(0.75,0.0,0.0));
63#54=CARTESIAN_POINT('',(1.5,0.0,0.0));
64#55=CARTESIAN_POINT('',(3.0,0.0,0.0));
65#56=CARTESIAN_POINT('',(4.0,0.0,0.0));
66#57=CARTESIAN_POINT('',(5.0,0.0,0.0));
67#58=B_SPLINE_CURVE_WITH_KNOTS('downcast_fail_driver',2,(#52,#53,#54,#55,#56,#57),.UNSPECIFIED.,.F.,.F.,(3,3,3),(0.0,0.5,1.0),.UNSPECIFIED.);
68#59=EDGE_CURVE('downcast_fail_edge',#12,#13,#58,.T.);
69#60=ORIENTED_EDGE('',$,$,#59,.T.);
70#61=ORIENTED_EDGE('',$,$,#27,.T.);
71#62=ORIENTED_EDGE('',$,$,#39,.T.);
72#63=ORIENTED_EDGE('',$,$,#51,.T.);
73#64=EDGE_LOOP('',(#60,#61,#62,#63));
74#65=FACE_OUTER_BOUND('',#64,.T.);
75#66=ADVANCED_FACE('',(#65),#7,.T.);
76#67=OPEN_SHELL('',(#66));
77#68=SHELL_BASED_SURFACE_MODEL('',(#67));
78#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
79#9051=PRODUCT('Gp128','Gp128','',(#9050));
80#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
81#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
82#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
83#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
84#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
85#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
86#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
87#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
88#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
89#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#68),#9060);
90#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
91ENDSEC;
92END-ISO-10303-21;