Center Object
-
Is there a way to center an object to the axis origin?
Thanks!
-
the object is placed based on its local axis so if they are centered then try typing
[0,0,0]
into the measurements box when moving an object....
if the local axis arent centered then you will need to either center or find another way....
-
There is also a ruby script that moves an object to the origin. Found here, on smustard.com.
Chris
-
If I try typing that it gives me invalid length entered.
Edit: I guess it depends what measuring units you're using, typed 0.0.0 and it worked, thanks!
Edit2: Seems like the last place I typed 0.0.0 gets memorated and whenever I type that again it moves it to where it was, but not in the center of the axis(origin) -
The plugin doesn't center the object to the axis, the center of the model needs to be on the "origin", the plugin just moves it next to the origin.
-
I don't quite understand, but if it doesn't work for you thats fine. I thought it would move the selection to the origin, as the name implies. But apparently not?
Chris
-
-
oh I see. Yes, it moves the object to the origin, but not exactly centered on the origin.
Do you still need that functionality? You might ask over in the ruby forum, and mention you've seen this script and it is close, but it doesn't quite do what you need. Perhaps someone will have a few minutes to write it.
Chris
-
I don't think it's worth making a script just for this, I thought there was a way to center the object to the origin some way with what's available in sketchup as I do not know all the functions since I'm pretty new, obviously. It's crucial for me to export the model exactly on the origin. So unless a plugin is made just for this it's pretty much impossible..?
Thanks!
-
Its a seriously easy plugin to write. I'll see if I get some time to write it today.
Chris
-
Ok, If you deem my request achievable then I'm grateful, thanks.
-
ok, a few questions.
Will this script only get run on components? (on second thought, I can probably make it work for anything selected just to be more globally appealing)
If the selected component/group is rotated, should the script re-orient it to the world axis, or leave it how it is?
Where should the plugin install itself? To the right click menu? or the plugins menu? I prefer the plugins menu only, but some people really like their right click menu to be full.
Its almost done,
Chris
-
You work fast, that's for sure.
I'm not the most experienced person to answer these questions but I'll give it a go.From my perspective it's fine to run on groups/components only, but if you say it adds that much more appeal to work on on bjects too then go for it, if it's no trouble.
@unknownuser said:
If the selected component/group is rotated, should the script re-orient it to the world axis, or leave it how it is?
I think it's more useful if the script centers it but doesnt rotate it back. Adds a bit more flexibility, I think.
@unknownuser said:
Where should the plugin install itself? To the right click menu? or the plugins menu? I prefer the plugins menu only, but some people really like their right click menu to be full.
I would say/prefer in the Plugins Menu, since my right click menu got a bit too big, but it's up to you, whichever works.
@unknownuser said:
Its almost done
Cheers to you, then!
-
ok, its done and I started a thread here:
http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=18691#p152438
Download the file and save it to your plugins folder. Watch the video to see how it works. And run sketchup and test it to see if it does what you expect. It does not work on loose geometry at this point, only groups and components. And it will only work on one component/group at a time. Hope it helps, let me know (in the other thread preferably) if needs to be tweaked still,
Chris
-
Hi folks.
I would simply draw a line that goes from one end of the object to the opposite end and centered on the two ends. To avoid messing with the model, I would group it if not done already.
Then, after going in X-Ray Mode, I would select both the object and the line and I would grab the selection by the midpoint of the line and move it in order to snap the grabbed midpoint to the origin.
Finally I would delete the added line and deactivate X-Ray mode.
Just ideas.
Advertisement