Mesh.CreateFromBrep() is slow for this surface, but why?

First of all, I just want to point out that I’m aware that the object in the file below is far from origin and moving it closer to the origin solves the problem.

But what I don’t understand is the discrepancy between the mesh command and the Mesh.CreateFromBrep() method. Meshing from command goes instantly, regardless of the distance from the origin but when I use the Rhinocommon method it takes a loooong time. 95-99 seconds on my computer here. I’m using the most coarse meshing parameters in both the rhinocommon method as well as in the Mesh command.

Why is this? And how can I speed this up when I’m already using the most coarse meshing parameter possible in the method?

250107 MeshSlow.3dm (497.8 KB)

import rhinoscriptsyntax as rs
import Rhino
import time

obj = rs.GetObject()
brep = rs.coercebrep(obj)

mp = Rhino.Geometry.MeshingParameters(0.0)

ts = time.time()
mesh = Rhino.Geometry.Mesh.CreateFromBrep(brep,mp)
te = time.time()
print te-ts

Testing here with Rhino 8.16 build of today I see 0.74 seconds to convert to mesh:

Have you tried with Rhino 8.14 or 8.15 (service release candidate}

@nathanletwory Thanks for looking at this. I just updated to 8.14 and I’m getting 98 seconds.

I’m looking at this because this specific part of a code in a plugin is causing problems. However it’s rather weird. This specific part of the code makes some computers stuck for minutes whereas on other computers it works instant.

I asked my client to run the test as well and he got 80 seconds for this on his computer.

Meshing however goes instantly (which includes adding the mesh to the document, which I’m not even doing).

Bump, anyone?

With 8.16 service release candidate available, have you considered trying that to see if perhaps a bug related to this was fixed? As mentioned I don’t see the slow mesh generation.

edit: fwiw I just tested on 8.14 and I get the same ~0.7s meshing time as 8.16.
edit2: interestingly enough on my Windows machine it takes ~1.3s to mesh. But not 80+ seconds.

Something seems off with the update checking

Hei Siemen -

When that happens, you could try a reboot and restarting Rhino a few times, but the easiest is probably to click the “Check Now…” link and manually download and install the update.
-wim

I updated to 8.15 and I’m getting 3 seconds now. But meshing using the regular mesh command still goes instant. I don’t get why this would be the case? Is the coarsest setting in Mesh.CreateFromBrep() still higher than the coarsest setting in the mesh pop up window?