step-examples/12-8-mixed/M199.stp
Sources
- 04-occt-translation.md
- StepToTopoDS_TranslateFace.cxx:123-131 (the normals table's row width is checked once, up front, against the required three components
- any other width returns immediately, before the per-node assignment loop that would otherwise copy the row's values into the mesh ever runs).
Description
A tessellated face can declare a single per-face normal (one row, applied to every node) instead of one normal per node. When that one row does not have exactly the three components an XYZ vector needs, the reader does not try to interpret whatever values are present, nor does it reject the face — it simply leaves the mesh's per-node normal storage allocated but never actually filled with the row's values, so every node keeps its zero-initialized default rather than the malformed vector.
Reproducer recipe
`TRIANGULATED_FACE` whose normals table is a single row of four components `(0.,0.,1.,0.)` instead of three, over a three-point `COORDINATES_LIST` triangle; wired directly as the sole item of a `MANIFOLD_SURFACE_SHAPE_REPRESENTATION`.
Expected kernel behavior
detect the malformed row width and either reject the face or clearly diagnose that normals were dropped; never silently allocate normal storage that is never actually populated, since a consumer that checks "has normals" without checking the values gets a false positive.
Notes
Synonyms: "tessellated normals row wrong component count", "malformed normal row silently ignored", "per-node normal storage allocated but never filled", "four-component normal row dropped without diagnostic". Live-verified by inspecting the built mesh directly: it reports normals as present, but reading any individual node's normal value raises a construction error because the stored vector is still all zeros — direct confirmation that the malformed row was never actually copied in, only its presence flag survived. Mirrors Bo027, whose per-vertex normal rows are well-formed three-component rows that merely disagree in value across a shared edge — a different defect (value disagreement, not row width) — by malforming the row's component count instead of its value.
Expected validation
occt=shape(1)/shape(1) gmsh=signal(11) ifc=schema_n/a
Byte assertions
contains(b'TRIANGULATED_FACE')contains(b'(0.,0.,1.,0.)')
Tier-3 assertions
shape_null == Falsen_faces_total == 1face[0].surface_type == "other"brepcheck.valid == False
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M199: TRIANGULATED_FACE normals table with a single row of 4 components (0.,0.,1.,0.) instead of the required 3 (a flat-shading whole-face normal padded with a spurious 4th value); input: AP242 file whose tessellated face declares one normal row for the entire face but the row's component count does not match XYZ; StepToTopoDS_TranslateFace.cxx's SetNormals (StepToTopoDS_TranslateFace.cxx:128-131) checks theNormals->RowLength()!=3 BEFORE looking at theNormNum at all and returns immediately on any mismatch -- the mesh is still built with per-node normal storage allocated (Poly_Triangulation::HasNormals()==True, since aNormNum>0 governs allocation) but every node's normal value is left at its zero-initialized default because SetNormals's early return means the per-node Normal() assignment loop never runs; the malformed row is silently ignored rather than misread or rejected, exactly as the problem describes; mirrors Bo027 (per-vertex normal DIRECTIONS that are well-formed 3-component rows but inconsistent in VALUE across a shared edge -- a different defect, value disagreement, not row arity) fixed by malforming the row's component COUNT instead of its value; covers stp-tess-malformed-normals; synonyms: tessellated normals row arity mismatch, normal table wrong column count silently ignored, four-component normal row skipped, triangulated face normals guard early return */ 3HEADER; 4FILE_DESCRIPTION(('M199'),'2;1'); 5FILE_NAME('M199.stp','2026-07-12T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF { 1 0 10303 442 1 1 4 }')); 7ENDSEC; 8DATA; 9#9000=APPLICATION_CONTEXT('mechanical design'); 10#1=COORDINATES_LIST('coords',3,((0.,0.,0.),(1.,0.,0.),(0.,1.,0.))); 11#2=TRIANGULATED_FACE('malformed_normals_face',#1,3,((0.,0.,1.,0.)),$,(),((1,2,3))); 12#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 13#9051=PRODUCT('M199','M199','',(#9050)); 14#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 15#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 16#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 17#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 18#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 19#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 20#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 21#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 22#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 23#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#2),#9060); 24#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 25ENDSEC; 26END-ISO-10303-21;