Feeding the correct parameters to RC Intersection.MeshMesh()

Can someone put up the correct format for the arguments?

First it wants at least 7 parameters… :grimacing:
Second, it wants an IEnumerable(meshes) - won’t accept a python list of meshes - but when I try with something like

ie_meshes = clr.StrongBox[List[Rhino.Geometry.Mesh]](meshes)

– where meshes is a list of mesh geometries, it doesn’t seem to like that either.


Hi @Helvetosaur,

Does this help?

import System
import Rhino
import scriptcontext as sc

def test_meshmesh():
    filter = Rhino.DocObjects.ObjectType.Mesh
    rc, objrefs = Rhino.Input.RhinoGet.GetMultipleObjects("Select meshes", False, filter)
    if rc != Rhino.Commands.Result.Success:
    if not objrefs:
    in_meshes = System.Collections.Generic.List[Rhino.Geometry.Mesh]()
    for objref in objrefs:
        mesh = objref.Mesh()
        if mesh: 
    tol = sc.doc.ModelAbsoluteTolerance
    ct = System.Threading.CancellationToken(False)
    rc, polylines, overlaps, out_mesh = Rhino.Geometry.Intersect.Intersection.MeshMesh(in_meshes, tol, False, False, None, ct, None)
    if rc:
        for p in polylines:

if __name__ == "__main__":

– Dale

Hi @dale

Thanks for the sample, I’ll test.
Is there a reason in this instance to require the list of input meshes to be repackaged as a System.Collections.Generic.List? There doesn’t seem to be any kind of overload on this argument that would warrant this, why can’t it accept a normal list of meshes like most other methods?


Hi @Helvetosaur,

it seems to have changed in R8, i was able to pass a list created like below:

meshes = [objref.Mesh() for objref in objrefs]

do you have any clue how to use the CancelationToken in IronPython so i can press ESC to stop it ?