N046 — Default tolerance projection wrong on non-default tolerance shapes (free CARTESIAN_POINT off PLANE within declared tolerance but beyond hard-coded internal tolerance)

§12.4 tolerance

units

Sources

Description

A point-projection-onto-surface routine uses a hard-coded tolerance instead of consulting the input shape's vertex/edge tolerance or the file's declared UNCERTAINTY_MEASURE_WITH_UNIT. When the input context declares tolerance 1e-3, the projection fails because the routine still uses 1e-7. Typical fixture: a free CARTESIAN_POINT at e.g. (0.5, 0.5, 5e-4) sits 5e-4 above a PLANE z=0; within the declared 1e-3 mm context tolerance, but the kernel can't project it.

Reproducer recipe

PLANE z=0 with file-scope tolerance 1e-3; project a free CARTESIAN_POINT at (0.5, 0.5, 5e-4) onto the surface. Routine reports "no projection found" because internal tolerance is 1e-7.

Expected kernel behavior

Heal and accept: projection routines consume the source shape's tolerance; default value is a fallback only when no shape context is available.

Notes

**See also**: N039. Synonyms: "projection uses hard-coded internal tolerance", "free point off plane within file tolerance but rejected by hard internal", "internal tolerance ignores file uncertainty", "point projection fails on tolerant face".

Expected validation

occt=shape(1)/shape(1) gmsh=shape(9) ifc=schema_n/a

Closure intent

sheet — the open shell is the intended final geometry; a solid-only kernel should cleanly refuse.

Tier-3 assertions

Cross-references

N039

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* N046: PLANE z=0 with declared tolerance 1.0E-3; free CARTESIAN_POINT at (0.5, 0.5, 5.0E-4) is 5e-4 above plane — within declared tolerance but rejected by kernel's hardcoded 1e-7 internal projection tolerance */
3HEADER;
4FILE_DESCRIPTION(('N046'),'2;1');
5FILE_NAME('N046.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#9000=APPLICATION_CONTEXT('mechanical design');
10#1=CARTESIAN_POINT('origin',(0.0,0.0,0.0));
11#2=DIRECTION('+z',(0.0,0.0,1.0));
12#3=DIRECTION('+x',(1.0,0.0,0.0));
13#4=AXIS2_PLACEMENT_3D('axes',#1,#2,#3);
14#5=PLANE('high_tolerance',#4);
15#6=CARTESIAN_POINT('v0',(0.0,0.0,0.0));
16#7=VERTEX_POINT('',#6);
17#8=CARTESIAN_POINT('v1',(1.0,0.0,0.0));
18#9=VERTEX_POINT('',#8);
19#10=CARTESIAN_POINT('v2',(1.0,1.0,0.0));
20#11=VERTEX_POINT('',#10);
21#12=CARTESIAN_POINT('v3',(0.0,1.0,0.0));
22#13=VERTEX_POINT('',#12);
23#14=DIRECTION('+x',(1.0,0.0,0.0));
24#15=VECTOR('',#14,1.0);
25#16=LINE('',#6,#15);
26#17=EDGE_CURVE('',#7,#9,#16,.T.);
27#18=DIRECTION('+y',(0.0,1.0,0.0));
28#19=VECTOR('',#18,1.0);
29#20=LINE('',#8,#19);
30#21=EDGE_CURVE('',#9,#11,#20,.T.);
31#22=DIRECTION('-x',(-1.0,0.0,0.0));
32#23=VECTOR('',#22,1.0);
33#24=LINE('',#10,#23);
34#25=EDGE_CURVE('',#11,#13,#24,.T.);
35#26=DIRECTION('-y',(0.0,-1.0,0.0));
36#27=VECTOR('',#26,1.0);
37#28=LINE('',#12,#27);
38#29=EDGE_CURVE('',#13,#7,#28,.T.);
39#30=ORIENTED_EDGE('',$,$,#17,.T.);
40#31=ORIENTED_EDGE('',$,$,#21,.T.);
41#32=ORIENTED_EDGE('',$,$,#25,.T.);
42#33=ORIENTED_EDGE('',$,$,#29,.T.);
43#34=EDGE_LOOP('',(#30,#31,#32,#33));
44#35=FACE_OUTER_BOUND('',#34,.T.);
45#36=ADVANCED_FACE('bloated',(#35),#5,.T.);
46#37=CARTESIAN_POINT('test_pt_5e-4_above_plane',(0.5,0.5,0.0005));
47#38=OPEN_SHELL('bloated_shell',(#36));
48#39=SHELL_BASED_SURFACE_MODEL('',(#38));
49#9050=PRODUCT_CONTEXT('',#9000,'mechanical');
50#9051=PRODUCT('N046','N046','',(#9050));
51#9052=PRODUCT_DEFINITION_FORMATION('','',#9051);
52#9053=PRODUCT_DEFINITION_CONTEXT('part definition',#9000,'design');
53#9054=PRODUCT_DEFINITION('','','',#9052,#9053);
54#9055=PRODUCT_DEFINITION_SHAPE('','','',#9054);
55#9056=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
56#9057=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
57#9058=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
58#9059=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.000000E-03),#9056,'distance_accuracy_value','');
59#9060=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#9059))GLOBAL_UNIT_ASSIGNED_CONTEXT((#9056,#9057,#9058))REPRESENTATION_CONTEXT('','3D'));
60#9061=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#39),#9060);
61#9062=SHAPE_DEFINITION_REPRESENTATION(#9055,#9061);
62ENDSEC;
63END-ISO-10303-21;