I’m looking for a way to save as a .jpg or .png file the elements that appear inside a specific area of the viewport and at a custom resolution . I was thinking about a Python script in Grasshopper that would take as inputs:
- a closed polyline (area/contour of the canvas)
- 2 ints (width and height in pixels)
- 2 strings (path + file name)
- a boolean (to trigger the saving of the image)
Is it feasible ?
Looking at the RhinoCommon API I found the following classes and functions that, I think, could be useful in this case but I can’t seem to figure out which one exactly is the most relevant and how to use it properly:
Could someone give me a hint on this ?