I need to get information about pixels in a picture frame inserted in Rhino.
I already know how to do this on an external image. (System.Drawing.Bitmap.FromFile)
There is some method in Rhino.Geometry to do this within Rhino with a picture frame?
This picture frame will be twisted and trimmed with Shrink.
Moved to Scripting category so your message will be seen.
There should be a new RhinoObject.IsPictureFrame
property available in the Rhino 7 SR9 release candidate.
import Rhino
import scriptcontext
def test_picture_frame():
filter = Rhino.DocObjects.ObjectType.Surface
rc, objref = Rhino.Input.RhinoGet.GetOneObject("Select surface", False, filter)
if rc != Rhino.Commands.Result.Success: retirm
rh_obj = objref.Object()
if not rh_obj: return
rc = rh_obj.IsPictureFrame
print("Picture frame = {0}".format(rc))
if __name__=="__main__":
test_picture_frame()
Once you’ve determined an object is a picture frame, it’s just a matter if looking at it’s render material.
– Dale