Do you think it's a good idea if I say to my girlfriend that she isn't especially attractive?
Why would you say that? Do you want to dump her?
I'd probably still hang out with her if I have no one else around me.
I think it's terrible that you want to say things like that to your girlfriend.  We shouldn't say hurtful things to the people we're in a relationship with.  If you don't want to be with her and longer than own up to that!
I'm saying it because she won't have sex with me.
If that is your reason, then you need to talk to her and let her know what is actually bothering you. Telling her she is unattractive is only going to make things worse.