A relationship arising out of blood is consanguinity. A relationship arising out of marriage is affinity. They are different impediments. There is also the impediment of public propriety, which create relationships from concubinage (i.e. living together or having a sexual relationship with another) or invalid marriages.
In the example you gave, the relationship between Ted and Fred and their children is one of affinity, through the marriage of their parents they become related but not by blood. As another example, I am now related to all of my husband’s family by affinity.
Under older codes of canon law, there were *extensive *prohibitions against relationships arising out of affinity. For example, under older codes not only would I be related to my husband’s family but also all of my family would be related to his. So, my sister could not validly marry his brother, for example.
Today this is not the case. The impediment of affinity it is confined to the direct line, for example a step mother marrying her step son.