MoI discussion forum
MoI discussion forum

Full Version: Copy-paste from Rhino 7 to MoI3d

Show messages:  1-20  21-40  41-51

From: mdesign
17 Jul 2020   [#1]
Copy-paste from MoI3d to Rhino7 works well. Copy-paste from Rhino7 to MoI3d is flat. Is it some bug or that amazing feature won`t be supported in future?

Image Attachments:
RhinoToMoi3d.jpg 


From: Michael Gibson
17 Jul 2020   [#2] In reply to [#1]
Hi mdesign, well whether that works in the future or not depends on whether Rhino supports it or not.

Do you have any earlier versions of Rhino on that same machine? What happens if you try to copy/paste from Rhino7 into Rhino v5 or v6?

Getting a flat result may mean something like Rhino v7 is putting PDF format into the clipboard only and isn't responding to any requests for a v5 or earlier 3DM format type.

For the copy/paste from Rhino to MoI to work, Rhino needs to respond to requests for Rhino v5 3DM files. If it doesn't respond to that then that's the problem.

- Michael
From: mdesign
17 Jul 2020   [#3] In reply to [#2]
Thanks. You can`t copy-paste from v7 to v6. Something is messed up in Rhino.
From: mdesign
13 Dec 2020   [#4]
Will it be possible to copy-paste between newest MoI and newest Rhino 7? I love that MoI feature which works well with Rhino v6. Has something changed in that topic since my last question?
From: Michael Gibson
13 Dec 2020   [#5] In reply to [#4]
Hi mdesign,

re:
> Will it be possible to copy-paste between newest MoI and newest Rhino 7?

I don't know, it's up to the current Rhino developers to decide if they want to support copy and paste to other apps and to older versions of Rhino.

- Michael
From: Viewbyte
22 Dec 2020   [#6]
Greetings all,
Now that Rhino 7 is officially available to buy, I'm just wondering if there is a definitive answer to the question of Rhino-to-MOI copy / paste?
From: Michael Gibson
22 Dec 2020   [#7] In reply to [#6]
Hi Viewbyte,

> Greetings all,
> Now that Rhino 7 is officially available to buy, I'm just wondering if there is a definitive answer
> to the question of Rhino-to-MOI copy / paste?

Not that I'm aware of myself. But if you cannot copy/paste from Rhino 7 to Rhino 5 or Rhino 6 either then it won't work with MoI as well.

I might be able to cook up a utility program to help though, I'll look into it when the MoI v4 release wraps up.

- Michael
From: renklint
22 Dec 2020   [#8] In reply to [#6]
It is possible to copy paste from rhino 7 to rhino 6.
From: Michael Gibson
22 Dec 2020   [#9] In reply to [#8]
Hi renklint,

re:
> It is possible to copy paste from rhino 7 to rhino 6.

What about from Rhino 7 to Rhino 5, does that work?

- Michael
From: renklint
24 Dec 2020   [#10] In reply to [#9]
Sorry, I haven't got version 5.

Today I purchased Moi3d and have downloaded v4 beta.

I can kinda copy/paste curves from Rhino 7 to Moi v4.

But if the curves are 3d they are squished to flat on z.

Pasted a SubD and a Nurbs closed surface from Rhino 7, which came out as flat curves in Moi.
Then pasted to Rhino 6, copied and pasted both in Moi. Only the polysurface was pasted in Moi.

Image Attachments:
paste.png 


From: Michael Gibson
24 Dec 2020   [#11] In reply to [#10]
Hi renklint, probably what's happening is that it's the PDF clipboard format being used rather than 3DM format.

The problem is likely that Rhino v7 is not telling the OS clipboard system that it can produce a Rhino v5 3DM format for the clipboard data. That's what MoI would need to see in the clipboard for it to work.

What operating system are you running on? I can probably cook up a helper app that could make things work by translating Rhino v7 3DM format on the clipboard into Rhino v5 format, then you'd modify the paste function to run the helper app right before doing the paste.

I probably need to collect a little bit of information first like get the names of the clipboard formats that Rhino v7 is putting on the clipboard.

- Michael
From: renklint
24 Dec 2020   [#12] In reply to [#11]
I'm using win 10.

Please let me know if I can help you doing some tests.

The free clipboard viewer has this to report about the copied geometry.
(https://freeclipboardviewer.com/windowsclipboard/)

Attachments:
copy.cl7

Image Attachments:
clip.png 


From: Michael Gibson
24 Dec 2020   [#13] In reply to [#10]
Hi renklint,

re:
> Then pasted to Rhino 6, copied and pasted both in Moi. Only the polysurface was pasted in Moi.

That's to be expected - SubD is a new object type in Rhino v6 and v7 and isn't stored in Rhino v5 format 3DM files which is currently the latest type that MoI can read.

I think there's some method to convert a SubD Rhino object into a regular NURBS object, you would need to do that to transfer it into MoI.

- Michael
From: Michael Gibson
24 Dec 2020   [#14] In reply to [#12]
Hi renklint,

re:
> I'm using win 10.
>
> Please let me know if I can help you doing some tests.

Well the first step is to use a clipboard viewer utility to see what clipboard data types Rhino v7 is putting in the clipboard when you do a copy from Rhino.

It seems that there isn't a clipboard viewer built in to Windows anymore like there used to be.

If you can try some app like the ones mentioned here:
https://www.thewindowsclub.com/windows-clipboard-manager-viewer

the data that I'm looking for is a list of clipboard formats like it should have a list something like "CF_DIB", "PDF", "Rhino v7 3DM clip", etc...

I can cook up a little app that would gather and show this list if none of those viewers seems to do it well.

- Michael
From: renklint
24 Dec 2020   [#15] In reply to [#14]
Here's a list:

Image Attachments:
clip2.png 


From: Michael Gibson
26 Dec 2020   [#16] In reply to [#15]
Hi renklint,

re:
> Here's a list:

Thanks, that helps! I've got a helper app almost ready which I think should make it possible to solve this. It's a small program that is built with the OpenNURBS7 library and so it can look in the system clipboard and if a Rhino v7 3DM file is in there it can take it and convert it to a Rhino v5 3DM file and put that in the clipboard so that the paste will work.

Then you would modify your Ctrl+V paste keyboard shortcut so it runs this helper app before doing the actual paste into MoI.

I've almost got it ready to test.

What happens if you do a Ctrl+C copy in Moi and then try to paste in Rhino v7, does that work or is that direction also not working with Rhino v7 either?

- Michael
From: renklint
26 Dec 2020   [#17] In reply to [#16]
That sounds very promising.
From Moi to Rhino 7 works.
From: Michael Gibson
26 Dec 2020   [#18] In reply to [#17]
Hi renklint, I've attached the helper app here. Unzip it and save it somewhere.

Then you'll need to modify the Ctrl+V shortcut key in MoI to run the helper app before doing the paste.

To do that go to Options > Shortcut Keys and for the Ctrl+V key that currently has "Paste" for its Command value, instead put in this:

script: moi.filesystem.shellExecute( 'c:\\path\\UpdateRhinoClipboard.exe', 'target=moi', true /*wait for finish*/ ); moi.command.execCommand( 'paste' );

You'll need to update the c:\\path\\ to the path where you saved it, and also note that instead of just one \ character you need 2 of them like \\ because a single \ is an escape character in JavaScript.

Any luck with Ctrl+V working from Rhino 7 to Moi with that in place?

- Michael

UPDATE - Mac version is here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9890.35

Rhino script for going the reverse direction here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9890.40

Attachments:
UpdateRhinoClipboard.zip


From: renklint
26 Dec 2020   [#19] In reply to [#18]
Yes!
Points, curves, open surfaces and polysurfaces - from Rhino 7 to Moi.
You are a wizard!


Image Attachments:
rhino.png 


From: Michael Gibson
27 Dec 2020   [#20] In reply to [#19]
Hi renklint, that's great I'm glad that works!

- Michael

Show messages:  1-20  21-40  41-51