Indeed it is. There is also a unitative purpose, however when the sexual act denies one or both of these purposes it is immoral. In the case of homosexual acts it denies the biological and naturally ordained purpose of the sexual act (procreation) and is thus immoral.
Rape is immoral because it denies the unitative purpose in that one of the persons is being violently forced against their will to engage in sexual behavior, and yet presuming this is heterosexual and without contraception this does not deny the procreative purpose, but it is equally if not more immoral regardless because of the denial ofthe unitative purpose and the degradation of the human dignity of one of the parties involved.