mcneel/rhinocommon

Rhino3dmIo Mesh.CreateFromBrep equivalent in C# .net?

Closed this issue · 2 comments

We are looking at reading in .3dm files in at runtime for our application, however, I am only able to convert the Meshes over as there is no Mesh.CreateFromBrep in the NuGet package for 3dmlo.

I was going to use dotPeek to see what the static methods contain and simply re-implement it, just here first to see if anyone has encountered this?

You are correct. Rhino3dm cannot tessellate (e.g. mesh) surfaces and polysurface. This is a known limitation.

https://developer.rhino3d.com/guides/opennurbs/what-is-opennurbs/

That said, you can get at the cached render meshes that (may be) stored on each BrepFace using BrepFace.GetMesh.

Does this help?

@dalefugier Yeah BrepFace.GetMesh() Does exactly what we want, and we can then append that onto a mesh. That seems to be translating everything but we have only run a few files through.

Snippet for anyone interested :)

image