You can make a convoluted context for just about any grammatical sentence in English. In the situation you gave, yes, it would be understood that it went in "ugly" and it emerged "lovely". It's a shame such magic boxes don't exist though, isn't it? Not that I would put rabbits in them if they did. Rabbits are very lovely anyway.