kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #08413
Re: [PATCH] PcbNew Block and Module Rotate
Le 04/06/2012 09:21, Lorenzo Marcantonio a écrit :
On Mon, Jun 04, 2012 at 09:07:25AM +0200, jean-pierre charras wrote:
You can already easily rotate a module by any angle, in module properties dialog.
Altough pads are drawn, not flashed :( need to implements AM generation
for that
This is an other topic.
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.
Aren't edits undone replaced with a copy of the original object (like in
eeschema?)
Not always: for trivial transforms (move and rotate 90 of basic items like tracks and modules),
in order to avoid unnecessary copies, the inverse transform is made.
For all more complex changes, a copy of the basic item is made.
For rotate transforms, with angle that differs from 90 degrees, using the copy option is needed,
because the inverse transform does not always restore initial coordinates values.
2 - You are using a global variable only to pass a parameter. This is bad.
Burn him at the stake XD
3 - Rotation angle is in degrees and is an int. Why ?
the internal resolution is 0.1 degree and will be perhaps increased.
I'd use a decidegree as an int.
Or a double, in degrees.
--
Jean-Pierre CHARRAS
KiCad Developers team.
KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
References