← Back to team overview

kicad-developers team mailing list archive

Re: Text rotation Angle and part rotation Angle pcbnew

 

There is something weird that goes on with that section of the code base.

I was messing around with it before when doing the eagle importer stuff.
For whatever reason text is limited to less than around 90 degrees of
rotation.

There are 5+ places in the pcbnew code where the rotation of text is
changed. It is a mess. Good luck Lachlan!

On Mon, Dec 14, 2015 at 4:23 PM Cirilo Bernardo <cirilo.bernardo@xxxxxxxxx>
wrote:

> That shouldn't be a problem; something like this would do it:
>
>     wxFloatingPointValidator< float > valRotate( 1 );
>     valRotate.SetRange( -180.0, 180.0 );
>
> Then it's just a matter of (a) specifying a max. character length in the
> input box, (b) using the constructor with the validator specified, and (c)
> returning kicad's expected
> integer value (degrees * 10) for rotations.
>
> On Tue, Dec 15, 2015 at 2:19 AM, Wayne Stambaugh <stambaughw@xxxxxxxxx>
> wrote:
>
>> On 12/13/2015 8:00 PM, Lachlan Audas wrote:
>> > You can't set text rotation angle of part reference's and vale's in
>> > pcbnew,  only part rotation angle,
>>
>> The code for supporting rotated text is already in the pcbnew file
>> format.  I just don't know how well Pcbnew itself will handle rotated
>> text so there may be a lot of work to do.  I'm not trying to scare you
>> off but it may not be as easy to resolve as it appears.
>>
>> >
>> > This is bit of a problem  for importing eagle  pcb's,   as parts
>> > reference/vales may have angle's set,  also when manually setting
>> > angle's you need to enter 900 for 90..  etc
>> > instead of 90.5 etc  this very odd way of entering angles,   is they any
>> > objection make a patch to change this to the standard way of entering
>> > angle's, and allowing rations of
>> > reference/vale fields ?
>>
>> The only solution that I would accept would be a proper wxValidator
>> designed for angle entry.  There is already wxFloatingPointValidator
>> that you could reuse to make your life easier.  Your derived version
>> should clamp the angles from 0 to 360 and have an accessor to return the
>> converted angle as an integer.
>>
>> >
>> > Lachlan
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Mailing list: https://launchpad.net/~kicad-developers
>> > Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> > Unsubscribe : https://launchpad.net/~kicad-developers
>> > More help   : https://help.launchpad.net/ListHelp
>> >
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

References