Better paste options?

Hi
I like to paste remembering the point, it is useful when projects gets big and I tend to keep facade and different floors on different files since it lags so much. However, I would also like to be able to paste something in the center of the viewport or paste wherever the cursor is.

Any smoother way to do this?

1 Like

Well, this is not too hard in 2d space but what about 3d? ā€œWherever the cursor isā€ or ā€œcenter of viewportā€ are 2D concepts - at what (infinite) depth do you paste the 3D object?

Well I use it for plan and section mainly, copy and pasting in 3d isā€¦ not as amazing. It doesnt have to be very exact, im just bothered by having to zoom out, zoom in to choose a basepoint, move, then raise the object up to construction plane, then zooming in again to place it.

Yes, my point was that all viewports in Rhino are 3d, even the orthographic ones, so where you paste in depth is always a question. It could be made to paste to the CPlane 0 if an orthographic viewport is detected as the target, but I think thatā€™s only semi-usefulā€¦ Maybe if the function were limited exclusively to planar geometry lying on the CPlane it could be made logicalā€¦

ā€“Mitch

it doesnā€™t paste into an exact positionā€¦ the object is hanging on the cursor as if you did:

Paste
Move
select point to move from

now the object is just dragging around on the cursor (which is on the cplane) until you click an insertion pointā€¦ in this case, the move from point would probably be assigned to some particular part of an given objectā€¦ like lower-left-front corner.

(if i understand correctly the request)

1 Like

Well, except for copying between different files, how is that different from just using the Rhino Copy command?

i donā€™t know
maybe @ameda9 is a sketchup user?

because sketchupā€™s Paste does what heā€™s asking forā€¦ then it has ā€˜Paste in placeā€™ which does what rhinoā€™s paste does.

[edit] other software has the different pastes tooā€¦ a lot of the adobe apps do and i know of a few othersā€¦ you can either paste in place or just paste which puts the object on the current cursor position.[/edit]


but itā€™s handy at timesā€¦ if you have an object in the clipboard, you can just ā€˜paste to cursorā€™(?) and the object is right there ready for you to position it in the current viewā€¦ otherwise, if you paste in rhino, you have to navigate to the location it was originally copied from in order to get the new copyā€¦ then navigate back to where you want the thing to be.

1 Like

As Paste is usually(Always?) preceded by a CopyToClipboard, an option to copy from and paste to would be pretty useful.

1 Like

It appears that some people understand exactly what I meant but if not then im really not requesting anything very specific.I just assumed there was a command that pasted something somewhere in the vicinity of the current viewport. Again, I do appreciate the exact copy location as well but one doesnt necessarily exclude the other.

The ā€œproblemā€ with the current system becomes worse when you do either a) big scale models or b) uses clipping planes.Like in order to avoid big lag i tend to use clipping plane for larger buildings so I only see the top floor for example. If I copy/paste a door from another document that is located at 0,0 on another file then it will often be hidden until i raise it to the right location, even though I set the cplane to start on the top floor.

Here is a work-around technique for pasting a selection accurately, without zooming (or altering clipviews I think).

In the copy-from file:
Pre-select the objects to be copied to clipboard (or select after starting the move sequence);
'Moveā€™
Move-From - Pick a point to use as the Paste origin;
Move-to 0,0,0 (w0 using world top in case the CPlanes are different in both files, then enter) without zooming;
ā€˜SelLastā€™
ā€˜CopyToClipboardā€™ (the objects are still selected although they may be off-screen)
ā€˜Undoā€™ return to return the objects to position.

In the Paste-to file:
ā€˜Pasteā€™ (the objects are selected when pasted in, so can be moved accurately although they may be off-screen)
ā€˜Moveā€™ - move-from, type w0 and the pasted objects come into view;
Pick a move-to point and that is the Paste origin picked in the copy-from file.

1 Like

I agree with ameda9. Would be very useful to have both paste options. As in paste to exact position. And also to where cursor is

If one is copying from another file it can be a pain to then move it to correct position

1 Like

Hi all - I dredged up an old RhinoScript that might help - Drag and Drop the rvb file onto Rhino to add two new aliases

PasteAtCursor - pastes where ever the cursor is.

PasteToCursor pastes and attaches the object to the cursor, click where you want it to end up.

PasteToCursor.rvb (1.1 KB)

-Pascal

3 Likes

Thanks Pascal but donā€™t think this will work for me as am using Mac version.

Stumbled across this post by chance when searching for solution

@seamus, here are pythons for these in -RunPythonScript macros-

! _-RunPythonScript (
import rhinoscriptsyntax as rs
import scriptcontext as sc


def PasteToCursor():
       
   rs.EnableRedraw(False)
   rs.Command("_Paste")
   if rs.LastCommandResult() != 0: return
       
   Ids = rs.LastCreatedObjects()
   if Ids is None: return
       
   pt = rs.BoundingBox(Ids)[0]
   rs.EnableRedraw(True)
   rs.Command("_Move W" + str(pt) )
           

PasteToCursor()
   )

And this one-

! _-RunPythonScript (
import rhinoscriptsyntax as rs
import scriptcontext as sc

def PasteAtCursor():
    
    rs.EnableRedraw(False)
    rs.Command("_Paste")
    if rs.LastCommandResult() != 0: return
    
    Ids = rs.LastCreatedObjects()
    if Ids is None: return
    
    pt = rs.BoundingBox(Ids)[0]
    
    targ = rs.GetCursorPos()[0]
    
    rs.MoveObjects(Ids, targ - pt)    
    rs.EnableRedraw(True)
    
     
PasteAtCursor()
)

Formatting here does not want to cooperate - let me know if that does not workā€¦

-Pascal

4 Likes

Hi @pascal the first works fine ā€¦

The Paste At Cursor script doesnā€™t seem to work. here is my screenshot in Atom.

let me know if the indents are correct

I am getting this error ā€¦

OK, Iā€™ll check it, thanks.The indents look correct off hand, thatā€™s not the problemā€¦ hold on a bit. I guess I need to fire up the mac and see if GetCursorPos() works on its own.
My guess of the moment is that running from Atom, there is no cursor position in Rhino so it chokes.

-Pascal

Thanks Pascal. Will try this although have never tried scripting

I donā€™t see anything in Dash Docs ā€¦ RhinoCommon or Rhino.Python ā€¦

Thanks Ā«Randy

I did find this, now that the RhinoScripSyntax (Rhino for Mac) is back ā€¦

But your hunch about running from Atom could be correct.

! yaaaas