Could osl shader draw outside mesh?


I’m currently developing a toon shader, I do know how to detect mesh edge, but all approaches I know can only draw things inside mesh, which is not really the edge effect I want to achieve.

So is it possible to draw outside mesh, even I can only put a lot of dots of different size along the edge

(Actually I’m trying to make an osl version of Arnold’s aiToon and possibly make some improvements)