Hello all,
I am posting in this category because that’s what I thought could fit better my request, as it regards a change in RhinoCommon. If I have misplaced this, I ask the moderators to please find the appropriate place in the forum.
I have noticed that, since Rhino7, the Rhino.Geometry.Intersect.Intersection.MeshMeshFast()
method is flagged with:
Warning (CS0618): Rhino.Geometry.Intersect.Intersection.MeshMeshFast(Rhino.Geometry.Mesh, Rhino.Geometry.Mesh) is obsolete: Use the MeshMesh() method.
My use case needs to go through many iterations in which a lot of one-to-one or one-to-many tests are performed just to check if a mesh intersects with at least another mesh, no need to check overlaps of have the intersection or overlap geometries back. For this, I used, until now, to check the length of the return array from MeshMeshFast().
I have compared the execution times of the obsolete vs new method in the attached Grasshopper file. Unfortunately for me, the updated method is worryingly slower in terms of execution (~20 times slower in checking 200 intersections of 2 spheres each). I also tried with MeshClash.Search, which is considerably faster than MeshMeshIntersection, but still slower than the obsolete method.
Am I missing something or doing something wrong here? If not, would it be possible to keep MeshMeshFast in RhinoCommon? Or suggest an equally simple and fast alternative?
TestMeshMeshIntersection.gh (47.2 KB)