Is there a more efficient way to write custom filters to find cousins? The one below uses the “Home Person” as the foundation to find 1st cousins of the Home Person. It is awkward but works.
The most awkward part is the ancestor section. The Grandparents custom filter finds all the ancestors a certain number of generations away and subtracts the ancestors one generation nearer.
The Pedigree Gramplet compiles a list of Generations. (The lists default to ahnentafel number order.) The Pedigree generates lists of ancestor generations a lot faster than the custom filter.
But even though slow, the process cannot be extended to select a set of Nth cousins. The rule set lacks the necessary “Descendants of <filter> not more than <N> generations away” rule.
<?xml version="1.0" encoding="UTF-8"?>
<filters>
<object type="Person">
<filter name="Grandparents" function="one" comment="of Home Person">
<rule class="IsLessThanNthGenerationAncestorOfDefaultPerson" use_regex="False">
<arg value="3" />
</rule>
<rule class="IsLessThanNthGenerationAncestorOfDefaultPerson" use_regex="False">
<arg value="2" />
</rule>
</filter>
<filter name="Piblings" function="and" comment="of Home Person">
<rule class="IsChildOfFilterMatch" use_regex="False">
<arg value="Grandparents" />
</rule>
</filter>
<filter name="Cousins" function="and" comment="of Home Person">
<rule class="IsChildOfFilterMatch" use_regex="False">
<arg value="Piblings" />
</rule>
</filter>
</object>
</filters>