Tool "go to the center"

Good morning, everyone,

I use rhinoceros 5 with the rhinogold pluggins.
Thanks to rhinogold I use a tool called “go to the center”

centre

allowing to center the selected objects.
Is there in rhinoceros 6 or matrix-gold the equivalent?

Thank you for your answers.
Remy

1 Like

you can grab any object on the gumball centerpoint and drag it snappy to any other location you have active in your snaps. just activate it and click on the center of the gumball and start dragging.

Thank you for your answer. But that’s not the question I asked, I’m aware that this manipulation exists, but it takes more time than “go to center”.

What does “GoToCenter” actually do - is it an object snap or ?

I think it moves the BBox center to w0,0,0; I remember this coming up before and I, or somebody, may have scripted it… I’ll poke around.

-Pascal

Oh, I also have one for that I think… let me look…

MoveObjCtrToOrigin.py (1.6 KB)

2 Likes

Yes, that’s right. Now how to load the script and create a tool?

Thank you. Thank you.

I opened py, with editpython then saved it as.rvb and then loaded it with loadScript. But it does indicate an error message

Doesn’t work that way. This is a Python script, it won’t work with Loadscript or Runscript. You need to use _-RunPythonScript.

https://wiki.mcneel.com/developer/macroscriptsetup

But every time I have to use this “command” I have to run RunPythonScript to launch the tool? or I can create a tool with a shortcut?

The Wiki link I posted above explains all that…

1 Like

oh sorry but i guess your question was not fully obvious at least not for those who don’t use rhino gold.

maybe not fully, because when you start dragging the center point of the gumball then you can enter 0 and hit space or enter which positions your object into the origin.

2 Likes

hello Helvetosaur

First of all, thank you for your answers.
I followed the instructions you gave me via this link:
https://wiki.mcneel.com/developer/macroscriptsetup

However, here is the error message it tells me when I want to launch this one:

and here is the script I entered in the button editor command.
For information I tested this one it works.

Thank you for your answers.

Remy:)

Well, you left out two lines at the top of the script. You need to copy everything in there, from start to finish.

1 Like

Thanks for your help Helvetosaur, it works:)

I just restarted my computer and rhinoceros, and I just noticed that my script no longer exists.
Do you have any idea?

:roll_eyes:

Did you have multiple Rhino’s open and only make the new button in one of them ? If the one you made the changes to was not the last one that closed, your changes will be overwritten, and the button will disappear".

https://wiki.mcneel.com/rhino/saveyourworkspace

@remydellinger,

A friendly suggestion. Do not put the code directly inside the button. Put it in a .py file and use the full path to that file inside the button.

Make sure the path doesn’t contain spaces and that Rhino can access it. Just to avoid potential problems.

Thank you for your answer.
is how I do that?

:slight_smile:

Hi @remydellinger,

I’m Xavier from the 2Shapes team.

I hope to arrive on time to help you.

I have been talking with the development team and they just implemented “Center to CPlane”, this is the result:

2Shapes for Rhino is the new jewelry plug-in that joins 2Shapes features with Rhino to make a powerhouse for jewelry design.

Interested? I would suggest to check our website on https://www.2shapes.com/rhino

We will release the first beta next week.

Feel free to contact me if I can help with anything! :grinning:

1 Like