Coder Social home page Coder Social logo

kicad_component_layout's People

Contributors

jarrettr avatar l4u avatar mcbridejc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kicad_component_layout's Issues

error from pcbnew "rotation" is a list, not double

I have a new installation of KiCad Version: 6.0.4+dfsg-1~bpo11+1, release build, python3

Getting an error:
line 167, in Run

    167                 mod.SetOrientationDegrees(rotation)
TypeError: in method 'FOOTPRINT_SetOrientationDegrees', argument 2 of type 'double'

Changing line 166 from
166 rotation = props['rotation']
to
166 rotation = props['rotation'][0]
gets the first element of the list into the rotation variable and the plugin works.

File import/export

Is there any interest in adding file dialogs to this plugin to allow selecting a file with the placement yaml as well as dumping yaml to a file that stores all the part placement info?

Error caused by some nightly builds enclosing the version string in parentheses

Created based on feedback in Issue #3

Sometimes, when using the script with kicad nightly, it would fail with `TypeError: in method 'FOOTPRINT_SetPosition', argument 2 of type 'VECTOR2I const &'.

This is because nightly builds use a different type for positions. The plugin does a version check for '6.99' to handle this, but it seems
some versions of KiCad nightly, on some platforms, report a the version string enclosed in parenthese and these aren't handled by the plugin.

Plugin is using page origin and not grid/aux origin

It seems like this tool uses the page origin and not one of the origins the user can set.
This makes it hard to have a PCB thats properly placed on the sheet when using this plugin.

I currently fixed this locally, but I am not sure how the version checking works. I am on 6.0.11 and it seems to pick the wxPoint path, even though the comment says that newer should use Vector2I.

https://github.com/mcbridejc/kicad_component_layout/blob/master/component_layout_plugin.py#L152

grid_origin = pcb.GetDesignSettings().GetGridOrigin()

## Latest needs a pcbnew.VECTOR2I, 6.0.1 needs wxPoint
if use_vector2:
    mod.SetPosition(pcbnew.VECTOR2I_MM(x0 + x, y0 + y))
else:
    mod.SetPosition(pcbnew.wxPointMM(x0 + x, y0 + y)+grid_origin)

Kind regards,
Riesi

Please provide an example of the yaml generation script

Thanks for this script, it saves a ton of time and improves the accuracy of my layout.

Could you add an example of a script which generates the layout.yaml file? If you can't get to this soon, I'll build one and send it to you.

I'm currently building the text in a spreadsheet and copy-pasting it into the text file, which is tedious.

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.