Problem getting normal mesh rhinocommon

Just for completeness: You can implement Mesh.ClosestPoint without getting into StrongBox overload territory. The second overload can be implemented like so:

fid,MPt = M.ClosestPoint(Pt,T)
MN = M.FaceNormals[fid]

190921_ProblemGettingNormalMesh_AHD_00.gh (11.4 KB)

In this case it probably does make more sense to implement Mesh.ClosestMeshPoint though, as it returns all the information you’re looking for. If I recall, this is more expensive though (if that’s a parameter).

2 Likes