Linear array + scale array
All  1-7  8-20

Previous
Next
 From:  BurrMan
5595.8 In reply to 5595.5 
Hi Michael,
If I ShiftArray a set, then Ctrl+Z to undo, then repeat ShiftArray with a right click, nothing happens. :o
  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
5595.9 In reply to 5595.8 
Hi Burr,

> If I ShiftArray a set, then Ctrl+Z to undo, then repeat ShiftArray
> with a right click, nothing happens. :o

Yeah the mechanism that it uses for recognizing the array instances is kind of fragile and depends on their order in the geometry database. If you do anything that happens to disturb this object ordering from the initial array creation then it won't work anymore.

So you'll need to create the array fresh again in a case like that.

Otherwise I might need to do something like have you manually pick every array instance separately in order to separately identify them, but that sounds pretty tedious if you have a big array...

- 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
5595.10 In reply to 5595.7 
Hi Pilou,

> And a shift 'Fibonnacci" or logarithm one ?

It's not set up to do that currently, but it should be possible to modify it to do such things.

If you want to tweak it, look inside ShiftArray.js for line number 67 which has the specific code for applying the scale factor to the distance between the base and target points for shifting each item:

code:
		Shift += i;
		Dir.scale( Shift );


If you modify that it will modify the size of the shift of each item.

- 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)
5595.11 In reply to 5595.10 
Perfect!
---
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

Previous
Next
 From:  Samuel Zeller
5595.12 
Would it be possible to further work on this script to have a little input box like the scale array ?
For input the size between items and maybe rotation and offset in 3 directions :D

That kind of script is so useful :)
--
shapenoid.com stojan-voumard.com
  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
5595.13 In reply to 5595.12 
Hi DesuDeus, you can already control the distance - it's defined by the distance between the 2 points that you pick. If you need to enter in a specific distance just type in that distance value and push enter, that will activate "distance constraint" the same as when you're drawing a line.

> For input the size between items and maybe rotation and offset in 3 directions :D

If this kind of stuff is particularly useful, it may be time to learn how to do the scripting yourself - that way you'd be able to cook up whatever specialized tool that you need.

If you want something that does movement, sizing and rotation, the previous Randomize command would might be a good place to start:
http://moi3d.com/forum/index.php?webtag=MOI&msg=5416.5

That one incorporates all of moving, scaling, and rotation within it so it might be a good starting point to modify for whatever specific kind of transform tool that you need.

- 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)
5595.14 
Seems works not with a line like this, but yes if the different Objects + points are regularly spaced!
does this normal?


EDITED: 13 Dec 2012 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
5595.15 In reply to 5595.14 
Hi Pilou,

> Seems works not with a line like this, but yes if the Objects + point are regulary spaced!
> does this normal?

Did you use one of the Transform > Array tools to create that sequence of objects?

The way ScaleArray and ShiftArray are set up, they will only function on the output of one single array command - it looks like you have done things in some combination of steps to create that particular sequence, not just one single array. Either that or you have included multiple point objects with the array instances - there should be only one single point object per array instance for using ScaleArray or ShiftArray.

- 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)
5595.16 In reply to 5595.15 
In fact that work if you draw objects like this :)
Object a, Point a, Object B, Point B, etc...even irregularly spaced !
Then use the Array Dir :)
Then ShiftArray

Very cool! !) So my line above will works too! My error was to draw the points after the objects!!!



EDITED: 13 Dec 2012 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:  Frenchy Pilou (PILOU)
5595.17 
:)

---
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

Previous
Next
 From:  Michael Gibson
5595.18 In reply to 5595.12 
Hi DesuDeus, here I've attached a kind of generalized array plug-in called ScriptArray, hopefully it may be of use for this kind of object generation.

This version does not have any UI with it at all, you change parameters in it by editing the command script itself. This goes into the \commands sub-folder just like other commands, it's just that it won't show any UI in the upper-right area when it is running. Also note that MoI caches the contents of command files in memory the first time that it is run, so if you repeatedly edit the file you will need to either shut down and restart MoI on each run after an edit, or save to a new file like ScriptArray2.js, ScriptArray3.js, etc... In the next v3 beta there is a flag that you can set in moi.ini to turn off script caching though which will help with this kind of thing.

With this version you edit the behavior by editing the code at the top of the script file. This version creates copies more like a regular array command, you do not need to create an array with point objects in it like the previous ScaleArray / ShiftArray commands.

You control the number of copies generated by editing the line at the top that says:

code:
var g_NumCopies = 40;


To control the spacing, scaling, and rotation there are 3 functions at the top of the file - UpdateMoveDeltas(), UpdateScaleFactors(), and UpdateRotateAngles() - these are called for each copy of the array and they are passed a point with .x .y .z values that can be modified, reset, randomized, calculated by some math forumla, ... whatever you want.

Currently as a demo it's set up to make 40 copies, and it gradually increases the movement in x for the first 20 copies, then for the second 20 copies gradually reduces it. It increases scaling in x by 0.1 for each step for the first 20, after which it decreases x scaling and starts to increase y scaling, and it rotates around the z axis by an increasing increment of 10 degrees for each step up to 20 then decreasing it. This generates output like so:




So this should help allow for whatever kind of array behavior that you can dream up, you can gradually increase and/or decrease different values, randomize just certain values, etc... hopefully it should serve as a template for generating all kinds of different array effects.

Hope this helps!

- 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)
5595.19 In reply to 5595.18 
Another cool variation of the ScaleArray !

You must put it also inside a "scripts" folder if this one don't exist ? (that I made before reding your text :)

Just wait a little time after the start of the Script !

EDITED: 13 Dec 2012 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:  Michael Gibson
5595.20 In reply to 5595.19 
Hi Pilou,

> You must put it also inside a "scripts" folder if this one don't exist ?

It should go in the \commands folder.

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-7  8-20