← Back to team overview

kicad-developers team mailing list archive

Re: eeschema bloc rotate


Hello all!

Indeed, hierarchical sheet rotation was not straight forward to support, but
I finally managed it. :-)
The attached patch support bloc rotation on all objects.

The SCH_SHEET_PIN object is now inherited from HIER_LABEL who simplify
somewhat the code.  sheetpin move is working in any orientation, plot
function is updated also.
As hierarchical sheet rotation was asked by Jean-Pierre, it was required to
also store extra information in .sch file.
I found a relatively transparent approach to avoid incompatibilities between
The format is left unchanged, only the sheet_pin edge property is extended
from 'L','R' to 'L','R','T','B' for respectively Left,Right,Top,Bottom.
Previous versions will read any edge value other than 'R' as 'L' with little

It would be easy to add hotkey event on hierarchical sheet object for rotate
and mirror (without block selection), but this is behond the scope of adding
support of block rotation and this patch is already large enough.

I tested this patch with sheets containing various objects, editing and plot
functions are OK also. But I don't have really complex shematics to
extensively validate everything. your experience maybe helpful.

I hope this contribution will be useful to many!



2010/8/31 jean-pierre charras <jp.charras@xxxxxxxxxx>

> Pascal Baerten a écrit :
>  Hi,
>> I recently switched to kicad and found it very promising!
>> Block rotation was however a missing feature in schematic editor, quite
>> annoying ....
>> Please find below my first contribution to this great project.
>> The attached patch file adds the following feature to eeschema:
>>    * block vertical mirror + popup menu
>>    * block  counter-clockwise rotate + popup menu
>>    * hotkey on block mirror_X (X)
>>    * hotkey on block mirror_Y (Y)
>>    * hotkey on block rotate ccw (R)
>>    * Some cleaning on existing code of block mirror: code defined in
>>      headers (.h) is moved to corresponding (.cpp) file
>> Theses block operations are repeatable, (ie could be executed more than
>> once; usefull for rotations) and move block remain active until placement.
>> (comparable behaviour as moving/rotating single components)
>> enjoy!
>>  Interesting !
> But hierarchical sheets have problem (as expected...) in block mirror (easy
> to fix) and block rotate.
> Currently Hierarchical sheet labels (pin labels) cannot have a vertical
> orientation.
> Block rotate needs vertical sheet labels.
> So block rotate could be more tricky than you are thinking
> (needs sheet labels orientation management in block rotate, sheet rotate,
> sheel labels edit and move).
> --
> Jean-Pierre CHARRAS
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers<https://launchpad.net/%7Ekicad-developers>
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers<https://launchpad.net/%7Ekicad-developers>
> More help   : https://help.launchpad.net/ListHelp

to subscribe, send a mail to <list-subscribe@xxxxxxxxxxxxx>

Attachment: kicad-block-rotate.diff
Description: Binary data

Follow ups