Suggestion : Distribute objects
 1-20  21-40  41-53

Next
 From:  Marc (TELLIER)
8503.1 
Hi,

Maybe this has been suggested before but it would be nice to have a distribute objects command that would divide equal spaces between objects within the limits of the selection.

It could be a sub category of align...




Marc

  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)
8503.2 In reply to 8503.1 
Scale array ? ;)

Video in French! :)
http://piloumaison.weebly.com/le-scale-array.html
  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:  OSTexo
8503.3 
Hello,

+1 for Marcs suggestion. A true distribution feature integrated into the Align tool would be great, handy for exploded diagramming.
  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
8503.4 In reply to 8503.1 
Hi Marc, I could probably write a script for this. If I understand correctly, the first and last one stay where they are and only the interior ones move?

Would there be a drop-down control for whether to do it in the x-axis, y-axis, or z-axis direction?

- 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:  Marc (TELLIER)
8503.5 In reply to 8503.4 
Hi Michael,

Yes, it would behave exactly as you described.
A drop down or radio butons would be nice.

Hi Pilou,

I dont think this command distribute the space in between objects.

Marc
  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)
8503.6 In reply to 8503.5 
There is ScriptArray! ;)
http://moi3d.com/forum/get_attachment.php?webtag=MOI&hash=f9e73123b45bafc8ff16093567a709d9&filename=ScriptArray.js

but you must edit the code for have that you want!



And I am sure that a little "Elephant" node can easily mke that you want!
  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
8503.7 In reply to 8503.5 
Hi Marc, one thing that I'm not sure about is what to do if the objects overlap each other and there isn't room to make any spacing between them.

- 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:  Marc (TELLIER)
8503.8 In reply to 8503.7 
Hi Michael,

That's a good one, maybe distribute the by the object's center in this situation ?
Would it make sense in the command process ?

Marc

EDITED: 5 Jul 2017 by TELLIER

  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:  AlexPolo
8503.9 
here is the Illustrator align and distribute tool set - just as a possible future reference


EDITED: 26 Jan 2020 by ALEXPOLO

  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:  Colin
8503.10 
Hi Michael,

Maybe I'm not fully understanding the original question correctly, but couldn't the "ArrayGem" script work for this?

I previously collected info & made myself notes on this script, they read as such:

>>This is for replicating a gemstone along a set of curves on a surface, aligning the gem to the surface normal. It uses a different spacing method than the other array commands - along with the objects to be arrayed you also specify a base circle and the spacing that you provide becomes the separating distance between each placed circle along the target area. For the targets you pick a surface, and a set of curves that have been projected on to that surface.

So note there that for this command to work properly, there must be a base circle also included among the objects that you want to have copied and the base circle should be selected along with the objects to copy at the same time. The center of the base circle will become the point that is placed on to the surface, and the diameter of the base circle will be taken as the size of the object.

Even though this is oriented towards placing gemstones for jewelry design, it could also be used for replicating quantities of any kind of object oriented normal to a target surface.<<

HTH, Colin
  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
8503.11 In reply to 8503.10 
Hi Colin, well ArrayGem does do this type of spacing, but it makes copies of one single base object, it does not take a set of already existing objects and arrange them which is what Marc is asking for.

@Marc - I'll try either tonight or tomorrow to cook up a script for you.

- 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:  Colin
8503.12 In reply to 8503.11 
Hi Michael,

> it does not take a set of already existing objects and arrange them which is what Marc is asking for.<

Ahh, that's what I misunderstood.
Thanks for the clarification.

regards Colin
  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
8503.13 In reply to 8503.1 
Hi Marc, please give the attached distribute plug-in a try, hopefully it will do what you were asking. Instructions for installing a plug-in here.

It works with an object's bounding box and an axis direction of x,y, or z that you can pick, it will move objects in that direction so they have equal distances between their bounding boxes like this:






The first and last objects stay in place, and if there's not enough room to fit all the objects in the space between the first and last they will have equal overlapping distances instead like this:






Hope that will be useful for now!

- Michael

EDIT: Jun 6, 2022 - updated Distribute script to have an option to set overall width to a specified value.

EDIT: Jul 22, 2022 - updated Distribute script to work with groups.

EDIT: Jul 24, 2022 - updated Distribute script to work in active construction plane.

EDITED: 24 Jul 2022 by MICHAEL GIBSON


  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)
8503.14 
When objects are distributed can we have an option for have regrouped objets with o distance?
Or maybe it's yet integrated ? (but i don't find the trick with "Distribute" :)

EDITED: 8 Jul 2017 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)
8503.15 
Explode Move can make something for re-group but it's by "eyes", or numeric but not by snaping Bounding Box ! :)
And not sure that is easy to choose the good Origine Point with spheric or complex object!



PS Have also a no regular distribution can be also cool! (additive, multiplicative, Fibonacci, etc...)

EDITED: 8 Jul 2017 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:  Marc (TELLIER)
8503.16 In reply to 8503.13 
Hi Michael,

Thanks, it looks great !
I'll try this as soon as I can.

Marc
  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
8503.17 In reply to 8503.14 
Hi Pilou,

> When objects are distributed can we have an option for have regrouped objets with o distance?
> Or maybe it's yet integrated ? (but i don't find the trick with "Distribute" :)

Well, earlier in this thread I had asked:

"If I understand correctly, the first and last one stay where they are and only the interior ones move?"

The one you're showing there has the last one moving, so it doesn't fit with the requirements.

But it is possible to make some modifications to the script so it will behave like you want, try saving Distribute.js and Distribute.htm to new files DistributePilou.js and DistributePilou.htm , then on line 48 there's a section of code that calculates the space, it looks like this:

code:
	var total_space = sorted[sorted.length-1].bounds.min[dir] - sorted[0].bounds.max[dir];
		
	var occupied_space = 0;
	for ( var i = 1; i < sorted.length-1; ++i )
		occupied_space += sorted[i].bounds.max[dir] - sorted[i].bounds.min[dir];
		
	var available_space = total_space - occupied_space;
		
	var target_space_between = available_space / (sorted.length-1);


Comment out that entire section and replace it with just var target_space_between = 0, so it should look like this:

code:
	/*
	var total_space = sorted[sorted.length-1].bounds.min[dir] - sorted[0].bounds.max[dir];
		
	var occupied_space = 0;
	for ( var i = 1; i < sorted.length-1; ++i )
		occupied_space += sorted[i].bounds.max[dir] - sorted[i].bounds.min[dir];
		
	var available_space = total_space - occupied_space;
		
	var target_space_between = available_space / (sorted.length-1);
	*/
	
	var target_space_between = 0;



Then the only other change is a couple lines below that is the loop that moves the objects, it looks like this:

code:
	for ( var i = 1; i < sorted.length-1; ++i )
	{


That loop needs to be adjusted to loop through sorted.length instead of sorted.length-1 , so if you take off the -1 so it looks like this:

code:
	for ( var i = 1; i < sorted.length; ++i )
	{


Then after that you should have a DistributePilou command that works like you wanted.

- 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)
8503.18 In reply to 8503.17 
Excellent! Bravo!
With the native Align functions that will be very helping for grouping objects!

French Version : http://moiscript.weebly.com/distributions.html

I believe that you must integrate this useful thing in the future V4! :)
(in Menu Align & Distribute? )

Function alone

With Align native. What a simplicity!

EDITED: 9 Jul 2017 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:  BurrMan
8503.19 In reply to 8503.18 
If someone could take the pilou version and add ui to allow a value entered for the space, that would make it "distribute" as i know it. That would be cool.
  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:  mkdm
8503.20 In reply to 8503.19 
Hi BurrMan.

This is the updated version I wrote some minutes ago.

Please check if all works fine.

The file to download : http://take.ms/qT3oZ

The UI's screenshot :



The numeric input accept also negative values.

Ciao.

- Marco (mkdm)
  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:  1-20  21-40  41-53