Gs136 — ShapeAnalysis_Surface.Singularity TOROIDAL_SURFACE non-standard-axis

§12.2c surfaces (sub-class: surface)

crash geometry

Sources

Description

Torus whose rotation axis is NOT aligned with global Z-axis causes Singularity() to produce incorrect results. Code assumes axis=(0,0,1) and singular circles lie at (R+r, z=0) and (R-r, z=0); rotated torus has singularities in rotated frame.

Reproducer recipe

Expected kernel behavior

FLAG -- title/description contradict the bytes, and the file crashes OCCT (measured occt=signal(11)): the closure edge's LINE entity, `#40=LINE('',#30,#30);`, passes a CARTESIAN_POINT (#30) as its second parameter, where the LINE entity's EXPRESS definition requires a VECTOR. This type mismatch -- not axis-alignment of the torus's singularity detection -- is the file's actual defect. Actual kernel behavior: reject at parse time -- a kernel must validate that each entity's references resolve to an instance of the required type before using it, and refuse to build (or dereference as a VECTOR) a reference that actually points to a CARTESIAN_POINT, rather than read past the type mismatch into whatever memory layout results.

Notes

synthesized from earlier wave; backfilled from fixture comment

Expected validation

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

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* Gs136 - ShapeAnalysis_Surface.Singularity TOROIDAL_SURFACE non-standard-axis
3 *
4 * Defect: Torus whose rotation axis is NOT aligned with global Z-axis causes
5 * Singularity() to produce incorrect results. Code assumes axis=(0,0,1) and
6 * singular circles lie at (R+r, z=0) and (R-r, z=0); rotated torus has
7 * singularities in rotated frame.
8 *
9 * Reproducer: TOROIDAL_SURFACE with major radius 30, minor radius 5, but
10 * AXIS2_PLACEMENT_3D rotated 45° about X and 30° about Z.
11 *
12 * Expected kernel behavior:
13 *   heal - transform singularity detection to local torus frame; convert
14 *   to global coords using inverse of AXIS2_PLACEMENT_3D. */
15HEADER;
16FILE_DESCRIPTION(('Gs136 test case','Non-axis-aligned torus singularity'),'2;1');
17FILE_NAME('Gs136.stp','2026-06-15T00:00:00',(''),(''),'auto-generated','','');
18FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
19ENDSEC;
20DATA;
21#1=APPLICATION_CONTEXT('automotive_design');
22#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1);
23/* Base coordinate system - at origin */
24#10=CARTESIAN_POINT('',(0.0,0.0,0.0));
25/* Rotated axis: Z' = (sin(45°), 0, cos(45°)) = (0.707, 0, 0.707) */
26#11=DIRECTION('',(0.707,0.0,0.707));
27/* X' after 45° rotation about Y = (cos(45°), 0, -sin(45°)) = (0.707, 0, -0.707) */
28#12=DIRECTION('',(0.707,0.0,-0.707));
29#13=AXIS2_PLACEMENT_3D('',#10,#11,#12);
30/* Torus with major radius 30, minor radius 5, on rotated axis */
31#20=TOROIDAL_SURFACE('',#13,30.0,5.0);
32/* Vertices on torus outer equator (major circle + minor radius) */
33#30=CARTESIAN_POINT('',(35.0,0.0,0.0));
34#31=VERTEX_POINT('',#30);
35#32=CARTESIAN_POINT('',(35.0,0.0,0.1));
36#33=VERTEX_POINT('',#32);
37/* Degenerate edge */
38#40=LINE('',#30,#30);
39#41=EDGE_CURVE('',#31,#33,#40,.T.);
40#42=ORIENTED_EDGE('',*,*,#41,.T.);
41#50=EDGE_LOOP('',(#42));
42#51=FACE_OUTER_BOUND('',#50,.T.);
43#52=ADVANCED_FACE('',(#51),#20,.T.);
44/* PRODUCT chain */
45#9000=PRODUCT_CONTEXT('',#1,'mechanical');
46#9001=PRODUCT('Gs136','Gs136','',(#9000));
47#9002=PRODUCT_DEFINITION_FORMATION('','',#9001);
48#9003=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
49#9004=PRODUCT_DEFINITION('','',#9002,#9003);
50#9005=PRODUCT_DEFINITION_SHAPE('','',#9004);
51#9006=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
52#9007=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
53#9008=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
54#9009=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9006,'distance_accuracy_value','');
55#9010=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9009))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9006,#9007,#9008))REPRESENTATION_CONTEXT('','3D'));
56#9022=GEOMETRICALLY_BOUNDED_SURFACE_SHAPE_REPRESENTATION('',(#52),#9010);
57#9023=SHAPE_DEFINITION_REPRESENTATION(#9005,#9022);
58ENDSEC;
59END-ISO-10303-21;