← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] PcbNew Block and Module Rotate


Le 31/05/2012 21:43, Athanasios Vlastos a écrit :
Hi Everybody,

I was working on an smd LED project and i found impossible to rotate an LED module by 5 or 10 degrees so i made a patch to add 5
and 10 degrees selection on rotation dialog.

You can already easily rotate a module by any angle, in module properties dialog.

Same thing for Block selection. Only 90 degrees allowed so i change that.
I have add in to the block dialog a spin box which the user is set the wanted angle of rotation for the block.
And once the rotate button clicked then the block it rotates about the selected angle.
The undo redo is patched too in order to follow the block rotation.

 From my experience in LED circuit designing, this function of an EDA is critical.

The patch tested on Ubuntu 12.04 and it works perfect check it.


Thanks, Athanasios.

However, this patch has some major issues that should be fixed:
1 - Only 90 degrees rotations can be undone by -90 degrees rotations.
    In other cases rounding issues create a small offset (cumulative after some undo/redo) and coordinates change.
    When rotating by any angle but 90, items should be seen as modified.
2 - You are using a global variable only to pass a parameter. This is bad.
3 - Rotation angle is in degrees and is an int. Why ?
    the internal resolution is 0.1 degree and will be perhaps increased.

Jean-Pierre CHARRAS

Follow ups