Doc Object Link to Sub-objects?

I am working on this:

def makePathArray(baseobject,pathobject,count,xlate=None):
    '''makePathArray(docobj,path,count,xlate): distribute count copies 
    of a document baseobject along a pathobject (docobject with shapetype=Wire/Edge).  
    Optionally translates each copy by FreeCAD.Vector xlate direction and 
    distance to adjust for difference in shape centre vs shape reference point. '''

I foresee a need to use only some edges from ‘pathobject’, but I don’t see a way to maintain
a reference to those edges (edge index/name is not reliable, yes?). “App::PropertyLinkList”
only works with document objects, not TopoShapes. Any suggestions?

Current basic working version of makePathArray is here: https://github.com/WandererFan/freecad-dev/tree/pArray
Comments more than welcome.

The next version will address orienting the baseobject to the path. Need to relearn some math first.

wf

Until the reimplementation of the Naming the index is reliably as it can be. At the moment the PropertyLinkSub properties use them too..

Yes, PropertyLinkSub is your friend. Note that it can take only one (object,subobjectname) tuple. So you cannot use it for, for example, several edges. But anyway, for a path, I guess you’d better use a wire. Otherwise, you can use PropertyLinkSubList which takes a list of those tuples.