• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to align hexagons to each other with the diagonal edge?

New Here ,
Dec 14, 2016 Dec 14, 2016

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 XDScreenshot (1).png

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 14, 2016 Dec 14, 2016

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:

Task-AlignTwoSegments.png

Step-1-RotateByMinus60Degrees.png

Step-2-MoveTheObjects-CheckTheSmartGuides.png

Step-3-RotateBackBy60Degrees.png

That's all…

Regards,
Uwe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 14, 2016 Dec 14, 2016

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

Mike Witherell

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

Hi,

It's just a simple problem of geometry! 

So …

Capture d’écran 2016-12-15 à 13.30.23.png

We want to align the hexagons by reference to the "Red" one! …

So "Blue" hexagon to be selected and 1 click! 

Capture d’écran 2016-12-15 à 13.30.38.png

Capture d’écran 2016-12-15 à 13.30.52.png

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! 

Capture d’écran 2016-12-15 à 13.31.20.png

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

Capture d’écran 2016-12-15 à 13.31.53.png

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]);       

Capture d’écran 2016-12-15 à 13.32.30.png

Just for fun! 

[ code quickly written, Thanks for comments! ]

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

… Of course, everybody understood that "0.866" is the square root of 3! 

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

… square root of 3 divided by 2!

Am I the only one to know how to count here!? 

(^/)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 15, 2016 Dec 15, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

Pythagore of course! 

Capture d’écran 2016-12-15 à 19.57.15.png

(^/) 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 16, 2016 Dec 16, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 16, 2016 Dec 16, 2016

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 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 16, 2016 Dec 16, 2016

Copy link to clipboard

Copied

LATEST

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! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 15, 2016 Dec 15, 2016

Copy link to clipboard

Copied

Did you solve the problem already?

Does not seem such a great difficulty.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines