Curve.ProjectOnMesh slowness

Hi @dale,

i’m trying to project a few hundred lines on a mesh with 200k faces using Curve.ProjectOnMesh and it so unbelievably slow, even using the loose argument and coarse tolerance, i don’t understand why ?

If i use the _Section command manually in Rhino it seems to project instantly. Is there a better method to do this i’m missing maybe ?

thanks,
c.

Hi @clement,

I know this is a little bit different but how about PullToMesh ?

https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.curve/pulltomesh

This was updated/added in 8.17 so there may be some performance gains here?

Hi @michaelvollrath, i’ll need to control the projection direction.

_
c.

1 Like

Hi @clement,

Are you calling Curve.ProjectToMesh n curve number of times, or once for all curves? (Hint, it does make a difference).

– dale

Hi @dale, i’m using this one which allows to project multiple curves at once. Just seen this is rather new (8.17). Is there a difference to the one which does not have the loose option (V5) ?

edit: the new method with loose enabled is 25 times slower than the old method. If Loose=False, it’s the same speed as the old method.

thanks,
c.

Hi @clement,

With loose=False, the method use our mesh-mesh intersector. If True, then some other computation is performed.

– Dale