step-examples/12-8-mixed/M005.stp
Sources
- 02-caxif.md
- Tessellated Geometry §8.4.1.1
Description
Some receivers strip degenerate or near-flat triangles on import. The "Number of Facets" tessellated validation property counts what the writer wrote, including those triangles. Receivers that drop them then report a mismatch.
Reproducer recipe
Build a tessellated solid with degenerate triangles (zero-area / collinear). Attach a `tessellated validation property` representation with name `'number of facets'` whose `integer_representation_item` value includes them.
Expected kernel behavior
count degenerate triangles when validating; do not silently strip.
Notes
Cross-oracle: pure-Python Part-21 validator accepts (`accept`); OCCT crashes (`signal(11)`). The crash is on the kernel side; the file is spec-conformant Part-21.
Expected validation
occt=shape(1)/shape(1) gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'number of facets')contains(b'INTEGER_REPRESENTATION_ITEM')
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* M005: TESSELLATED_SOLID with degenerate triangles (repeated vertex indices) plus 'number of facets' validation property via INTEGER_REPRESENTATION_ITEM; degenerate triangle (3,3,4) has zero area â repeated index causes NaN from Poly::ComputeNormals in OCC and gmsh; OCCT/gmsh crash with signal(11) (SIGSEGV) dereferencing NaN normal; tessellated validation property: 'number of facets' count includes the degenerate triangles, matching the writer's output; receivers that strip degenerate triangles report a facet-count mismatch against the validation property; kernel must count degenerate triangles when validating â do not silently strip; cross-oracle: pure-Python Part-21 validator accepts; OCCT/gmsh crash; synonyms: facet count mismatch on import, tessellation segfault on flat triangles, STEP claimed facet count disagrees with computed, import drops degenerate triangles, NaN normal from repeated vertex index crashes Poly::ComputeNormals */ 3HEADER; 4FILE_DESCRIPTION(('M005'),'2;1'); 5FILE_NAME('M005.stp','2026-06-17T00: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('mixed_tess_coords',3,((0.,0.,0.),(1.,0.,0.),(0.,1.,0.),(0.,0.,1.),(1.,1.,0.))); 11#2=TRIANGULATED_FACE('mixed_tess_face',#1,$,((.FALSE.,.FALSE.,.FALSE.,.FALSE.)),((0,1,2),(0,1,3),(0,2,3),(3,3,4))); 12#3=TESSELLATED_SOLID('degenerate_tess_solid',(#2)); 13#4=INTEGER_REPRESENTATION_ITEM('number of facets',4.); 14#5=GEOMETRIC_CURVE_SET('number-of-facets-degenerate-triangles',(#3,#4)); 15#9050=PRODUCT_CONTEXT('',#9000,'mechanical'); 16#9051=PRODUCT('M005','M005','',(#9050)); 17#9052=PRODUCT_DEFINITION_FORMATION('','',#9051); 18#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design'); 19#9054=PRODUCT_DEFINITION('','','',#9052,#9053); 20#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054); 21#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.)); 22#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.)); 23#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT()); 24#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#9056,'distance_accuracy_value',''); 25#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D')); 26#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#5),#9060); 27#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061); 28ENDSEC; 29END-ISO-10303-21;