Tsh052 — Inversed normals on revolved-shape import

§12.3a shells/orientation

P1 — silent data loss

crash topology

Sources

Description

A revolved solid (`SURFACE_OF_REVOLUTION` over a profile that closes through the axis) is imported with face normals pointing inward. Visible as the part appearing inside-out in viewers, or as inverted normals when exported to VRML/STL. Fixture exhibits the kernel's choice of revolved-face orientation when the profile direction and axis convention disagree.

Reproducer recipe

Profile is a half-circle in XZ plane, revolved 360° about the Z axis to form a sphere. Profile is parameterised in the +X-from-axis direction; revolution direction is `+Z`. The resulting face normal can point inward or outward depending on which orientation convention the kernel applies — both are spec-legal.

Expected kernel behavior

Heal and accept: normalize / coerce the sphere face to be oriented outward (away from the enclosed volume) regardless of profile direction; for non-closed revolutions the convention is "outward of the swept body".

Notes

**See also**: Tsh001, Gs034. Synonyms: "revolved part imports inside out", "sphere normals point inward after import", "VRML export shows reversed normals", "revolution direction convention mismatch", "revolved face orientation backwards".

Expected validation

occt=signal(11)/signal(11) gmsh=signal(11) ifc=schema_n/a

Byte assertions

Cross-references

Tsh001, Gs034

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Tsh052 - Inversed normals on revolved-shape import
3 * Defect: Profile half-circle in XZ plane revolved 360° about Z axis to form
4 * a sphere. Face normals point inward after import because profile direction
5 * and axis convention disagree.
6 * Byte assertions: contains SURFACE_OF_REVOLUTION, contains CIRCLE */
7HEADER;
8FILE_DESCRIPTION(('Tsh052 - revolved sphere with inverted face normals','2;1'),'2;1');
9FILE_NAME('Tsh052.stp','2026-06-16T00:00:00',(''),(''),'wave-regen','','');
10FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }'));
11ENDSEC;
12DATA;
13#1=APPLICATION_CONTEXT('automotive_design');
14#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1);
15
16/* Revolution axis: Z */
17#10=CARTESIAN_POINT('',(0.0,0.0,0.0));
18#11=DIRECTION('',(0.0,0.0,1.0));
19#12=DIRECTION('',(1.0,0.0,0.0));
20#13=AXIS2_PLACEMENT_3D('rev_axis',#10,#11,#12);
21
22/* Profile circle: radius 1 centred at origin in XZ plane.
23 * This is a full CIRCLE which the revolution sweeps around Z. */
24#20=CARTESIAN_POINT('',(0.0,0.0,0.0));
25#21=DIRECTION('',(0.0,1.0,0.0));
26#22=DIRECTION('',(1.0,0.0,0.0));
27#23=AXIS2_PLACEMENT_3D('circle_ax',#20,#21,#22);
28#24=CIRCLE('profile_circle',#23,1.0);
29
30/* SURFACE_OF_REVOLUTION: sweep profile around axis */
31#30=SURFACE_OF_REVOLUTION('sphere_rev',#24,#13);
32
33/* Bounding vertices — sphere poles */
34#40=CARTESIAN_POINT('',(0.0,0.0,1.0));
35#41=CARTESIAN_POINT('',(0.0,0.0,-1.0));
36#42=VERTEX_POINT('north_pole',#40);
37#43=VERTEX_POINT('south_pole',#41);
38
39/* Degenerate seam edge at north pole (collapses to a point) */
40#50=DIRECTION('',(0.0,0.0,1.0));
41#51=VECTOR('',#50,0.0);
42#52=LINE('',#40,#51);
43#53=EDGE_CURVE('north_seam',#42,#42,#52,.T.);
44
45/* Degenerate seam edge at south pole */
46#54=LINE('',#41,#51);
47#55=EDGE_CURVE('south_seam',#43,#43,#54,.T.);
48
49/* Seam edge: full meridian from south pole to north pole at X=1 */
50#56=DIRECTION('',(0.0,0.0,1.0));
51#57=VECTOR('',#56,2.0);
52#58=LINE('',#41,#57);
53#59=EDGE_CURVE('meridian',#43,#42,#58,.T.);
54
55/* Face loop: degenerate north, seam up, degenerate south, seam down
56 * This forms a topological sphere using degenerate poles */
57#60=ORIENTED_EDGE('',*,*,#53,.T.);
58#61=ORIENTED_EDGE('',*,*,#59,.F.);
59#62=ORIENTED_EDGE('',*,*,#55,.T.);
60#63=ORIENTED_EDGE('',*,*,#59,.T.);
61#64=EDGE_LOOP('',(#60,#61,#62,#63));
62#65=FACE_OUTER_BOUND('',#64,.T.);
63
64/* ADVANCED_FACE with .F. orientation = normals point inward (defect) */
65#70=ADVANCED_FACE('sphere_face',(#65),#30,.F.);
66
67#500=OPEN_SHELL('sphere_shell',(#70));
68
69/* Mandatory PRODUCT chain */
70#9000=PRODUCT_CONTEXT('',#1,'mechanical');
71#9001=PRODUCT('Tsh052','Tsh052','',(#9000));
72#9002=PRODUCT_DEFINITION_FORMATION('','',#9001);
73#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
74#9004=PRODUCT_DEFINITION('','',#9002,#9003);
75#9005=PRODUCT_DEFINITION_SHAPE('','',#9004);
76#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
77#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
78#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
79#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value','');
80#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D'));
81#9021=SHELL_BASED_SURFACE_MODEL('sbsm',(#500));
82#9022=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9021),#9010);
83#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022);
84ENDSEC;
85END-ISO-10303-21;