patmo141 / cut_mesh

Tools for mesh trimming and cutting in Blender
64 stars 18 forks source link

ability to snap to non-manifold edge that is behind a surface #78

Open ooMICAHoo opened 6 years ago

ooMICAHoo commented 6 years ago

When i scroll over the surface of a mesh to place my first point, sometimes the hovering algorithm "sees" a non-manifold edge that is on the other side of the 3d mesh that is not visible to the the current view.

ooMICAHoo commented 6 years ago

the hover_non_man function uses kdtree.find which finds the closest non-manifold location in all directions. This is problematic because it is finding non-man locations that are not seen by the user with their current view.

Possible solution would be to store all the screen locations in a 2d array and find the closest point using that.. I don't know fully how that will look or work though.

ooMICAHoo commented 6 years ago

I fixed this issue by casting rays on the verts that are being tested and only using the ones that are visible. however this introduced a new error. Now non man points don't show up at all in certain circumstances.