Pcbnew rotate group not on grid

Hello All, I’m just trying to confirm that I’m really seeing this behavior and if there is a way to fix it. When I rotate an footprint in pcbnew it acts as I would expect, around the anchor or a pad anchor. If I have a group of footprint, traces, text, etc… and rotate, it seem like it rotates on the mouse pointer’s actual x,y and not the mouse pointer’s nearest grid point. Is there a way to make it snap to the grid? If not, does anyone know if this a bug? (I’ll go check after I submit:) Presently, I’m doing a rotate and then doing a move exact… and this generally wouldn’t bug me too much but I have about 40 groups on this layout and this is taking a long time (I know I’m lazy). I’m using 4.0.5 on this computer and have a nightly build on another (seems to behave the same way as of a month ago). Thanks for any help!

Rotation happens around a center that is derived from the selection rectangle you draw before you rotate - see the white dot I put in there to mark that center).

If I want to rotate something that should stay relative to a coordinate (or it’s center) and on the grid I set the grid very rough… like 5mm or finer if the stuff to rotate won’t be so big and then select by drawing a SQUARE rectangle that is centered on that rotation center I want.

Be aware that arcs have centers that sometimes are OUTSIDE of your selection bracket and won’t be ‘selected’ unless you draw a very large one.

There is some quirk in KiCAD that can help you with this though… if you draw your selection bracket from top left to bottom right you get above behavior… anything (especially invisible arc centers) won’t make it into the selection if your bracket is not around them, which will cause the arc to not get selected.
If you instead draw your selection bracket from bottom right to top left it will actually include those invisible things and select (and rotate) the arc, although not all of it is inside the bracket.

The selection box behavior is actually pretty common in cad software. Left to right selects only what is enclosed and right to left selects everything touching the box.

Or vice versa. I can’t remember without actually working on something.

1 Like

Interesting, is this documented anywhere? It should be

1 Like

I’m not able to reliably produce this behavior in kicad. There seems to be a difference in the pcb new default canvas if you start on the left or right. Not sure if this is intended.

I was.mostly just pointing out that this is something common in cad systems.

The mechanical drawing program “CADStd” has a somewhat similar behavior. Even when I am working in that program I haven’t yet figured out exactly what the rules are.

Dale

This workaround wasn’t working for me. My group got rotated around the center of a computed bounding box around all selected components, even with a very large grid.

An alternative workaround for those facing the same issue is to do everything as described by @Joan_Sparky, but then before rotating draw a line at 45° through the center you want to rotate around. Then select all the components including that line. That will center the bounding box on the desired rotation point.

Not easy to solve unless all pads in the group are on-grid in the first place

Hej there!
Assuming that all this is a behavior in the OpenGL canvas, I might have a workaround that will help without fiddling around with the selection rectangle. My resolution only rotates on the grid, not on an specific center point.

1.Draw the selection rectangle around the group of elements
2.Click and drag within the selected elements, preferably but not necessarily on an component origin which is on a grid point, to check if the movement follows the grid.
3.And then press ‘r’ to rotate to the desired orientation.

I hope this helps!

Greetings, Norbert

1 Like