Vector output of wireframes by line weight based on depth?

Hiya,

I wanna do a make 2D of a viewport, but with lineweights based on depth from the camera. It can’t be raster, and all i see is from the forum is raster options that does outlines. Whereas i need wireframes, like X rays, but with lineweight, not colour.

Maybe there’s a grasshopper script, or a code script?

thanks