modifying patchslim function

to optimize STL plotting