BrepFace.GetMesh() sometimes fails

I would like to use the analysis mesh of a BRep (as I do in Rhino via object->GetMeshes(ON::analysis_mesh, meshes):wink:
but in the following the renderMesh is always null. When I activate “mesh_type = MeshType.Render” instead I get a non-null renderMesh for the BRep param, but not for the deconstructed BRep - see the attached example.

private void RunScript(Brep x_brep, ref object A)
List meshes = new List();
foreach (BrepFace face in x_brep.Faces)
//MeshType mesh_type = MeshType.Render;
MeshType mesh_type = MeshType.Analysis;
var renderMesh = face.GetMesh(mesh_type);
if (renderMesh != null)
A = meshes.Count;

Thanks in advance for any hints,
Ute (13.5 KB)

Indeed this is rather odd: added a face.GetMesh option - in the name of science - and results are … er … odd (and why the Brep Rebuild [not required here, mind] yields bananas?).

MeshFromBrep_EntryLevel_V0.3dm (556.0 KB) (118.4 KB)