Bug Rhino7 Intersection.MeshMeshFast()


I came across a bug in Rhino.Geometry.Intersect.Intersection.MeshMeshFast(). I am getting the error message

Message: Value cannot be null.
Parameter name: source

I believe that the Intersection.MeshMeshFast() function first calls the new Intersection.MeshMesh() function to set the Polyline source, and on failure returns null. However, the Intersection.MeshMesh() function can complete successfully and return Polyline intersections as null. This then causes the error in Intersection.MeshMeshFast() without it being able to call UnsafeNativeMethods.ON_Mesh_IntersectMesh(). Should be quick to fix.



OK; I noted it. RH-57569.
What version of Rhino WIP are you using?

MeshMeshFast in Rhino 7 will not be any faster than MeshMesh() or MeshMeshPrecise. In fact, it will call MeshMeshPrecise() under the hood.

Hello Giulio @piac

I’m using 7.0.20077.15225, 03/17/2020. I’m not so concerned by the speed, I’m just trying to find a function that gives me a result. So at the moment my script is trying the different Rhino mesh intersections, my own basic mesh intersection, and turning everything into breps and intersecting those, until it has found a result.



1 Like

Hi @Ano

I cannot reproduce this in newer WIPs. Can you please post an example where this shows?
Alternatively, can you test this in a newer WIP?



Giulio Piacentino
for Robert McNeel & Associates

Hi @piac,
I am encountering the same issue descrived before in WIP 7.0.20098.
I am testing if my plug-in Wasp is working in Rhino 7, and I get problems whenever using MeshMeshFast method, with the error:

  1. Solution exception:Value cannot be null.
    Parameter name: source

Any progress on what the problem could be?

@ar0551 can you send a small sample? I’ll make sure to fix it asap then!

Hi Giulio,

if you have Wasp installed, you can see the error whenever loading a Part component (basically it used MeshMeshFast intersection to check if the collider it generates is valid).
You can see the problem here: 200413_Wasp_rhino7_bug.gh (17.9 KB)
Thanks for looking into this!

Hello Giulio @piac

Those two meshes give the error. They do not intersect, one is fully contained in the other.

Error-MeshMeshFast-CK200413.3dm (27.4 KB)




OK; I can reproduce it! Thank you. I’m looking into this.

This should get fixed in this week’s WIP, that is released in a few hours.

1 Like

RH-57569 is fixed in the latest WIP

Great! Thanks a lot!

@piac @brian
I can confirm, that Wasp is working properly in the latest WIP.
Thanks for the quick fix!