LinkSub/pl

Description
A LinkSub is a data structure that is used as input to various functions and objects; its purpose is to pass a subobject or subelement (vertex, edge, or face) from an object to another object that will use or transform that geometry.

A LinkSub is composed of a list of two arguments.

The first argument is a reference to a document object, and the second argument is a text string indicating the internal name of the subelement. This name has a number starting with one, and up to the total number of those subelements.

The second argument can itself be a list of strings, indicating various subelements of the same document object.

It is possible to see that a LinkSubList is a list of LinkSub structures.

Scripting
FreeCAD Scripting Basics, LinkSubList.

A new scripted object can accept a LinkSub by adding the corresponding property.

It is important to recompute the objects before their subelements are used as input for other objects, otherwise an error may be produced as the geometry may not contain a valid Shape.

The subelement can then be extracted from the assigned property, and can be manipulated to do something.