Mesh.GetOutlines minimizing probability of null

Hi @dale would you mind recommending steps to minimize getting null out of Mesh.GetOutlines(plane) method? Can I do something with mesh earlier to ensure that I will get an outline?

I’m facing weird behavior as I have mesh which gives an outline in its original form but if I’ll scale it 10 times I’m getting null here and to be honest I don’t have a clue what can cause such situation. Inspected this mesh in IDE and mesh is valid. I tried QuadsToTris, ComputeFaceNormals, UnifyNormals, Compact.

Here is GH file showing the problem - meshes are internalized:
MeshOutlineNull.gh (534.2 KB)

Hi @D-W,

If you bake your mesh, does the MeshOutline succeed?

– Dale

Nope.

v5 - Hanged and at least 5 mins already in not responding state.
v6 - In perspective outline is made on some arbitrary plane ( i guess vp info here is used ) - in top no result

Notice: I used GH just to transfer the mesh and show the issue normally i need this under “pure code” conditions.

Thanks - I’ve logged the issue.

https://mcneel.myjetbrains.com/youtrack/issue/RH-55665

– Dale

Sure but is there anything I can do with it on my side?

Very very strange, it is depending on the scale factor it works or not. Sometime there are 2 polylines.
Here a view of OK result or NOK (in Y) depending on the scale factor (1 to 100 on X)


???
MeshOutlineNull.gh (267.1 KB)

I have no idea, which is why I’ve logged the YouTrack issue (above).

Thanks,

– Dale

Ok, I would like to know if there is something I can do here to increase the probability of success with it so let me know if you find out something, please.

You can replicate this function using topologyEdges and the getnaked method or using the connected faces and then joining the curves …
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Collections_MeshTopologyEdgeList_GetConnectedFaces lo.htm
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Collections_MeshTopologyEdgeList_EdgeLine.htm
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Mesh_GetNakedEdges.htm

Um not really, in this case, yes also only in case of XYPlane but if you will use for eg. ZY plane those won’t give the desired result as well as if you’ll pick let’s say torus mesh mentioned methods won’t be usable.

Ok I understand my mistake. For sure it is less easy. So outline is also a silhouette.

Hello everyone, any updates on how handle null issues with Mesh.GetOutlines ?
In my case, a null happens when using a mesh from a trimmed brep and a inclined plane.
It’s working well if the plane is a proper World XZ + mesh from trimmed brep, or if the plane is inclined + mesh from the original non-trimmed brep.

Hi @mat.venot,

Can we get a file with the mesh that this method fails to calculate a correct solution, along with instructions on how to repeat what you’ve reported?

– Dale

Hello Dale,
I attached here 20200227-MV_BrepCap-MeshOutlines.gh (450.0 KB) an example file with 3 cases showing how to reproduce the problem. Also if we use an aspect ratio > 5 when meshing, it fails too.
I figured out this morning, problem occurs not because of the trim but if I use a capped brep from this one. It’s not a big deal finally, as the resulting outline will be the same.
Mathieu