Center model on world axis zero coordinates?

Next
 From:  Martin (MARTIN3D)
5427.1 
Is there a way (script?) to center a model automatically on the world axis zero coordinates so that OBJ files will import centered?
I found that using CPlane has no influence on the OBJ export only manually moving the model to the zero coordinates worked.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5427.2 In reply to 5427.1 
Hi Martin, that's correct setting a cplane does not have any effect on polygon mesh output.

To output your objects so that they are centered around the world 0,0,0 origin point you would need to locate them there before the export, you could use the Transform > Move or Transform > Align commands to do that.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5427.3 In reply to 5427.1 
Also I'm planning on adding a mechanism to the Move command to make it easier to set the base point of the move to the center of the object's bounding box.

For now it can be easier to use the Transform > Align command instead since it can use the bounding center within it - it does a 2D type of align using one viewport so you need to do 2 aligns in 2 different viewports and that should then do what you're looking for.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5427.4 In reply to 5427.3 
>Also I'm planning on adding a mechanism to the Move command to make it easier to set the base point of the move to the center of the object's bounding box.

Thanks a lot for the quick reply. Finding the center is exactly my problem so adding such a mechanism to the Move command is quite welcome. Until then the Align method will do.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5427.5 In reply to 5427.4 
I think it will be an additional button that will be available in the Move command at the "Pick base point" prompt, the button will say something like "From center" or "From bounding center" or something like that, and when you push it the center of the bounding box around the objects being moved will be used as the base point and then you'll go to the next stage and pick the target point and you would be able to type 0 and push enter there for specifying 0,0,0 as the target.

There is also a command that you can set on a shortcut key that will generate a point object at the bounding box center location, it might be useful to you:
http://moi3d.com/2.0/docs/moi_command_reference10.htm#boundingboxcenter

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
5427.6 In reply to 5427.5 
For setting up stuff for a cnc work offset, I have been using the BoundingBox command which gives me a block to move into place, whether center or various corners to origin.

The new move sounds sweet. Maybe consider some type of option to select the various points of the bounds for the manufacturers side:



Although this could gum up the "sleek and uncomplicated part". It may have to be something for the catchall properties panel. But just wanted to mention this for consideration.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5427.7 In reply to 5427.6 
Thanks BurrMan, I didn't know that those BoundingBox commads exist. Very handy.

I tried to make a shortcut:

Shift+C=script:BoundingBox; BoundingBoxCenter;

but get an error



  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  coi (MARCO)
5427.8 In reply to 5427.7 
oi martin!

as they are commands, you just have to put

Shift+C=BoundingBox or
Shift+C=BoundingBoxCenter

in.

- marco
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5427.9 In reply to 5427.8 
Thanks Marco, I thought it is possible to run two comands at once. My bad.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Martin (MARTIN3D)
5427.10 In reply to 5427.5 
>The button will say something like "From center" or "From bounding center" or something like that

Michael, may I suggest "Pick center of bounding box" or "Pick bounding box center".
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5427.11 In reply to 5427.10 
Hi Martin,

> Michael, may I suggest "Pick center of bounding box" or "Pick bounding box center".

The tricky part about button text (text going inside an actual push button) is that when it's pretty long it can easily wrap to multiple lines in that narrow side pane area...

I don't worry about that so much with prompt text (the description at the top of the command area that tells you what MoI is expecting for you to enter next), but for push button text it's kind of good to try and make it shorter.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Schbeurd
5427.12 
Am I wrong or is this what you're looking for ? Center at Origin
http://moi3d.com/forum/messages.php?webtag=MOI&msg=2409.2

And by the way, Michael, is it possible to modify the script to have a "Put on Ground" option ? So that the bottom of the bounding box is automatically placed on the CPlane. (There's a similar tool in Wings3D)

EDITED: 27 Sep 2012 by SCHBEURD

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5427.13 In reply to 5427.12 
Hi Bernard, I forgot about that previous script, I think that should be a useful shortcut for what Martin is talking about.


> And by the way, Michael, is it possible to modify the script to have a "Put on Ground" option ?

It's not easy to add an option to that previous one since it has no UI, it just immediately does an action and then exits.

But I've attached a separate "PutOnGround" command here which you can use instead.

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Schbeurd
5427.14 In reply to 5427.13 
Hi Michael,

PutOnGround works really well !
Thanks a lot. I will use this one very often !

Happy MoI user since beta version of August 13 2006...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5427.15 
PutOnground : cool

But no possibility to stop the drop if there is an objet on the path ? (like collision)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5427.16 In reply to 5427.15 
Hi Pilou,

> But no possibility to stop the drop if there is an objet on the path ? (like collision)

Nope, this is just a simple positioning script, something that would do comprehensive collision detection would be a much more involved project.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Frenchy Pilou (PILOU)
5427.17 In reply to 5427.16 
No problem :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All