Converting Rhino model to ETO Imageview

rhino
image
eto
python

#1

Hi, I would like to be able to grab the rendered model in Rhino and place it in an ImageView() ETO form.

I am using Python to create the ETO form.

So for example, this:

Could be placed into one of these boxes:

Is this possible? What sort of tools do I need to do this?

Thanks so much for help.


#2

Hi @Jack_Perry, i tried something which might help to get a captured viewport into an image view…

ETO_ImageViewImageFromStream.py (1.9 KB)

c.


#3

Hi @clement,

I’m trying to get this working on mac as well I get the error Message: expected Bitmap, got NoneType where you said it maybe windows only. Do you know a way to do this on both platforms?

Regards,

Sam


#4

@Sam_Jacobson,

i cannot test on a mac here. Have you tried to input the captured bitmap directly to the image_view.Image without putting it in a memory stream on mac ? eg. something like this:

image_view.Image = bitmap

Maybe @curtisw can shed some light on this. Before doing the trick with the memory stream found in one of his answers on google groups i’ve tried to use the captured bitmap directly and this resulted in an error like “Expected bitmap, got bitmap”. I guess System.Drawing.Bitmap is not the same as Eto.Drawing.Bitmap

Apart from this, it’s pretty hard to do anything with Eto without examples or working intellisense in the built in python editor.

c.


(Dale Fugier) #5

@Sam_Jacobson, @clement:

RhinoCommon’s CaptureToBitmap has not been implemented on the Mac yet. Here is the YouTrack item:

https://mcneel.myjetbrains.com/youtrack/issue/MR-3031

– Dale


#6

Hi Clement and Dale,

Thanks for your earlier solution.

I was wondering how I could access the data from the image view? So instead of the image object I could retrieve a list of points from the building. I want to be able to retrieve data from each image based on what the user selected and have it appended to an array.

Thanks so much again,

Jack


(Dale Fugier) #7

An image view control just displays a picture (e.g. bitmap). So I am confused about what points from the building you want to retrieve, and what you want to retrieve it from. Perhaps we need more information.

– Dale