The things I think are absolutely necessary to define a selected subelement are:realthunder wrote:If you know which instance, which sub element, what more do you want?
1. list of instances (nested), through which the element was selected. For array instances, this must also include, which item of array (index).
2. Object the element belongs to
3. element name.
Correspondingly, assembly constraint links must allow storing that information.
For example, if I select Egde1 of a Sketch in a Body in an Instance of Part:
1. [(Instance, 0)] #0 is array index
2. <Sketcher::SketchObject>
3. "Edge1"
To recover the actual placement of selected edge, we need to build a transform(aka Placement), by looking up:
* getting up from Sketch to Part (-> Placement of Body)
* apply Placement of Instance[0]. Done
If instances are nested, we also need to figure out placement relation between them.