Rotating objects other than 90 degrees

Not a big deal but a perplexing question. I loaded the SW_Coded_SH-7050 symbol in the Symbol Editor, to edit for my own use. It has text objects on it that are rotated in increments of 22.5 degrees. I tried to duplicate this, and found no way to do it. Rotation angle doesn’t seem to be an editable (or even readable) property. Even “rotated: yes/no” doesn’t show up in the properties dialog.

Just for ease of reference a screenshot of this standard schematic symbol:

And the text representation of it in the library /usr/share/kicad/symbols/Switch.kicad_sym

  (symbol "SW_Coded_SH-7050" (pin_names hide) (in_bom yes) (on_board yes)
    (property "Reference" "SW" (id 0) (at -7.62 8.89 0)
      (effects (font (size 1.27 1.27)) (justify left))
    )
    (property "Value" "SW_Coded_SH-7050" (id 1) (at -7.62 -8.89 0)
      (effects (font (size 1.27 1.27)) (justify left))
    )
    (property "Footprint" "" (id 2) (at -7.62 -11.43 0)
      (effects (font (size 1.27 1.27)) (justify left) hide)
    )
    (property "Datasheet" "https://www.nidec-copal-electronics.com/e/catalog/switch/sh-7000.pdf" (id 3) (at 0 0 0)
      (effects (font (size 1.27 1.27)) hide)
    )
    (property "ki_keywords" "rotary hex Real" (id 4) (at 0 0 0)
      (effects (font (size 1.27 1.27)) hide)
    )
    (property "ki_description" "Rotary switch, 4-bit encoding, 16 positions, Real code" (id 5) (at 0 0 0)
      (effects (font (size 1.27 1.27)) hide)
    )
    (property "ki_fp_filters" "Nidec*Copal*SH*7010*" (id 6) (at 0 0 0)
      (effects (font (size 1.27 1.27)) hide)
    )
    (symbol "SW_Coded_SH-7050_0_0"
      (text "0" (at 5.715 0 2700)
        (effects (font (size 1.27 1.27)))
      )
      (text "1" (at 5.2832 -2.1844 2475)
        (effects (font (size 1.27 1.27)))
      )
      (text "2" (at 4.0386 -4.0386 2250)
        (effects (font (size 1.27 1.27)))
      )
      (text "3" (at 2.1844 -5.2832 2025)
        (effects (font (size 1.27 1.27)))
      )
      (text "4" (at 0 -5.715 1800)
        (effects (font (size 1.27 1.27)))
      )
      (text "5" (at -2.1844 -5.2832 1575)
        (effects (font (size 1.27 1.27)))
      )
      (text "6" (at -4.0386 -4.0386 1350)
        (effects (font (size 1.27 1.27)))
      )
      (text "7" (at -5.2832 -2.1844 1125)
        (effects (font (size 1.27 1.27)))
      )
      (text "8" (at -5.715 0 900)
        (effects (font (size 1.27 1.27)))
      )
      (text "9" (at -5.2832 2.1844 675)
        (effects (font (size 1.27 1.27)))
      )
      (text "A" (at -4.0386 4.0386 450)
        (effects (font (size 1.27 1.27)))
      )
      (text "B" (at -2.1844 5.2832 225)
        (effects (font (size 1.27 1.27)))
      )
      (text "C" (at 0 5.715 0)
        (effects (font (size 1.27 1.27)))
      )
      (text "D" (at 2.1844 5.2832 3375)
        (effects (font (size 1.27 1.27)))
      )
      (text "E" (at 4.0386 4.0386 3150)
        (effects (font (size 1.27 1.27)))
      )
      (text "F" (at 5.2832 2.1844 2925)
        (effects (font (size 1.27 1.27)))
      )
    )

It is indeed a bit puzzling. I did not see anything in the GUI of the symbol editor to do this, but the file format clearly supports it. I do know that at least a part of KiCad’s libraries is generated from scripts. It’s also possibly that this rotation was added by modifying the text of the library symbol in a text editor. The 4 digit resolution for coordinates also suggests it was not done in KiCad’s GUI. Up to a handful of years ago it was quite common to some things with a text editor because of missing GUI functionality.

2 Likes

Thanks; very interesting. All kinds of opportunities for mischief here. ;>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.