Copy link to clipboard
Copied
Hello Forums!
My name is Jace and I am a staff member for my high school's yearbook. Its my 2nd year and I am quite experienced with InDesign CS6, yet there are still some things I have yet to figure out. This year's theme includes many hexagons and honey comb patterns, and while I know you can create a tile pattern with the same alignment distance, there is no way (to my knowledge) on how to align individual edges. Ill attach a photo to explain it. You can free hand it, which I feel i will probably have to do, but our required spacing is 0p6. Is there a tool in the program that allows it or does anyone else know of an easier way rather than free handing it and hoping for the best?
(YES THE LAYOUT MAY NOT BE PERFECT, IT'S A WORK IN PROGRESS HAHA XD)
Thanks XD
Copy link to clipboard
Copied
Hi Jace,
yes, that's doable. But would require perhaps two or three steps.
The trick is using InDesign's Smart Guides feature.
Smart Guides are working best in 90° situations, so to say.
And to get to a 90° configuration when using two hexagons you have to align the two segments you want to align to 90° or 180° respectively.
Some screenshots are showing this:
That's all…
Regards,
Uwe
Copy link to clipboard
Copied
1. Go to Illustrator
2. Use the Polygon tool to draw a 6-sided polygon. Be sure to hold the shift key while dragging out a hexagon.
3. Drag and drop the hexagon into the Swatches panel
4. Double-click the new fill swatch; the Pattern Options editor panel opens up
5. Set the Tile Type to "Hex by Column"; click Done
6. Apply fill pattern to a larger rectangle; then object > expand it to separate shapes
7. Copy and paste into InDesign as frame shapes
8. Reward yourself with food and drink
Copy link to clipboard
Copied
Hi,
It's just a simple problem of geometry!
So …
We want to align the hexagons by reference to the "Red" one! …
So "Blue" hexagon to be selected and 1 click!
var gB1 = app.selection[0].geometricBounds;
var gB2 = app.selection[1].geometricBounds;
var center1_H = gB1[1] + ((gB1[3] - gB1[1])/2);
var center1_V = gB1[0] + ((gB1[2] - gB1[0])/2);
app.selection[1].move([center1_H - ((gB2[3] - gB2[1])/2), center1_V - ((gB2[2] - gB2[0])/2)]);
var NewgB2 = app.selection[1].geometricBounds;
var W1 = gB1[3] - gB1[1];
var H1 = gB1[2] - gB1[0];
var W2 = NewgB2[3] - NewgB2[1];
var H2 = NewgB2[2] - NewgB2[0];
var MoveX = NewgB2[1] - ((H1 + H2) * 0.866 / 2);
var MoveY = NewgB2[0] - ((W1 + W2) * 0.866 / 4);
app.selection[1].move([MoveX, MoveY]);
"Green" one now!
var gB1 = app.selection[0].geometricBounds;
var gB2 = app.selection[1].geometricBounds;
var center1_H = gB1[1] + ((gB1[3] - gB1[1])/2);
var center1_V = gB1[0] + ((gB1[2] - gB1[0])/2);
app.selection[1].move([center1_H - ((gB2[3] - gB2[1])/2), center1_V - ((gB2[2] - gB2[0])/2)]);
var NewgB2 = app.selection[1].geometricBounds;
var W1 = gB1[3] - gB1[1];
var H1 = gB1[2] - gB1[0];
var W2 = NewgB2[3] - NewgB2[1];
var H2 = NewgB2[2] - NewgB2[0];
var MoveX = NewgB2[1] + ((H1 + H2) * 0.866 / 2);
var MoveY = NewgB2[0] - ((W1 + W2) * 0.866 / 4);
app.selection[1].move([MoveX, MoveY]);
"Yellow" and "Grey" ones ! …
var gB1 = app.selection[0].geometricBounds;
var gB2 = app.selection[1].geometricBounds;
var center1_H = gB1[1] + ((gB1[3] - gB1[1])/2);
var center1_V = gB1[0] + ((gB1[2] - gB1[0])/2);
app.selection[1].move([center1_H - ((gB2[3] - gB2[1])/2), center1_V - ((gB2[2] - gB2[0])/2)]);
var NewgB2 = app.selection[1].geometricBounds;
var W1 = gB1[3] - gB1[1];
var H1 = gB1[2] - gB1[0];
var W2 = NewgB2[3] - NewgB2[1];
var H2 = NewgB2[2] - NewgB2[0];
var MoveX = NewgB2[1] - ((H1 + H2) * 0.866 / 2);
var MoveY = NewgB2[0] + ((W1 + W2) * 0.866 / 4);
app.selection[1].move([MoveX, MoveY]);
var gB1 = app.selection[0].geometricBounds;
var gB2 = app.selection[1].geometricBounds;
var center1_H = gB1[1] + ((gB1[3] - gB1[1])/2);
var center1_V = gB1[0] + ((gB1[2] - gB1[0])/2);
app.selection[1].move([center1_H - ((gB2[3] - gB2[1])/2), center1_V - ((gB2[2] - gB2[0])/2)]);
var NewgB2 = app.selection[1].geometricBounds;
var W1 = gB1[3] - gB1[1];
var H1 = gB1[2] - gB1[0];
var W2 = NewgB2[3] - NewgB2[1];
var H2 = NewgB2[2] - NewgB2[0];
var MoveX = NewgB2[1] + ((H1 + H2) * 0.866 / 2);
var MoveY = NewgB2[0] + ((W1 + W2) * 0.866 / 4);
app.selection[1].move([MoveX, MoveY]);
Just for fun!
[ code quickly written, Thanks for comments! ]
(^/)
Copy link to clipboard
Copied
… Of course, everybody understood that "0.866" is the square root of 3!
(^/)
Copy link to clipboard
Copied
… square root of 3 divided by 2!
Am I the only one to know how to count here!?
(^/)
Copy link to clipboard
Copied
Hm. Or did you rather mean the square root of 3/4 and you dropped the /4 from the 3 ?
Math.sqrt(3/4)
// Result: 0.86602540378444
Cheers,
Uwe
Copy link to clipboard
Copied
Pythagore of course!
(^/)
Copy link to clipboard
Copied
How do I even put that code into it? is the code just showing the order of what is happening or is that a way of making indesign do it? sorry im a noob at coding right now but im finding the "rotating" them easier as of now, or just freehanding it with the arrow keys
Copy link to clipboard
Copied
Coding is very honorable -- wish I could learn to code.
Rotating works fine, too, IMO.
Use what works for you 😉
Copy link to clipboard
Copied
Hi,
Learn how to get written code given on Adobe forums and import them as .jsx into InDesign.
About what the code I've written, imagine: with the mouse, sweep the page selecting first the "red" hexagon then the "blue" one? As you have associated keyboard shortcuts to the four scripts [e.g., on Mac, Cmd-[num]7, Cmd-[num]9, Cmd-[num]1 and Cmd-[num]3], just play the game with 1 click at each time! Cool!
Copy link to clipboard
Copied
Did you solve the problem already?
Does not seem such a great difficulty.