Giter VIP home page Giter VIP logo

kicad-round-tracks's Introduction

KiCad Round Tracks

A subdivision- and/or native arc-based track rounding plugin for KiCad.

The goal is to algorithmically melt a PCB design, smoothing all tracks in a predictable manner.

example

For best results, use in conjunction with this teardrop plugin.

I have written extensively about my kicad melting experiments here.

Use

For the KiCad 5 compatible version, please use the kicad-5 branch.

The intended use is to have a source PCB file, which is easy to edit, and a rendered output file, generated by this plugin. After running DRC on the output, you can then go back and adjust the original file before running the plugin again.

If you select part of the board, only the selected tracks will get melted. If nothing is selected, the whole file will be processed.

"Create a new file" does not immediately write anything to disk, it merely appends "-rounded" to the filename so that the next time you hit Save it won't overwrite the original.

If "use native" is ticked, the rounded sections are implemented using KiCad 6's native PCB arcs. These can be adjusted after the script has run, but I still recommend keeping the unrounded source PCB file. I have tried hard to ensure that the output PCB is the same, regardless of if native or subdivision-based arcs are used. If "use native" is ticked, the number-of-passes parameter is ignored.

Otherwise, the curves are generated from many small straight sections. 2 or 3 passes is usually sufficient. There is no loading bar, so if the design is complicated the interface might freeze for a few seconds while it runs. You can set the number of passes to be 1, and run the plugin repeatedly, and it will give the same results, while letting you inspect the intermediate stages.

"Radius" is the maximum radius curve that would result from a 90° bend. A smaller curve will be used if the tracks are shorter, or if the angle between them is sharper. The resulting curves will always pass through at least one point of the original tracks, so individual curves can be controlled by splitting tracks into smaller sections. If a curve has too large a radius, placing a small 45° bend will make it smaller. Similarly, if a bigger radius is needed for certain tracks, you can draw an approximate curve with free-angle tracks to achieve this.

Note: Currently, the teardrop plugin has not been fully ported to KiCad 6. It does not yet understand native arcs, but work is ongoing.

Todo

  • Limit minimum angle between tracks, to avoid unnecessary subdivisions
  • In KiCad 6, the undo history state is broken when the plugin runs. A single tap of Ctrl+Z should undo the rounding.

Installation

Clone or unzip this repository in a KiCad plugin folder.

  • On linux :
    • /usr/share/kicad/scripting/plugins/
    • ~/.kicad/scripting/plugins
    • ~/.kicad_plugins/
  • On macOS :
    • /Applications/kicad/Kicad/Contents/SharedSupport/scripting/plugins
    • ~/Library/Application Support/kicad/scripting/plugins
  • On Windows:
    • C:\Program Files\KiCad\share\kicad\scripting\plugins\
    • %UserName%\Documents\KiCad\6.0\scripting\plugins\kicad-round-tracks

You can list the exact paths where KiCad will search for plugins by opening the scripting console in pcbnew and running:

import pcbnew
print(pcbnew.GetWizardsSearchPaths())

Under Preferences / Preferences / PCB Editor / Action Plugins, you can choose to add a button to the toolbar for quick access to the plugin.

History

This plugin is based on flexRoundingSuite by Julian Loiacono and kicad-round-tracks by Antoine Pintout. My contribution updated the algorithm so that subdivisions are applied equally, resulting in smoother tracks with fewer clearance errors.

Original copyright Miles McCoo, 2017
Extensively modified by Julian Loiacono, Oct 2018
Multi-layer support and repacked as action plugin by Antoine Pintout, May 2019
Updated subdivision algorithm by mitxela, Jan 2021

kicad-round-tracks's People

Contributors

mitxela avatar dragonflytech0 avatar autoiue avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.