Skip to main content
runninghead_design
Inspiring
December 14, 2016
Question

How to force all lines to align true (rectilinearly)?

  • December 14, 2016
  • 4 replies
  • 3023 views

I have an AI document containing lots of squares and rectangles and various filled rectilinear path objects.

All very neat.

None of them overlap.

I've just discovered Object > Make Pixel Perfect- it's amazing for shifting all your points to snap to the pixel grid!

Trouble is many of my points are now messing up my square angles.

Anyone know of a method or script that will force all points to form right angles (90 degrees)?

I have a feeling there was some kind of Mosaic effect or something I used a long time ago that did a similar job?

    This topic has been closed for replies.

    4 replies

    Participating Frequently
    December 14, 2016

    I think your best bet is Effect > Convert to Shape > Rectangle, using the options below. That is, if you wanted all the shapes to be rectangles. If there were more complex shapes involved, then this method wouldn't work.

    Shape: Rectangle

    Size: Relative

    Extra Width: 0 pt

    Extra Height: 0 pt

    After adding that effect to the shapes, you may notice that even after using Object > Make Pixel Perfect, some of the pixels are still not aligned to the pixel grid (appears to be a bug). After which, you can use Object > Expand Appearance, and then once again Object > Make Pixel Perfect to align the rectangles to the grid.

    runninghead_design
    Inspiring
    December 14, 2016

    Yep- Doesn't Work but thanks anyway.

    Astute Straighten Tool in Subscribe Plugin (Free) does speed up the process

    of manually straightening lines considerably but this thread is to

    establish an automated method, which is likely possible with a little

    creative experimentation.

    Jacob Bugge
    Community Expert
    Community Expert
    December 14, 2016

    For my part you are welcome, runninghead.

    Ray Yorkshire
    Participating Frequently
    December 14, 2016

    i'd use the free astute graphics plugin Subscribe

    and its Straighten tool

    to sort your wonky lines, here and there

    50 secs

    SUBSCRIBE FREE | Connect and Straighten Tools in Illustrator - YouTube

    http://astutegraphics.com/software/subscribe/

    Jacob Bugge
    Community Expert
    Community Expert
    December 14, 2016

    Runninghead,

    I am afraid there is no easy general method.

    runninghead_design
    Inspiring
    December 14, 2016

    Maybe not Jacob, but there will be one nonetheless.

    Scripting may be the way to go, some already exist, but I'd be surprised if there's not a method that utilises the built-in functionality as it's got a lot of potential.

    eg- I've just tried scaling the whole thing down, choosing Make Pixel Perfect again and then scaling it back up.

    It didn't work but I'm sure something like that might do it in the end.

    Jacob Bugge
    Community Expert
    Community Expert
    December 14, 2016

    runninghead,

    I have an AI document containing lots of squares and rectangles and various filled rectilinear path objects.

    All very neat.

    I am afraid there is a little lack of neatness, namely that some of the path segments are not vertical/horizontal, in other words you have hit a neighbouring grid point.

    I believe pressing the Shift key or using Smart Guides (on) to run along the gridlines is the way to do it while creating.

    There may still be an issue when you close the path which may throw the last segment off, if you choose a grid point short of or past the right one.

    You could start with a path segment that is too long where you want the end segment, then click the grid points for all the new segments, then click the preliminary segment still guided whish will leave you with an open path and the superfluous part of the preliminary segment as a new separate segment, then Direct Select the start Anchor Point and ClickDrag it to snap to the opposite open end Anchor Point and Ctrl/Cmd+J to join and thereby close the path.

    Mike_Gondek10189183
    Community Expert
    Community Expert
    December 14, 2016

    Are all your rectangles and squares in rounded pixel sizes containing no decimal points?

    Was object >> create object mosaic, what you used in the past?

    Please post s screenshot?

    runninghead_design
    Inspiring
    December 14, 2016

    Thanks, yes, I've just relocated and tried make mosaic but it's not doing the job.
    Here's some screen grabs that show the document and the problem.

    Note where the slight (non-right) angle of some of the lines is causing pixel-blur even though every anchor is snapped to the pixel grid.

    Close up...


    The demo makes it all seem so simple ...