I wish to create the following pattern in Illustrator:
I tried fills, but didn't get that edge. Any ideas? Apart from placing the squares one by one of course.
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityDrag a square to the swatches collection (as you obviously have already done). It can be useful to have a filled square without a stroke (see NOTE1)
Then fill a big rectangle with that "squares pattern". Expand the result, release its clipping mask and ungroup. You may need 3 separate ungroupings to get rid of all group levels. Now you have only to delete the unwanted squares and the clipping mask shapes, no need to place the squares one by one. You can select multiple squares easily with the lasso tool.
NOTE1: If the square has a stroke, the fill pattern isn't aligned corner point at corner point, the strokes lean against each other. Here you can see the difference between stroked and fill only squares after ungrouping and few squares moved apart:
You can after ungrouping select all and add a stroke, if needed.