Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Turns out #KiCad plugins are rather easy to write and easy to use - just drop a python script in your /scripting/plugins directory and refresh your plugin list.

Turns out #KiCad plugins are rather easy to write and easy to use - just drop a python script in your /scripting/plugins directory and refresh your plugin list.

Scheduled Pinned Locked Moved Uncategorized
kicad
5 Posts 1 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • gloriouscow@oldbytes.spaceG This user is from outside of this forum
    gloriouscow@oldbytes.spaceG This user is from outside of this forum
    gloriouscow@oldbytes.space
    wrote last edited by
    #1

    Turns out #KiCad plugins are rather easy to write and easy to use - just drop a python script in your /scripting/plugins directory and refresh your plugin list. You don't even have to restart KiCad.

    You can even call into wxWidgets to give your plugin a UI.

    The applications for this are really endless. Here's a simple example, i wanted to add these fields for the RAM chips that are numbered on the PCB silkscreen. You could do that manually, but I figure if this is something I do a lot, this little script might save me time.

    gloriouscow@oldbytes.spaceG 1 Reply Last reply
    1
    0
    • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

      Turns out #KiCad plugins are rather easy to write and easy to use - just drop a python script in your /scripting/plugins directory and refresh your plugin list. You don't even have to restart KiCad.

      You can even call into wxWidgets to give your plugin a UI.

      The applications for this are really endless. Here's a simple example, i wanted to add these fields for the RAM chips that are numbered on the PCB silkscreen. You could do that manually, but I figure if this is something I do a lot, this little script might save me time.

      gloriouscow@oldbytes.spaceG This user is from outside of this forum
      gloriouscow@oldbytes.spaceG This user is from outside of this forum
      gloriouscow@oldbytes.space
      wrote last edited by
      #2

      I've gone on to make the entire silkscreen text field generation automatic - it is driven off a custom symbol field template - the value 'seq_silkscreen', if present, overrides the Value field, and is formatted at the specified size and line thickness.

      If the text origin matches the anchor point of the footprint, implying it has never been moved, it will try to move it into rough position below the center of the chip, using the footprint pad bounding box as a reference.

      If there's no 'seq_footprint' field at all the script tries to set one, using the reference field for resistors and capacitors, or else trimming off the "74" from the Value field and using that, matching Seequa's conventions.

      This has saved me hours of tedious tweaking.

      gloriouscow@oldbytes.spaceG 1 Reply Last reply
      0
      • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

        I've gone on to make the entire silkscreen text field generation automatic - it is driven off a custom symbol field template - the value 'seq_silkscreen', if present, overrides the Value field, and is formatted at the specified size and line thickness.

        If the text origin matches the anchor point of the footprint, implying it has never been moved, it will try to move it into rough position below the center of the chip, using the footprint pad bounding box as a reference.

        If there's no 'seq_footprint' field at all the script tries to set one, using the reference field for resistors and capacitors, or else trimming off the "74" from the Value field and using that, matching Seequa's conventions.

        This has saved me hours of tedious tweaking.

        gloriouscow@oldbytes.spaceG This user is from outside of this forum
        gloriouscow@oldbytes.spaceG This user is from outside of this forum
        gloriouscow@oldbytes.space
        wrote last edited by
        #3

        Here's some fun field-driven ideas I can already think of.

        • set a custom 'row' or 'column' field, and have a script vertically or horizontally align all footprints that share the same value. Yes you can align stuff manually, but now it is a policy you don't have to think about. you could have a custom 'align' field too, so you could say, ensure these three chips are in the same row, but aligned by their bottoms:
        gloriouscow@oldbytes.spaceG 1 Reply Last reply
        0
        • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

          Here's some fun field-driven ideas I can already think of.

          • set a custom 'row' or 'column' field, and have a script vertically or horizontally align all footprints that share the same value. Yes you can align stuff manually, but now it is a policy you don't have to think about. you could have a custom 'align' field too, so you could say, ensure these three chips are in the same row, but aligned by their bottoms:
          gloriouscow@oldbytes.spaceG This user is from outside of this forum
          gloriouscow@oldbytes.spaceG This user is from outside of this forum
          gloriouscow@oldbytes.space
          wrote last edited by
          #4

          The original motherboard did not have 'U' reference numbers - although my hope is that Chameleon owners might start to use the U numbers from my project as sort of a standard from this point forward, the board does have coordinates on its edge.

          I have a 'seq_coord' field that I was intending to enter the coordinate for for each component. I was going to do that manualy, but it would be a bit tedious and possibly error-prone, and there would be a lot of fudging.

          So of course, let's just set the coordinate by script! The numbers count by inches horizontally, and the letters count every two inches vertically. Again using the center of the footprint pad bounding box, we can calculate a very precise value for the coordinate using two decimal places.

          So instead of say, "C3" you might see 1.95, C.62 and now you tell a Chameleon owner exactly where on the board they will find any given component.

          #retrocomputing

          gloriouscow@oldbytes.spaceG 1 Reply Last reply
          0
          • gloriouscow@oldbytes.spaceG gloriouscow@oldbytes.space

            The original motherboard did not have 'U' reference numbers - although my hope is that Chameleon owners might start to use the U numbers from my project as sort of a standard from this point forward, the board does have coordinates on its edge.

            I have a 'seq_coord' field that I was intending to enter the coordinate for for each component. I was going to do that manualy, but it would be a bit tedious and possibly error-prone, and there would be a lot of fudging.

            So of course, let's just set the coordinate by script! The numbers count by inches horizontally, and the letters count every two inches vertically. Again using the center of the footprint pad bounding box, we can calculate a very precise value for the coordinate using two decimal places.

            So instead of say, "C3" you might see 1.95, C.62 and now you tell a Chameleon owner exactly where on the board they will find any given component.

            #retrocomputing

            gloriouscow@oldbytes.spaceG This user is from outside of this forum
            gloriouscow@oldbytes.spaceG This user is from outside of this forum
            gloriouscow@oldbytes.space
            wrote last edited by
            #5

            I might be over-thinking that. Perhaps just the letter/number coordinate is simpler - if you can't find a component in a two square inch area, you probably have bigger problems.

            1 Reply Last reply
            0
            • R relay@relay.infosec.exchange shared this topic
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups