mesh hair cloth: how to find root vertices to pin
I have found a python solution to effectively find vertexes to pin.
I the base/complete mesh, I first defined a Vertex Group called &quot;pinned&quot;.
The hair was a series of meshes, so I first separated each into its own with the Edit Mode Mesh &quot;Separate&quot; &quot;By Loose Parts&quot;:

I created a &quot;pin.target&quot; object near the crown of the scalp, to calc distance of each vertex I visit I then created a python script that did a select pattern to find all of the &quot;strand&quot; objects, and for all strand objects, for each vertex...
import bpy
import bmesh
from math import sqrt

pinTargetLoc = bpy.data.objects['pin.target'].location
print(&quot;pinTargetLoc=&quot;,pinTargetLoc)

bpy.ops.object.select_pattern(pattern=&quot;ToulouseHR*&quot;)
hairParts = bpy.context.selected_objects

cnt=0
bpy.ops.object.select_all( action='DESELECT' ) # Deselect all objects 
for hairPart in hairParts:
#    if cnt&gt;0:
#        continue
    print( hairPart, hairPart.location )
    hairPart.select_set(True)
    bm = bmesh.new()   # create an empty BMesh
    bm.from_mesh(hairPart.data)   # fill it in from a Mesh
    verts=hairPart.data.vertices
    #verts.ensure_lookup_table()
    cnt+=1
    print( len(verts),&quot; vertices&quot; )
    # find the vertex closest to the &quot;pin target&quot; object location
    closestVertex = None
    distanceOld = 9999999.0
    selected_verts=0
    for v in verts:
        distanceNew = sqrt(
            (pinTargetLoc.x - (hairPart.location.x + v.co.x))**2 + 
            (pinTargetLoc.y - (hairPart.location.y + v.co.y))**2 + 
            (pinTargetLoc.z - (hairPart.location.z + v.co.z))**2)
        print( distanceNew )
        if ( distanceOld &gt; distanceNew ):
            if ( closestVertex is not None ):
                closestVertex.select = False
            closestVertex = v
            print( closestVertex, &quot;@&quot;, closestVertex.co )
            distanceOld = distanceNew

    # add 'closestVertex' to pinned group
    indexList = [ closestVertex.index ]  # vertex index list  of single closet item
    print( &quot;closestVertex.index=&quot;, closestVertex.index )
    hairPart.vertex_groups.active_index=1
    pinnedGroup=hairPart.vertex_groups.get(&quot;pinned&quot;)
    pinnedGroup.add( indexList, 1.0, &quot;ADD&quot; )

    print(&quot;v count&quot;,selected_verts)
    print( &quot;closestVertex.co=&quot;,closestVertex.co )
# end of script

I then selected all strands, and then Joined them into the Scalp, where I could then Select the &quot;pinned&quot; Vertex Group and see the result:

I can now use this Vertex Group as the Cloth -- Pin group to keep hair strands from flying away.