f3d-app / f3d

Fast and minimalist 3D viewer.
https://f3d.app
BSD 3-Clause "New" or "Revised" License
2.54k stars 182 forks source link

Add support for 3DM file format? #1489

Open zohozer opened 1 week ago

zohozer commented 1 week ago

Hi all.

I do need to visualize a lot of 3DM files created in Rhino and I think that maybe this format (3DM) can be added to the f3d library?

The 3DM format it is described here

From the description: "There are no restrictions. Neither copyright nor copyleft restrictions apply."

Best regards.

mwestphal commented 1 week ago

This one may be hard as Nurbs are not natively supported by VTK, so we would need to do some kind discretization.

Meakk commented 6 days ago

This one may be hard as Nurbs are not natively supported by VTK, so we would need to do some kind discretization.

We do have parametric surface triangulation with opencascade.

snoyer commented 6 days ago

This one may be hard as Nurbs are not natively supported by VTK, so we would need to do some kind discretization.

It is likely that Rhino's API provide that already (eg. ON_Surface::CreateMesh() "Description: Computes a polygon mesh approximation of the surface" maybe?)

mwestphal commented 6 days ago

Here is the OpenNURBS github: https://github.com/mcneel/opennurbs

It is maintained but the build system may reveal to be challenging.

snoyer commented 6 days ago

Here is the OpenNURBS github: mcneel/opennurbs

There is a GL example which must output triangles somehow... having a quick look it looks like there is various levels of built-in magic for the conversion, for example Brep face to mesh, or Brep face to Nurbs to triangles

zohozer commented 4 days ago

This one may be hard as Nurbs are not natively supported by VTK, so we would need to do some kind discretization.

When I do use Rhino a lot of times I do need to wait because the software it is calculating meshes even if I do work only with NURBS surfaces. I do think that even Rhino it is using meshes to display the geometry on screen and for the render engine (it is using Cycles as render engine).