Fastest way to Serialize GeometryBase

can you point me to any of these sources for the MAX file format specifications / preview?
I am quite sure that this does not exist - but would be happy to be corrected.

I made a rough prototype using the 3d-Graphics in WPF, obviously this can only work with meshes inside of .3dm files as I still don’t know how to get those render meshes :confused:

3 Likes

Hi @lando.schumpich,

This should do it.

Brep brep = ...

var mesh = new Mesh();
foreach (var face in brep.Faces)
  mesh.Append(face.GetMesh(MeshType.Render))
mesh.Normals.ComputeNormals();
mesh.Compact();

– Dale

1 Like

Thanks @dale,

works like a charm.

1 Like

@atair, look at this source code…

http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=8303&lngWId=10

They are exist…

Great work @lando.schumpich:+1:

Could you please share the source code?

Thanks.

Thanks @lando.schumpich

Could you please share the source code or tell us how you do it?

Thanks for your help. I much appreciate it.

Its on my github: https://github.com/DerLando/RhinoPreview

but really it’s super rough still don’t expect too much

1 Like

Hay @lando.schumpich… You’re the man :+1:

…yeah… that is not 3ds MAX but 3ds studio DOS from 1992 - the Max format is not open. There were some basic readers in the early 2000s but they are long gone and the format adapted.

1 Like

@atair, I tried it and it works on Windows 10 Pro environment… I convert Rhino 3DM files to 3DS files and used this code to view them with no problem…

Anyway, the solution provided by @lando.schumpich is the one who I was looking for.

Great thanks for all of you team… You’re a legend :wink: