-
1. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 3, 2012 3:07 PM (in response to Gareth_Williams)Gareth,
You may (Smart Guides are your friends):
1) Create a straight path, with a Stroke Weight equalling the width of the bar, close to being from corner to corner, then with the Direct Selection Tool drag the endpoints to coincide with the corner Anchor Points,
2) Object>Path>Outline Stroke,
3) Create a copy of the background rectangle (Ctrl/Cmd+F),
4) Select 2) and 3) and Pathfinder>Intersect shape areas (or whatever it is called in your version to result in the overlap between the shapes, you may need to press Alt/Option to make a simple path).
To create the crossing bar you may:
5) Select 4) and Object>Transform>Reflect a copy (vertically or horizontally).
-
2. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 3, 2012 3:11 PM (in response to Jacob Bugge)Thanks Jacob, that is fantastic! My life has just been made so much easier!
Gareth
-
3. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 4, 2012 3:09 AM (in response to Gareth_Williams)You are welcome, Gareth.
Just an afterthought: if you ever need to add a stroke to the flag, you may copy the background rectangle and change from fill to stroke, then move it to the top/bottom of the stacking order, depending on whether you wish to have the full stroke visible on top of the rest (covering the outermost part of the fills) or the outer half of the stroke visible (outside the fills).
-
4. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 4, 2012 9:48 AM (in response to Jacob Bugge)Hi, I do have a stroke around the whole flag like you suggested, it's a rectangle with no fill and a black stroke (0.25 pt) which is at the top in the stacking order, which looks quite good, It's definitely necessary to have a stroke because if any of the edge of the flag is white you wouldn't be able to see the edge!
thanks for your help again
-
5. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 4, 2012 11:15 AM (in response to Jacob Bugge)Hi again Jacob, Whoa! … I have just tried doing what you said and found a problem with your solution “Create a straight path, with a Stroke Weight equalling the width of the bar” The stroke value is in points and my dimensions are in millimetres, am I required to change the stroke value back and forth while working on the design? that would be a bit annoying.
I have at the moment got as far as a straignt line from corner to corner which has no width value [width value should be 18 mm]
thanks for your help
Gareth
-
6. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 4, 2012 11:43 AM (in response to Gareth_Williams)Gareth,
In the Stroke Weight box, you may enter the unit, if you need 18 mm, just insert 18 mm.
It will change to the corresponding value in points (51.024).
-
7. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 4, 2012 12:55 PM (in response to Jacob Bugge)Hi thanks, I have made the width 18 mm Ok, and done [Object > Path > Outline Stroke] There are two things I would say. First, the bar (from the guidline in the middle) appears to be no longer centrerd propery on the corner points of the rectangle (but that may just be the way Illy presents it visually, as there are no longer points where the original line was on the centre line of the bar)
Second, when I select the bar and the rectangle behind it, it does not let me pathfinder it with Intersect for some reason [it just says, “Filter produced no results, please select two overlapping paths”], however, it does let me pathfinder it with exclude just leaving me with all the rubbish I didn't want! See below.
-
8. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 4, 2012 2:28 PM (in response to Gareth_Williams)Gareth,
Here is an amended version which deals with the occasional issue of lacking coincidence/overlap in 2B) and a way to make sure the bar is centred over the corners in in 2A), the latter to be undone again:
You may (Smart Guides are your friends):
1) Create a straight path, with a Stroke Weight equalling the width of the bar, close to being from corner to corner, then with the Direct Selection Tool drag the endpoints to coincide with the corner Anchor Points,
2) Object>Path>Outline Stroke,
2A) If desired, to make sure the centring is right on the corners, Object>Path>Add Anchor Points to get Anchor Points at the centre of the end segments, then use Ctrl/Cmd+Z to Undo to get rid of unecessary Anchor Points,
2B) In the Transform palette/panel, increase the value of W (or H, you may insert *1.01 (or *1.1) to the value to increase it by 1% (or 10%)) and use Ctrl/Cmd+Enter to increase the length past the corners of the background rectangle (it is important to have the Centre Reference Point ticked),
3) Create a copy of the background rectangle (Ctrl/Cmd+F),
4) Select 2) and 3) and Pathfinder>Intersect shape areas (or whatever it is called in your version to result in the overlap between the shapes, you may need to press Alt/Option to make a simple path).
To create the crossing bar you may:
5) Select 4) and Object>Transform>Reflect a copy (vertically or horizontally).
I apologize for forgetting the coincidence/overlap issue. It only occurs when some inaccuracy sneaks in, but it is rather annoying when it does. I went through the steps before posting the original suggestion without encountering it.
-
9. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 4, 2012 2:52 PM (in response to Jacob Bugge)Hi Jacob, thanks, I will have a go at that tomorrow, it's getting late now here in the UK. I will let you know how I get on.
thanks again for your help
Gareth
-
10. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 4, 2012 3:16 PM (in response to Gareth_Williams)You are welcome, Gareth. It is getting late indeed, for us over here.
I forgot to mention that Smart Guides say anchor when you are within snapping distance of the corners.
-
11. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 5, 2012 10:39 AM (in response to Jacob Bugge)Hi again, I have done [Object > Path > Add Anchors Points] and got the anchor points successfully. (it now displays a point at each end of the line in the centre of the shape) When I zoom in on it, I can quite clearly see that the end points of the centre line is not on the points of the corner of the rectangle, but there is not much I can do about it as it does not allow you to select the point and move it with the white arrow tool as usual.
With the white arrow tool you can only move the whole thing, I need to move the points of the line in the centre of the shape to put it back on the corners of the flag.
Sorry if I am doing something wrong,
thanks for help Gareth
-
12. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 5, 2012 11:01 AM (in response to Gareth_Williams)Gareth,
When the object is selected, you need to deselect it to move an individual Anchor Point (or the Direct Selection Tool will keep moving it as a whole); you can do it by clicking an empty spot.
-
13. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 5, 2012 11:54 AM (in response to Jacob Bugge)Thanks, I have moved the shape's centre points to the corners of the rectangle successfully, (the line it's self has not moved). I don't know what will happen when I remove the anchor points hopefully the line in the centre of the bar will adjust accordingly centring the shape on the corner points. I will let you know what happen's in a minute.
-
14. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 5, 2012 12:06 PM (in response to Jacob Bugge)Removing the anchor points made the shape disappear! and, what it has done is not moved the whole bar to centre on that line it has just merely moved the centre points of the surrounding shape, so it is no longer a right angled shape nor is it actually centred on the diagonal between the two corners. (hope you can see the pic when it is scaled down)
-
15. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 5, 2012 12:29 PM (in response to Gareth_Williams)Gareth,
I believe it is better to return to a slightly simpler instruction (and I just realized that the order was a bit wrong so the width of the bar would become too large):
1) Create a straight path, with a Stroke Weight equalling the width of the bar, close to being from corner to corner, then with the Direct Selection Tool drag the endpoints to coincide with the corner Anchor Points; the line will be coincide with the centreline of the bar when outlined;
2) In the Transform palette/panel, increase the value of W (or H, you may insert *1.01 (or *1.1) to the value to increase it by 1% (or 10%)) and use Ctrl/Cmd+Enter to increase the length past the corners of the background rectangle (it is important to have the Centre Reference Point ticked); this will extend the line past the corners of the background rectangle, but the line will still go through the corners;
3) Object>Path>Outline Stroke,
4) Create a copy of the background rectangle (Ctrl/Cmd+F),
5) Select 3) and 4) and Pathfinder>Intersect shape areas (or whatever it is called in your version to result in the overlap between the shapes, you may need to press Alt/Option to make a simple path).
To create the crossing bar:
6) Select 5) and Object>Transform>Reflect a copy (vertically or horizontally).
I hope this works.
-
16. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 5, 2012 1:16 PM (in response to Jacob Bugge)Hi, thanks for help again, that sounds like a much better order of doing it. If I make the stroke the right thickness (18 mm) and then place the points on the corners, it might stay in place when I Object >Path >Outline Stroke it. I don't yet see the point in extending the diagonal line past the rectangle (if it is to make illy recognise it has overlapping for the Pathfinder crop, I think I can get it to do that another way. I would just rather keep the points on the points). If I can get the bar to be 18mm think with the points still on the corner points of the rectangle I think I can do it.
I am going to try this on Friday morning when I have a day of work (it's Wednesday night here now) I will have a good go at your instructions and some other ways and get back to you. I am going to drink some beer and listen to some music (Children of Bodom) now, and then get some sleep!
thanks again for all your assistance and patience Jacob
Gareth
-
17. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 5, 2012 2:40 PM (in response to Gareth_Williams)You are welcome, Gareth, and enjoy (is it a bottle a broon?).
As I said, the issue with the Pathfinder only occurs when there is an inaccuracy; normally you should be fine without extending the line.
-
18. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 5, 2012 4:49 PM (in response to Jacob Bugge)It took me ages to get your question “is it a bottle a broon?” is it a bottle of Newcastle Brown Ale, (pronounced by northerners as “a bottle a broon”) in England that's very northern, I'm from the south, (Andover, Hampshire) but obviously it's a mockery of a northern accent, I got it in the end. Actually (for me) it's four cans of Carling. I know all the brands are different in the USA so you have probably never heard of Carling!
BTW if you don't know your UK geography, Newcastle is in Northern England not Scotland but both people from Northern England and Scotland would literally say “a bottle of broon” they do all sound impossible to understand!
-
19. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 6, 2012 4:56 AM (in response to Gareth_Williams)Gareth,
Newcastle is in Northern England not Scotland
Indeed, a bit north of Aidensfield.
For a broon, you may try a gentle, steady pour down the side of the tilted glass to avoid the head and keep the hop oils in the ale.
-
20. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 3:06 AM (in response to Jacob Bugge)Hi Jacob, Yep, that has worked, 100%. It looked right to the eye and to check it, I did [object » path » add anchor points] and clicked on the central point and it was right on the corner of the flag, so all is good. I am sure I will be able to crop it somehow with the pathfinder now it is properly aligned on the points.
Is there any way of making it a normal shape? i.e. without the line through it where the centre of the stroke was (when you select it with the black arrow tool). So it just becomes like any other rectangular shape? I might not apply this change, it depends what happens when I crop it, or try to crop it!
thanks for your help
Gareth
-
21. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 3:22 AM (in response to Gareth_Williams)Gareth,
It seems that you have the original line lingering somehow. You may see that in the Layers palette/panel. If/when it happens, you will have to delete it.
Edit: Away for an hour or so. Back long before sunset.
-
22. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 3:56 AM (in response to Jacob Bugge)It still won't let me crop it. So I have made a rectangle corresponding to the edges of the flag and tried to crop it that way, but it still won't let me do it.
It allows me to combine the shapes (picture below) deduct the bar from the rectangle (post 2) though I don't know why there is an extra point in the punched out bit at the bottom. That shouldn't be there! and it allows me to exclude overlapping areas (post 3)
It just has a major problem with cropping the bloody bar!
-
23. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 3:58 AM (in response to Jacob Bugge) -
24. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 3:59 AM (in response to Jacob Bugge) -
25. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Monika Gause Sep 7, 2012 5:31 AM (in response to Gareth_Williams)Result of applying pathfinder operation depends upon the stacking order of objects. So maybe you'd want to dive into the manual and read a little about how this all works.
http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-6462a .html
-
26. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 5:50 AM (in response to Gareth_Williams)Gareth,
Sorry, it proved to be an hour or two rather than so.
Sometimes the inherent inaccuracy (of drawing in mm when the fundamental unit is points) disturbs the use of the Pathfinders, especially when the coincidence/overlap occurs between an Anchor Point (such as the corner of the background rectangle) and a segment (such as the end segment of the bar); is often seen in connexion with circles and radial lines, so the latter need to be extended.
That is the reason for step 2) in post #15, which is only required in such cases.
It may be that yours is one of them.
What happens if you use the extension in step 2)?
By the way I have noted that you use Crop instead of Intersect shape areas. What happens if you use Intersect (depending on version you may need to hold Alt/Option to get just the bar as a simple path)?
-
27. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 6:02 AM (in response to Jacob Bugge)No, I don't use Crop, I have only used the top four buttons on the pathfinder pallet, unite, minus front, intersect and exclude. I can (I think but I haven't tried it yet) achieve what I want to by instead of cropping it with the pathfinder, drawing the shape I want to get over it with the pen tool with smart guides on so that it snaps the pints to the points where the shapes' lines overlap. I think that will work to achieve the exact same result.
Monika, I did it all in both orders, (with the bar above and below the rectangle). The three results I got where the only things it allowed. All other combinations produced the error message mentioned above.
-
28. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 6:12 AM (in response to Gareth_Williams)Gareth,
What about the inclusion of step 2), then?
-
29. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 6:43 AM (in response to Jacob Bugge)Ok I will do that now, and let you know what happens.
-
30. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 7:30 AM (in response to Jacob Bugge)It still doesn't work if you extend the shape beyond the corner points. One thing that might make a difference is if we made the diagonal bar a normal shape. What do I have to delete in the layers panel to make it normal and have the properties of any other rectangle made in the usual way?
-
31. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 8:06 AM (in response to Gareth_Williams)Gareth,
One thing that might make a difference is if we made the diagonal bar a normal shape
It should be.
If you select the diagonal bar, right after Object>Path>Outline Stroke, what does the Layer palette/panel say?
And if you open the Window>Document Info and select Objects in the flyout, what does it say (hopefully just Path: 1 (4 points))?
Edit: Soon away for a while again, maybe until sunset.
-
32. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 8:12 AM (in response to Jacob Bugge)In the Layer panel for diagonal bar it says, <group> and there is a black circle, for the rectangle it says <path> and there is a white circle
[window » document info » object] for the diagonal bar says - paths 2 (one open, one closed, six points … loads of other stuff I tried to paste it for you but I couldn't.
It might be quicker if you tried doing it yourself on an illustrator file. My rectangle is on A4 portrait, is 150 wide, 90 high and centred on 105 horizontally and 117 vertically, that makes the edge of it 30 mm (x) and the hight of it 72 mm (y). Have a go at a diagonal bar of any width and see if you can do it.
-
33. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 12:02 PM (in response to Gareth_Williams)Gareth,
Back from the field, sun below the hills.
What I did was (actual clicks and keystrokes):
0) Create the 150 by 90 mm nostroke background rectangle with a 100% C Fill, placed with X = 105 mm, Y = 117 mm as centre, lower left corner at X=30, Y=72, and upper right corner at X=180,Y=162;
1A) Create a nofill straight path with a white 1pt Stroke and drag the endpoints to coincide with the lower left/upper right corners (Smart Guides say anchor), Anchor Points having the same X,Y values as the corners of 0);
1B) Increase the Stroke Weight to 18mm, the path covers the corners of 0);
2) Nothing/Skip the extension of length;
3) Alt/Option+O+P+U (Object>Path>Outline>Stroke) to create the bar rectangle;
4) Select the background rectangle 0) and Ctrl/Cmd+C+F to copy it above the original;
5) ShiftClick the outlined white rectangle 3) to have both selected and Pathfinder>Intersect while holding Alt/Option, resulting in the first bar being a simple path;
6) Alt/Option+O++E (Object>Transform>Reflect) a copy vertically, to make the full cross;
7) Select the background rectangle 0) and Ctrl/Cmd+C+F+X+F to copy it above everything else and change it to nofill 0.25 pt 100%K Stroke.
The outcome looks more or less like a rather whitened Bratach na h-Alba (Saltire).
So it works here, with the same sizes and positions.
-
34. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 2:48 PM (in response to Gareth_Williams)Gareth,
Changing the background to 100%C and 44%M gets it rather close.
And selecting both bars, then Pathfinder>Merge in step 6) would make it even neater with the whole cross as one simple path with 16 Anchor Points.
I really hope you can make it work: I should hate to suggest cruder solutions.
-
35. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 2:52 PM (in response to Jacob Bugge)Hi Jacob, why on earth are you doing it all white so you can't see what you're doing? Is there a reason that everything has to be white?
-
36. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 3:13 PM (in response to Jacob Bugge)It worked! your a slippery little genius Jacob. I don't merge the two bars on right angle crosses, so I can still access the width of the bars, you loose that capability if you merge them together, however with the diagonal cross, it doesn't matter because I can't ever effect the width without doing it all again anyway.
I don't see why the colour scheme made a difference but it did, as soon as I outline stroked it, it went to a normal shape, not a funny one with a line through the middle. and I held down alt and option when I used the pathfinder this time which it didn't before. Anyway, it all works the bar stayed on the points and everything.
thanks for you help
Gareth
PS. I am going to click correct answer, again but this time I have actually done it!
-
37. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 3:27 PM (in response to Gareth_Williams)You are welcome, Gareth; a great relief.
why on earth are you doing it all white so you can't see what you're doing? Is there a reason that everything has to be white?
I made the background rectangle 100% C(yan), then finally changed it to 100%C+44%M, following the recommendation of the Education, Culture and Sport Committee of the Scottish Parliament.
I don't merge the two bars on right angle crosses, so I can still access the width of the bars, you loose that capability if you merge them together,
That makes perfect sense, and obviously it is unnecessary to merge in any case.
-
38. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Gareth_Williams Sep 7, 2012 3:40 PM (in response to Jacob Bugge)My mistake, I thought you had done the rectangle and the bar white. Something about what we did differently made it work, it may well have been that when I did the original stroke this time, I set it (on your instructions) no fill and only gave it a stoke colour. And when it was outline stroked it just turned straight into a normal shape.
PS. Alt/Option+O++E (Object>Transform>Reflect) didn't work, so I did it manually in the reflect pallet. what I tried to do (this might not have been what you meant) was selected teh bar and pressed [alt and option and O and E] all at the same time but nothing happened!
-
39. Re: Defining Diagonal Bars in a Rectangle in Illustrator
Jacob Bugge Sep 7, 2012 4:07 PM (in response to Gareth_Williams)Gareth,
it may well have been that when I did the original stroke this time, I set it (on your instructions) no fill and only gave it a stoke colour. And when it was outline stroked it just turned straight into a normal shape.
Ah, sorry, I overlooked the filled path trap, Illy assuming filled and stroked paths to start with: when you outline the stroke, the fill is kept as a separate filled nostroke path with no width, just waiting to cause trouble.
Alt/Option+O+T+E is meant as Hold Alt/Option (depending on OS) while you press O, thenT, then E; you can see the keystroke guide unfold as underlining of the (next) letter in question when you hold Alt/Option.










