I want to make a schematic of two masses connected by a string. One is positioned on a solid body, the other is hanging down the body's edge. Typically, a solid body is shown by putting diagonal lines within it. I could obviously just draw a couple ones with \draw, but maybe there is a faster way to do this.
If some of you know how this could be achieved, I'd be glad to learn how it's done.

patternslibrary and addpattern=north east linesto the area you want to fill with this pattern. There is also thepatterns.metalibrary that allows for finer adjustment (have a look at the TikZ manual). – Jasper Habicht May 24 '23 at 13:14