An erro message appears when I set the toggle False, saying that Solution exception: The index was out of range. They must be non negative or smoler than the collection. Paremetric name: Index what is wrong ?
There might be for a variety of problems, but I believe it is because your input mesh is not welded proper.
Could you select the mesh in Rhino; type "_WeldVertices" in the command prompt and hit enter; select all the vertices (just draw a big selection window over the whole mesh) and hit enter again.
Now Go back to Grasshopper and use this "new" mesh as the input under "reference mesh"
Let me know if this worked,