How to include PreviewMesh in a 3dm file using only GH?

Hi there.

I want to display a 3dm file created in GH with Threejs.

I think that when I save a 3dm file created in Grasshopper with brep, it does not contain a PreviewMesh (RenderMesh, I think it is called?).
For example, when I run the following

Since the mesh is not included in it, Threejs will not display the model when it loads this file.
I know that if I open the 3dm file in Rhino, it will create a PreviewMesh, and I know that saving it will solve the problem, but I would like to complete this with just the code.
Is it possible to create a 3dm file that has the PreviewMesh in the code?
Is the only way to simply create a mesh and include it in the 3dm?

Thanks in advance.

Duplicate of Preview mesh for created Objects in rhinocommon File3dm - #5 by coroush

1 Like