Wr054 — Swept spherical face orientation inverted on STEP export round-trip

§12.13 writer-pathology (sub-class: face-normal inversion)

round-trip writer

Sources

Description

A SPHERICAL_SURFACE in an OPEN_SHELL has its enclosing ADVANCED_FACE marked with face_normal `.F.` rather than `.T.` after a writer-side round-trip. Geometry-side surface parameters (center, radius) are preserved; topology-side orientation flag is wrong. Receivers using the topological normal compute inside-out lighting / inverted volume.

Reproducer recipe

SPHERICAL_SURFACE at origin radius 1. ADVANCED_FACE wrapping it with face_normal `.F.`. Hemisphere bounded by an equator CIRCLE. Pack into OPEN_SHELL + SHELL_BASED_SURFACE_MODEL.

Expected kernel behavior

validate face_normal against surface_normal; flag inverted-face on shell or heal by reversing.

Notes

Synonyms: "spherical face inverted on STEP export", "Part Sweep sphere normal flipped after round-trip", "ADVANCED_FACE .F. on sphere wrong", "sphere face inside-out after writer", "swept sphere orientation lost".

Expected validation

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

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Wr054: spherical face .T./.F. orientation inverted on round-trip */
3HEADER;
4FILE_DESCRIPTION(('Wr054'),'2;1');
5FILE_NAME('Wr054.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=SPHERICAL_SURFACE('inverted_sphere',#4,1.0);
15#6=CARTESIAN_POINT('',(1.0,0.0,0.0));
16#7=CARTESIAN_POINT('',(-1.0,0.0,0.0));
17#8=VERTEX_POINT('',#6);
18#9=VERTEX_POINT('',#7);
19#10=AXIS2_PLACEMENT_3D('',#1,#2,#3);
20#11=CIRCLE('equator',#10,1.0);
21#12=EDGE_CURVE('',#8,#9,#11,.T.);
22#13=ORIENTED_EDGE('',$,$,#12,.T.);
23#14=EDGE_LOOP('',(#13));
24#15=FACE_OUTER_BOUND('',#14,.T.);
25#16=ADVANCED_FACE('inverted_sphere_upper',(#15),#5,.F.);
26#17=OPEN_SHELL('shell_with_inverted_face',(#16));
27#18=SHELL_BASED_SURFACE_MODEL('sbsm',(#17));
28#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
29#9051=PRODUCT('Wr054','Wr054','',(#9050));
30#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
31#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
32#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
33#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
34#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
35#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
36#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
37#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value','');
38#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
39#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#18),#9060);
40#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
41ENDSEC;
42END-ISO-10303-21;