Arrange Shapes does not function at all.

Started by trademark2, January 07, 2020, 07:37:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

trademark2

I have been wondering about this for a while. Arrange shapes just doesn't work AT ALL. If i go into "Spacing options" and change the value and click okay, nothing happens, and when I go back into spacing options the value has been reset. Any help on this topic would be appreciated as this would be a very useful feature if it actually worked.


vojo

doesn't work for me either
2013 on windows 10....none of the auto placement options work for me (I don't usually use this so first time to try).

You could look at
- group the shapes
- on each child, manually place
     child 1 width = guard (parent width *0 + 30mm)  kind of thing
- maybe use custom properties to provide UI for offset

or look at some sort template shape (ruler kind of thing to manual place shapes).


Croc

This option only works for connected shapes.
Select the shapes and use "Connect Shapes" tool. Then you can use "Spacing Options".
After movement, you can remove the connectors. Use Select > Select by Type > Layer > Connector and delete the selection.

Croc

Or you can use my "Visio stencil for data import" - https://gumroad.com/l/XBmS.
In addition to the data visualization functions , it provides the work with an array of shapes.


vojo

so if this only for a plurality of shapes already connected, fair enough

If one is looking at arrange shapes with gaps, then it sounds like some napkin math involved
- have a collection of shapes
- would need to coarsely lay so that the overall collection size = N * (shape height + spacer)
   - last shape would need be around the collection size
- use the distribut commands to "spray" the shapes
- then adjust and distribute again

Seems like an good project for a macro
- select collection
- launch macro
- GUI to define spacing between
     - key placement formula would      next shape placement = previous shape placement + shape size + space
     - lead each shapes pinx and piny with the formula values
- enter

Might be handy...maybe in some of those tools  from some of you guys

trademark2

My God thats the most nonsensical limitation I have ever heard of. Why on earth would they design it so the shapes have to be connected to space them. What kind of idiot designed it that way...

Anyways thanks a lot for the response.

Croc

#7
QuoteWhy on earth would they design it so the shapes have to be connected to space them...
If the shapes are connected, it is easier to calculate their order.
In general, shapes can be very chaotic. They can overlap and have a different geometry. In this case, it is impossible to unambiguously calculate the number of rows and columns in order to arrange the placement.
Try to come up with a good algorithm for this placement.

vojo

not to completely undercut the argument of "shapes are crazy...hard to automate arrangement"

The distribute functions work well for a collection of N copies of a given shape.
To the point that if you line up first shape and last shape on a isometric grid, distribute horizonal and distribute verticial
gives a nice isometric distribution

Perhaps one could build a macro on these functions

I would agree most of the usage for this is a plurality of the same shape....not a menagerie of different sized shapes
I would agree that some sort of universal macro taking any sort of shape would be far too complex.
(many shapes are not contained in their width/height, odd geometries would be tough, etc).

on the another note, one could make a shape that essentially a ruler with notches (shape property defines markings)
Drop the "ruler", place various shapes using it, delete ruler.
(this would be easier that scrolling to get shapes "near" the drawing rulers...especially if trying to do an X/Y distribution)

Something like this

vojo

use shape data to control the grid

If you want more cells in the grid, can use multiple grids or can change the grid shape use more shape data to add more cells
(still no VBA, but the grid shape will get more complicated)

Basically, this grid is just an example...but can have more intelligence if you want

trademark2

#10
To answer the algorithm question,

the midpoint of each shape from the perspective of the x plane is it's x coordinate, regardless of its shape.
the midpoint of each shape from the perspective of the Y plane is its y coordinate, regardless of its shape.

the shapes should be numbered (Xnumber) by the midpoint x coordinate (Xmid) from 1 to N where N is the number of shapes.
the shapes should be numbered (Ynumber) by the midpoint y coordinate (Ymid) from 1 to N where N is the number of shapes.

The number of rows is selected in this operation by the user.

The shapes should be set horizontally with the new X midpoint value of the shapes spaced as specified by the user, overlapping as required. The shapes with the lowest Ynumbers (uppermost shapes) are on the first row. The shapes with the next lowest Ynumbers are on the second row. 

The shapes should be set vertically with the new Y midpoint value of the shapes spaced as specified by the user, overlapping as required, within the number of rows specified by the user.


This works in the menagerie example, or any example.

vojo

While your idea is sound, it only covers he vanilla case where each and all shapes are the same size.
This would not account for several cases
- a shape not centered in the guides
- a shape that uses controls so that the actual geometry is outside (even if uniform) outside the guides
- shapes of various sizes  (your approach would need to factor 1/2 the width and or 1/2 height into algorithm)
- irregular shapes - even if all in the guides - would not have desired appearance  (no square southeast of a dogleg)
- etc.

if all shapes are same dimensions, then the distribute "button" - it works -  would accomplish your algorithm

keep playing with your algorithm...good luck

trademark2

#12
Quote from: vojo on January 23, 2020, 03:42:05 AM
While your idea is sound, it only covers he vanilla case where each and all shapes are the same size.
This would not account for several cases
- a shape not centered in the guides
- a shape that uses controls so that the actual geometry is outside (even if uniform) outside the guides
- shapes of various sizes  (your approach would need to factor 1/2 the width and or 1/2 height into algorithm)
- irregular shapes - even if all in the guides - would not have desired appearance  (no square southeast of a dogleg)
- etc.

if all shapes are same dimensions, then the distribute "button" - it works -  would accomplish your algorithm

keep playing with your algorithm...good luck


Don't mean to be rude, but what are you talking about? None of those scenarios throw the algorithm off in the slightest... Two lists of midpoints taken separately from the perspective of the X and Y coordinates do not care about what size the shapes are, or if the shapes are irregular, let alone if they are in 'guides'. Read it again and think about it.

and it is not hard to come up with that algorithm, it just basically makes a 2 dimensional array of the shapes based on their midpoints and then sorts them first by Y coordinate, and then by X coordinate, (and next would be by which layer is in front, but i did not get too detailed), from highest to lowest into columns spaced as desired from the user. It is pretty common-sense and Microsoft should have done this already.

I didn't take the time to write it in completely formal language but it should be clear enough to understand.

Admittedly it is probably irrelevant unless microsoft employees happen to be browsing this forum.

vojo

Prove me wrong...try your algorithm on these