M023 — Mesh-to-NURBS face has inner `FACE_BOUND` extending outside the `FACE_OUTER_BOUND` (self-intersecting STL→STEP face)

§12.8 (sub-class: mesh-as-brep)

units

Sources

Description

Mesh-to-BRep tools fit `B_SPLINE_SURFACE_WITH_KNOTS` patches per triangle and stitch them; near sharp creases the per-triangle patches' inner trims cross outside their outer bounds. Common signature: a face whose outer rectangular `FACE_OUTER_BOUND` is a 2×2 square but whose inner triangular `FACE_BOUND` has vertices (e.g. (1,1), (3,1), (2,3)) that extend outside the outer square; a self-intersecting face from mesh-to-NURBS conversion. Output STEP loads but every later Boolean fails.

Reproducer recipe

STL with creases > ~30°; sew tolerance ≤ 1e-6; resulting `ADVANCED_FACE` contains pcurves that cross.

Expected kernel behavior

heal; STL→STEP path should emit faceted BRep (`FACETED_BREP`/`OPEN_SHELL`) rather than smooth NURBS, or run self-intersection healing as a final step.

Notes

Synonyms: "mesh-to-NURBS inner trim outside outer", "STL-to-STEP face self-intersects", "FACE_BOUND extends past outer bound", "self-intersecting reverse-engineered face". **See also**: Pf015. **OCC behavior**: the validity-checker does not flag inner-trim-outside-outer-bound on the mesh-to-NURBS face; tier-3 valid-flag should be ignored for this entry. The reader most likely silently fixes or ignores the self-intersecting trim on import.

Expected validation

occt=shape(1)/shape(1) gmsh=shape(21) 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

Pf015

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes
1ISO-10303-21;
2/* M023: Mesh-to-NURBS face has inner FACE_BOUND extending outside the FACE_OUTER_BOUND; input: STEP file produced by mesh-to-BRep fitting tool where per-triangle NURBS patches are stitched near a sharp crease; ADVANCED_FACE outer rectangular FACE_OUTER_BOUND is a 2x2 square; inner triangular FACE_BOUND has vertices (1,1),(3,1),(2,3) that extend outside the outer square — pcurves cross the outer boundary; self-intersecting trim topology: file loads but every subsequent Boolean fails; kernel must heal: STL-to-STEP path should emit FACETED_BREP not smooth NURBS, or run self-intersection healing as a final step; synonyms: mesh-to-NURBS inner trim outside outer, STL-to-STEP face self-intersects, FACE_BOUND extends past outer bound, self-intersecting reverse-engineered face */
3HEADER;
4FILE_DESCRIPTION(('M023'),'2;1');
5FILE_NAME('M023.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
7ENDSEC;
8DATA;
9#1=APPLICATION_CONTEXT('automotive_design');
10#2=APPLICATION_PROTOCOL_DEFINITION('international standard','automotive_design',2000,#1);
11#10=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));
12#11=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));
13#12=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());
14#13=UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-6),#10,'distance_accuracy_value','');
15#14=(GEOMETRIC_REPRESENTATION_CONTEXT(3)
16     GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#13))
17     GLOBAL_UNIT_ASSIGNED_CONTEXT((#10,#11,#12))
18     REPRESENTATION_CONTEXT('part','3D'));
19/* Plane in z=0 */
20#100=CARTESIAN_POINT('',(0.0,0.0,0.0));
21#101=DIRECTION('',(0.0,0.0,1.0));
22#102=DIRECTION('',(1.0,0.0,0.0));
23#103=AXIS2_PLACEMENT_3D('',#100,#101,#102);
24#104=PLANE('mesh_to_nurbs_face',#103);
25/* Outer loop: square (0,0)-(2,0)-(2,2)-(0,2) */
26#200=CARTESIAN_POINT('',(0.0,0.0,0.0));
27#201=CARTESIAN_POINT('',(2.0,0.0,0.0));
28#202=CARTESIAN_POINT('',(2.0,2.0,0.0));
29#203=CARTESIAN_POINT('',(0.0,2.0,0.0));
30/* Inner loop: triangle (1,1)-(3,1)-(2,3) - vertices cross the 2x2 outer square
31   at x=2 and y=2. This is the self-intersecting trim defect. */
32#210=CARTESIAN_POINT('',(1.0,1.0,0.0));
33#211=CARTESIAN_POINT('',(3.0,1.0,0.0));
34#212=CARTESIAN_POINT('',(2.0,3.0,0.0));
35#220=VERTEX_POINT('',#200);
36#221=VERTEX_POINT('',#201);
37#222=VERTEX_POINT('',#202);
38#223=VERTEX_POINT('',#203);
39#224=VERTEX_POINT('',#210);
40#225=VERTEX_POINT('',#211);
41#226=VERTEX_POINT('',#212);
42/* Outer loop edge vectors */
43#230=DIRECTION('',(1.0,0.0,0.0));
44#231=DIRECTION('',(0.0,1.0,0.0));
45#232=VECTOR('',#230,2.0);
46#233=VECTOR('',#231,2.0);
47/* Outer loop edges: bottom, right, top(rev), left(rev) */
48#240=LINE('',#200,#232);
49#241=EDGE_CURVE('',#220,#221,#240,.T.);
50#242=LINE('',#201,#233);
51#243=EDGE_CURVE('',#221,#222,#242,.T.);
52#244=LINE('',#203,#232);
53#245=EDGE_CURVE('',#223,#222,#244,.T.);
54#246=LINE('',#200,#233);
55#247=EDGE_CURVE('',#220,#223,#246,.T.);
56/* Inner loop edge vectors (cross the outer boundary) */
57/* Edge 0: (1,1)->(3,1) along +x, length=2 */
58#250=LINE('',#210,#232);
59#251=EDGE_CURVE('',#224,#225,#250,.T.);
60/* Edge 1: (3,1)->(2,3) direction ~(-0.447,0.894,0) length~2.236 */
61#252=DIRECTION('',(-0.4472135955,0.8944271910,0.0));
62#253=VECTOR('',#252,2.2360679775);
63#254=LINE('',#211,#253);
64#255=EDGE_CURVE('',#225,#226,#254,.T.);
65/* Edge 2: (2,3)->(1,1) direction ~(-0.447,-0.894,0) length~2.236 */
66#256=DIRECTION('',(-0.4472135955,-0.8944271910,0.0));
67#257=VECTOR('',#256,2.2360679775);
68#258=LINE('',#212,#257);
69#259=EDGE_CURVE('',#226,#224,#258,.T.);
70/* Outer FACE_OUTER_BOUND */
71#260=ORIENTED_EDGE('',*,*,#241,.T.);
72#261=ORIENTED_EDGE('',*,*,#243,.T.);
73#262=ORIENTED_EDGE('',*,*,#245,.F.);
74#263=ORIENTED_EDGE('',*,*,#247,.F.);
75#264=EDGE_LOOP('',(#260,#261,#262,#263));
76#265=FACE_OUTER_BOUND('',#264,.T.);
77/* Inner FACE_BOUND: triangle whose vertices cross the outer square */
78#270=ORIENTED_EDGE('',*,*,#251,.T.);
79#271=ORIENTED_EDGE('',*,*,#255,.T.);
80#272=ORIENTED_EDGE('',*,*,#259,.T.);
81#273=EDGE_LOOP('',(#270,#271,#272));
82#274=FACE_BOUND('',#273,.T.);
83/* Defect: FACE_BOUND inner loop crosses FACE_OUTER_BOUND edges */
84#280=ADVANCED_FACE('self_intersecting',(#265,#274),#104,.T.);
85/* Minimal PRODUCT chain so OCCT TransferRoots produces a shape */
86#9010=PRODUCT_CONTEXT('',#1,'mechanical');
87#9011=PRODUCT('M023','M023','',(#9010));
88#9012=PRODUCT_DEFINITION_FORMATION('','',#9011);
89#9013=PRODUCT_DEFINITION_CONTEXT('part definition',#1,'design');
90#9014=PRODUCT_DEFINITION('','',#9012,#9013);
91#9015=PRODUCT_DEFINITION_SHAPE('','',#9014);
92#9030=OPEN_SHELL('wrap_shell',(#280));
93#9031=SHELL_BASED_SURFACE_MODEL('wrap_sbsm',(#9030));
94#9050=MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#9031),#14);
95#9051=SHAPE_DEFINITION_REPRESENTATION(#9015,#9050);
96ENDSEC;
97END-ISO-10303-21;