kicad-parts-placer


Namekicad-parts-placer JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryPlace components in a kicad file programmatically.
upload_time2024-05-16 01:36:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2023, Simon Hobbs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords kicad_parts_placer kicad python eda electronics pcb manufacturing
VCS
bugtrack_url
requirements pandas numpy spreadsheet_wrangler click
Travis-CI
coveralls test coverage No coveralls.
            # kicad-parts-placer

<https://maskset.net/kicad-parts-placer.html>

+ Exact batch placement of components in a layout
+ Groups the components allowing them to be moved and positioned as a group, easily ensuring exact alignment
+ Useful for:
  + Creating bed of nails tester
  + Positioning mechanically important parts
  + Maintaining a form factor across different designs

## Example Use: Pogo pin & test pad placement
The project at <https://github.com/snhobbs/kicad-parts-placer/tree/master/example/example-placement> shows an example use.
This takes a centroid file from an existing design which is edited for input.

![Config file from centroid](documents/config_placements.png)

A schematic is drawn up with matching reference designators:

![tester schematic](documents/example-placement.svg)

The schematic is exported to a PCB which will look like this:

![Exported PCB](documents/exported_board.png)

Running the script on this board with this command exports the following board with the components exactly aligned ready for layout. The group can be treated as a footprint, placed where ever is useful. During layout you only have to deal with a single coordinate as the position within the group is locked.

```{python}
kicad-parts-placer --pcb example-placement.kicad_pcb --config centroid-all-pos.csv --out example-placement_placed.kicad_pcb -x 117.5 -y 53
```

![Generated PCB](documents/placed_components_board.png)



### Procedure: Existing board needs a tester
1. Export test pad locations & type to a spreadsheet
2. Plugin exports pad type, position, ref des, & value from DUT
3. Extend the exported data, choosing the pogo pin footprint, mounting holes, connectors, etc. This is useful for the placement of mechanically important parts and form factor compliance.
4. Batch load parts into schematic
5. Complete schematic as needed, batch loading can be repeated or bom exported & checked for consistency
6. Update PCB from schematic (f8)
7. Run script which moves existing ref des to the location in config

### Placing Test Pads to Reuse a Tester
+ Can follow same workflow as making a tester or copy from the existing board that uses the tester
+ Script should have a check placement function that is read only

## Matching Form Factor
+ Ensure position, type, & rotation match a certain description.
+ The grouped components then only need 2 dimensions locked to a reference to get correct.

## Critical component placement
+ Exact placement of mounting holes, sensors, connectors, etc

## Notes
+ Place parts in pcb layout from a configuration table.
+ Allows writing a config script which fully defines the parts
+ Connections are made either by updating from a schematic or passing a netlist
+ Use example of schematic to pcb placement
+ All parts are grouped together, locking their relative placement
+ Internal configuration is a dataframe with ref des, label/value, footprint, position x, position y. Notes fields can be added for documentation generation.
+ A separate config object can be that could pull in a board outline, stackup, etc describing the board.
+ Position, rotation, & ref des are available in the centroid file, that avoids requiring the source board be kicad.


## Installation
### PyPi
All you need to run is:
```
pip install kicad-parts-placer
```

### Source
To install from source:
```
git clone https://github.com/snhobbs/kicad-parts-placer
cd kicad-parts-placer
pip install .
```

## References
+ Openscad test jig generator: https://tinylabs.io/openfixture-config/
+ Manual kicad location extraction: https://tinylabs.io/openfixture-kicad-export/
+ Hackaday test jigs: https://hackaday.com/2016/08/24/tools-of-the-trade-test-and-programming/#more-218337
+ https://www.testjigfactory.com/
+ https://climbers.net/sbc/home-lab-pcb-programming-test-jig/
+ Kicad schematic to pcb position: https://github.com/ian-ross/kicad-plugins
+ Test pad to openscad pin placement: https://github.com/5inf/TestPointReport2STL

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "kicad-parts-placer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "kicad_parts_placer, kicad, python, eda, electronics, pcb, manufacturing",
    "author": null,
    "author_email": "Simon Hobbs <simon.hobbs@electrooptical.net>",
    "download_url": "https://files.pythonhosted.org/packages/86/7d/a0ea530c5a988344f0699cf9ae516bfb78ea941debff6b2ec95fed0f0a99/kicad_parts_placer-0.1.4.tar.gz",
    "platform": null,
    "description": "# kicad-parts-placer\n\n<https://maskset.net/kicad-parts-placer.html>\n\n+ Exact batch placement of components in a layout\n+ Groups the components allowing them to be moved and positioned as a group, easily ensuring exact alignment\n+ Useful for:\n  + Creating bed of nails tester\n  + Positioning mechanically important parts\n  + Maintaining a form factor across different designs\n\n## Example Use: Pogo pin & test pad placement\nThe project at <https://github.com/snhobbs/kicad-parts-placer/tree/master/example/example-placement> shows an example use.\nThis takes a centroid file from an existing design which is edited for input.\n\n![Config file from centroid](documents/config_placements.png)\n\nA schematic is drawn up with matching reference designators:\n\n![tester schematic](documents/example-placement.svg)\n\nThe schematic is exported to a PCB which will look like this:\n\n![Exported PCB](documents/exported_board.png)\n\nRunning the script on this board with this command exports the following board with the components exactly aligned ready for layout. The group can be treated as a footprint, placed where ever is useful. During layout you only have to deal with a single coordinate as the position within the group is locked.\n\n```{python}\nkicad-parts-placer --pcb example-placement.kicad_pcb --config centroid-all-pos.csv --out example-placement_placed.kicad_pcb -x 117.5 -y 53\n```\n\n![Generated PCB](documents/placed_components_board.png)\n\n\n\n### Procedure: Existing board needs a tester\n1. Export test pad locations & type to a spreadsheet\n2. Plugin exports pad type, position, ref des, & value from DUT\n3. Extend the exported data, choosing the pogo pin footprint, mounting holes, connectors, etc. This is useful for the placement of mechanically important parts and form factor compliance.\n4. Batch load parts into schematic\n5. Complete schematic as needed, batch loading can be repeated or bom exported & checked for consistency\n6. Update PCB from schematic (f8)\n7. Run script which moves existing ref des to the location in config\n\n### Placing Test Pads to Reuse a Tester\n+ Can follow same workflow as making a tester or copy from the existing board that uses the tester\n+ Script should have a check placement function that is read only\n\n## Matching Form Factor\n+ Ensure position, type, & rotation match a certain description.\n+ The grouped components then only need 2 dimensions locked to a reference to get correct.\n\n## Critical component placement\n+ Exact placement of mounting holes, sensors, connectors, etc\n\n## Notes\n+ Place parts in pcb layout from a configuration table.\n+ Allows writing a config script which fully defines the parts\n+ Connections are made either by updating from a schematic or passing a netlist\n+ Use example of schematic to pcb placement\n+ All parts are grouped together, locking their relative placement\n+ Internal configuration is a dataframe with ref des, label/value, footprint, position x, position y. Notes fields can be added for documentation generation.\n+ A separate config object can be that could pull in a board outline, stackup, etc describing the board.\n+ Position, rotation, & ref des are available in the centroid file, that avoids requiring the source board be kicad.\n\n\n## Installation\n### PyPi\nAll you need to run is:\n```\npip install kicad-parts-placer\n```\n\n### Source\nTo install from source:\n```\ngit clone https://github.com/snhobbs/kicad-parts-placer\ncd kicad-parts-placer\npip install .\n```\n\n## References\n+ Openscad test jig generator: https://tinylabs.io/openfixture-config/\n+ Manual kicad location extraction: https://tinylabs.io/openfixture-kicad-export/\n+ Hackaday test jigs: https://hackaday.com/2016/08/24/tools-of-the-trade-test-and-programming/#more-218337\n+ https://www.testjigfactory.com/\n+ https://climbers.net/sbc/home-lab-pcb-programming-test-jig/\n+ Kicad schematic to pcb position: https://github.com/ian-ross/kicad-plugins\n+ Test pad to openscad pin placement: https://github.com/5inf/TestPointReport2STL\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023, Simon Hobbs  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Place components in a kicad file programmatically.",
    "version": "0.1.4",
    "project_urls": {
        "github": "https://github.com/snhobbs/kicad-parts-placer.git"
    },
    "split_keywords": [
        "kicad_parts_placer",
        " kicad",
        " python",
        " eda",
        " electronics",
        " pcb",
        " manufacturing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed43a509622270cc9ac083e96bfc1b6362bff71a37657e2f97284c579a05c395",
                "md5": "4748d0a95a6458cfa1fab309e18308f5",
                "sha256": "6e0ebc39cb429c9d96084ad7a733cf1b38a90f57b32fe377e0cb9dc1a836ddf2"
            },
            "downloads": -1,
            "filename": "kicad_parts_placer-0.1.4-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4748d0a95a6458cfa1fab309e18308f5",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 8673,
            "upload_time": "2024-05-16T01:36:32",
            "upload_time_iso_8601": "2024-05-16T01:36:32.859188Z",
            "url": "https://files.pythonhosted.org/packages/ed/43/a509622270cc9ac083e96bfc1b6362bff71a37657e2f97284c579a05c395/kicad_parts_placer-0.1.4-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "867da0ea530c5a988344f0699cf9ae516bfb78ea941debff6b2ec95fed0f0a99",
                "md5": "255ff11dd86f4cabecc3c789a984e20b",
                "sha256": "23f10da351180bdf14b9e7e5d39f70cf5b0856a1121fd89c282b2511fa30c39e"
            },
            "downloads": -1,
            "filename": "kicad_parts_placer-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "255ff11dd86f4cabecc3c789a984e20b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 16876,
            "upload_time": "2024-05-16T01:36:34",
            "upload_time_iso_8601": "2024-05-16T01:36:34.304139Z",
            "url": "https://files.pythonhosted.org/packages/86/7d/a0ea530c5a988344f0699cf9ae516bfb78ea941debff6b2ec95fed0f0a99/kicad_parts_placer-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-16 01:36:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "snhobbs",
    "github_project": "kicad-parts-placer",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "spreadsheet_wrangler",
            "specs": [
                [
                    ">=",
                    "0.1.6"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    ">=",
                    "7.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "kicad-parts-placer"
}
        
Elapsed time: 3.29791s