N049 — Reading a structurally valid STEP file produces an invalid `TopoDS_Shape`

§12.4 tolerance & numerical precision (sub-class: invalid shape on import)

P1 — silent data loss

topology

Sources

Sender

Producers whose `EDGE_CURVE` end-vertex coordinates do not lie exactly on the underlying curve at the receiver's tolerance, or whose face boundary loops are not perfectly closed.

Description

A STEP file imports without diagnostic, but `BRepCheck_Analyzer` on the resulting shape returns `BRepCheck_InvalidPointOnCurve` / `BRepCheck_NotClosed` / `BRepCheck_InvalidWire`. The defect is at the boundary between the producer's tolerance and the receiver's: the file is structurally legal, the geometry is "almost" valid, and the reader silently accepts but downstream operations (Boolean, mesh, sewn-shell promotion) fail with cryptic errors. Distinct from M160 (silent-empty); here a shape is produced, but it is not valid.

Reproducer recipe

`EDGE_CURVE` whose end-vertex `CARTESIAN_POINT` is at distance `2e-6` from the curve at the curve's parameter; receiver's edge tolerance is `1e-7`. Reader imports; `BRepCheck` flags.

Expected kernel behavior

heal-and-accept; auto-bump edge tolerance during import to the maximum of the producer's claimed tolerance and the measured point-on-curve deviation; emit `W_TOLERANCE_BUMPED`. Downstream operations should never see an invalid shape.

Notes

**See also**: N015, N028, Twi099. Synonyms: "reading STEP file produces invalid shape", "BRepCheck flags imported shape", "STEP import yields shape that fails Analyzer", "tolerance mismatch between producer and receiver".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

Byte assertions

Tier-3 assertions

Cross-references

N015, N028, Twi099

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* N049: EDGE_CURVE end-VERTEX_POINT displaced 2.0E-6 mm from curve endpoint; receiver edge tol 1.0E-7; structurally valid but BRepCheck fails; GEOMETRIC_CURVE_SET — OCC yields empty */
3HEADER;
4FILE_DESCRIPTION(('N049'),'2;1');
5FILE_NAME('N049.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#1=CARTESIAN_POINT('curve_start',(0.0,0.0,0.0));
10#2=CARTESIAN_POINT('curve_end',(10.0,0.0,0.0));
11#3=CARTESIAN_POINT('vtx_end_off_curve',(10.0,2.0E-06,0.0));
12#4=VERTEX_POINT('v_start',#1);
13#5=VERTEX_POINT('v_end_displaced',#3);
14#6=DIRECTION('',(1.0,0.0,0.0));
15#7=VECTOR('',#6,10.0);
16#8=LINE('line',#1,#7);
17#9=EDGE_CURVE('edge',#4,#5,#8,.T.);
18#10=GEOMETRIC_CURVE_SET('edges',(#9));
19#11=APPLICATION_CONTEXT('automotive_design');
20#12=PRODUCT_CONTEXT('',#11,'mechanical');
21#13=PRODUCT('N049','N049','',(#12));
22#14=PRODUCT_DEFINITION_FORMATION('','',#13);
23#15=PRODUCT_DEFINITION_CONTEXT('part definition',#11,'design');
24#16=PRODUCT_DEFINITION('','',#14,#15);
25#17=PRODUCT_DEFINITION_SHAPE('','',#16);
26#18=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
27#19=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
28#20=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
29#21=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.0E-7),#18,'distance_accuracy_value','receiver_edge_tolerance');
30#22=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#21))GLOBAL_UNIT_ASSIGNED_CONTEXT((#18,#19,#20))REPRESENTATION_CONTEXT('ctx','3D'));
31#23=GEOMETRICALLY_BOUNDED_WIREFRAME_SHAPE_REPRESENTATION('',(#10),#22);
32#24=SHAPE_DEFINITION_REPRESENTATION(#17,#23);
33ENDSEC;
34END-ISO-10303-21;