After a Slice

Next
 From:  Frenchy Pilou (PILOU)
4339.1 
Said I have an object sliced on View Top by any method and "exploded move" by type "explodemove"

Does it possible to Rotate each part by 90° from their own Edit Frame on view Top in one time? (Script? )
  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
4339.2 In reply to 4339.1 
Hi Pilou - it should be possible to do that by a script. Try the attached custom command.

To install it, copy the RotateObjects.js file into the \commands sub-folder underneath MoI's main installation folder. That will make a new command named RotateObjects available to run either by setting up a shortcut key or by pushing Tab and typing in the command name.

Select the objects you want to rotate before running the command, then when you run the command each object will rotate by 90 degrees around its own centroid point.

Hope that does what you needed!

- 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:  Frenchy Pilou (PILOU)
4339.3 In reply to 4339.2 
you rocks!! Excellent!

Does it possible for the perfection to enter another angle at the start? (negative or not?)


Here I Right click twice for the line bottom after the start result


PS does the "Centroid" of the object is the "centroid" of the Edit Frame?

EDITED: 19 Jun 2011 by PILOU

  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
4339.4 In reply to 4339.3 
Hi Pilou,

> Does it possible for the perfection to enter another angle
> at the start? (negative or not?)

You can make it use a different angle by editing the script in a text editor - at line 30 of the file you'll see this code:

// Angle to rotate by.
factory.setInput( 2, 90.0 );

The value 90.0 there is the rotation angle value that will be used. So if it's not going in the direction that you want you can change that to -90.0 instead (you'll need to restart MoI if you've run the command once in the current session).


> PS does the "Centroid" of the object is the "centroid" of the Edit Frame?

Yup, it should be the same I think.

- 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:  Frenchy Pilou (PILOU)
4339.5 In reply to 4339.4 
So all is perfect!
Bravo !

If I put 15 °, except the fact that i must click 6 times for have 90° :)
does this increase anormally the memory size used if i have a lot of objects
or it's peanuts for the history of the undo redo with this command?
  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
4339.6 In reply to 4339.5 
Pilou, you could also create 4 or so js files with different sized values, and just add the value to the end of the filename... So a 90, a 45, a 30 and a 10 or something...

I was also trying to figure out how to create an htm file for the command to draw the value from an angle field... I was trying to refer to another command to see how it was done, like in the rotate command, but it's a more complex command and I cant decypher it at the moment.. Trying to find "which of the current MoI commands is the simplist" with regard to a js file retreiving an input value from the UI?
  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)
4339.7 In reply to 4339.6 
Cool trick ;)

About the memory size of this sort of command if I play with it at different times with numerous objects
that not produce an huge memory used for the undo redo?
  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
4339.8 In reply to 4339.7 
Hi Pilou, well each time you run the command it will make a record of the previous objects in the undo stack.

However, those records are internally compressed (like zipped) to reduce their memory consumption, and also once you exceed a certain amount of memory used by the undo stack (set in moi.ini in the [Undo] section with the MaxMemorySizeMB= setting, default is 20 MB) the older undo records will automatically be purged to free up memory.

It will keep a minimum number of undo steps though before purging any of them, the default is a minimum of 10 steps.

So it's not likely to create a problem for you unless you have such a highly detailed model that it fills up a huge amount of memory just with the minimum 10 undo steps.

- 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
4339.9 In reply to 4339.6 
Hi Burr & Pilou - here is a version that puts up some UI along with it where you can enter in the rotation value.

Copy both attached files to the \commands folder, the .js file is updated from the one in the previous post also.

- 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
4339.10 In reply to 4339.9 
Thank you Michael,
I appreciate it.
  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)
4339.11 In reply to 4339.9 
Perfect! Works like a charme!
We must now just right click twice ;) but enter angle is possible!
That is a very tiny thing compare to the possibility! ;)
Bravo again for the reactivity!

EDITED: 19 Jun 2011 by PILOU

  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)
4339.12 
a little tut video ;) (Sweep 2Rails, Explode Move, RotateObjects )
http://moiscript.weebly.com/pivoter-des-objets.html sorry always in French but visual :)

EDITED: 20 Jun 2011 by PILOU

  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