0
$\begingroup$

I am trying to find the deepest point of a rough pit located on a rough 3d object. The pit is full of irregular vertices.

enter image description here https://drive.google.com/open?id=1muCjhRDHhwo3AnY194BAvkaCpPIdyWhx

I cannot determine which one of them is the lowest. Could you please help me? Thanks!

$\endgroup$
  • 1
    $\begingroup$ Can you give us a screenshot of the pit? Can't you just go into front view, and wireframe mode and see which vertex is the lowest? $\endgroup$ – Leander Apr 4 '19 at 15:59
  • $\begingroup$ Thank you @Leander I can go into front view and see vertices as seen in the screenshot below however I am trying to find the exact lowest point of the surface. I am going to make measurements regarding this point for my scientific article so I need to be very precise. drive.google.com/open?id=1muCjhRDHhwo3AnY194BAvkaCpPIdyWhx $\endgroup$ – Bugri Apr 6 '19 at 16:39
1
$\begingroup$

Local minima

Calculus is full of finding maxima and minima of equations. Numerical methods , generally iterative, can be employed to find turning points based from Newton's Method or Gradient Descent to name a couple.

Turning points occur where the derivative (tangent) is zero. Inconveniently the mesh isn't defined as an equation. For every vertex there is a normal, that is perpendicular to the tangent.

enter image description here Vertex selected in "ding" in icosphere test

As a simple test case, for each vertex:

  • Create an imaginary plane from coordinate and normal.

  • For all vertices of neighbouring faces if the distance to plane is greater than or equal to zero then it is "below" all neighbours and considered a local minimum

  • The test is looking at all neighbouring verts being above, for a really rough mesh this may need to be relaxed slightly.

Simple edit mode test script.

import bpy
import bmesh

from mathutils.geometry import distance_point_to_plane as dp2p
context = bpy.context
context.tool_settings.mesh_select_mode = (True, False, False)
ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)
bm.select_flush(True)


for v in bm.verts:
    # define "vertex" plane
    p_no = v.normal
    p_co = v.co
    # neighbouring verts
    nvs = set(nv for f in v.link_faces for nv in f.verts)
    v.select = all(
            dp2p(nv.co,p_co,p_no) <= 0 
            for nv in nvs)

bmesh.update_edit_mesh(me)

enter image description here Result of reversal of test. dp2p(nv.co,p_co,p_no) <= 0 as a useful way to find concavities

Once a point is selected its local depth (depth from surface) could be calculated (estimated) by selecting out from point until distance from plane stops increasing, and choose the max.

As mentioned this is a very simple test. Once a vicinity is known a more robust method like raycasting could be employed.

| improve this answer | |
$\endgroup$
0
$\begingroup$

Do you tried mesh analysis?

The Sharp analysis:

enter image description here

And Thickness:

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for helping! $\endgroup$ – Bugri Apr 18 '19 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.