Project point to mesh returns wrong and multiple intersections

Hi, I made a tool that project points onto meshes but the results are wrong if the point is close to an edge, both interal and external.

Here all results that give more than one intersected is higlighted in red. The big problem here is that either one of them or both of then are NOT on the mesh.

As you can see there are points on the outer edges that are plain wrong too, and that only returns one answer, so these are not red.

The mesh is good, I have exploded and welded and unwelded to see if that could help, but to no avail. The problem is both in V5 and a V6.

points to mesh error (815 Bytes)

points to mesh error file.3dm (89.4 KB)

Any workarounds are welocome too, as I need this to work prior to any fixes :slight_smile:

The File Tolerance is 0.01 meters (1 cm) and if I set it to 0.0001 then I get a good result.

But why is a lower (default) tolerance throwing these errors? If the intersectionresults were within the tolerance then it would be OK, but they are not, some are over 1 METER above the mesh.


Hi Jørgen,

rs.ProjectPointToMesh() internally uses the absolute model tolerance and does not allow to define a different one. I do not know why the points are exeeding your tolerance of 0.01 meters.

You might try this instead:

Rhino.Geometry.Intersect.Intersection.ProjectPointsToMeshes(meshes, pts, direction, tol)

@Alain, the helpfile states that the method is part of the mesh module but it is actually pointvector.


1 Like

Hi @clement, you’re talking about the Rhino 5 help file right? It’s in the pointvector module in the online help and the new local help file that I’ve been working on.

Hi @Alain, yes it is V5 chm.


Still crossing my fingers to get this back for V6 :wink: