Add circle on mesh

I want to add circle on a mesh in c# that is tangent to the mesh like these pictures:
note that I want to add this circle when I move the cursor and also pay attention to line width of the circles in the images.



Hi,

I do not know how this could be done in C# syntax, but these are the methods you will need:
Dale already showed you how to get a point constrained to a mesh. Now use that point as a sample for mesh.ClosestMeshPoint() method. This one will give you faceindex and barycentric coordinates, which you will then feed into the mesh.NormalAt() method. Once you find the normal at desired point, just construct a plane, and draw a circle in that plane.

What was the issue with line width?

Mesh faces “should” have face normals. If not, they can be calculated using Mesh.FaceNormals.ComputeFaceNormals().