The very short answer is no. The sole requirement for an heir to the throne (per the Act of Settlement 1701) is that they have to be "Heirs of [the monarch's] Body" and "such Issue to the Heirs of the Body", so basically the King/Queen's children and their subsequent offspring. There's no mention of a legal requirement for the heir or the monarch to create an heir, nor any obligation constitutionally for them to do so.
the Crown and Regall Government of the Kingdoms of England France and
Ireland and the Dominions thereunto belonging should be and continue
to Your Majestie and the said late Queen during the joynt Lives of
Your Majesty and the said Queen and to the Survivor And that after the
Decease of Your Majesty and of the said Queen the said Crown and
Regall Government should be and remain to the Heirs of the Body of the
said late Queen And for Default of such Issue to Her Royall Highness
the Princess Ann of Denmark and the Heirs of Her Body And for Default
of such Issue to the Heirs of the Body of Your Majesty
As to the spouse of the legal heir to the throne (and anyone in the top six in line to the throne), that's dealt with in the original act and clarified in the Succession to the Crown Act 2013 which indicates that the spouse needs merely to have Her Majesty's consent to marry (or otherwise their offspring aren't eligible to the throne).
A person who (when the person marries) is one of the 6 persons next in the line of succession to the Crown must obtain the consent of Her Majesty before marrying.
(3) The effect of a person’s failure to comply with subsection (1) is that the person and the person’s descendants from the marriage are disqualified from succeeding to the Crown.
The interesting test will come if/when the future spouse to the heir is a same-sex marriage, if the heir has progency as a result of sperm donation or if the heir adopts a child. None of those would result in an eligible heir (since they aren't progency of Princess Sophia) but there would be overwhelming pressure to amend the law (again) to make them eligible.