Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add GUI #26

Open
Bouni opened this issue Apr 26, 2022 · 21 comments
Open

Feature request: Add GUI #26

Bouni opened this issue Apr 26, 2022 · 21 comments
Labels
enhancement New feature or request help wanted Extra attention is needed Stale

Comments

@Bouni
Copy link
Contributor

Bouni commented Apr 26, 2022

I love this plugin but it feels not really integrated. I think a GUI woud be absolutely awesome!

It could be super simple, maybe just a single window that shows up after the user clicks the action plugin button.
There you got the options (checkboxes, radios, whatever) and paths which could be saved in a YAML/TOMS/INI file beside the plugin itself.
And a textfield for the LCSC number plus a Go button to download the data.

Actually not that big of a deal to build and would make the plugin usable from within KiCAD.

@uPesy
Copy link
Owner

uPesy commented Apr 30, 2022

It's a great idea that i have also in mind.
But i don't know how actually do it on Kicad. The plugins should be compatible for v5+ et v6.
I know that it's more easier to integrate plugins in Kicad 6. A GUI similar to yours https://github.com/bouni/kicad-jlcpcb-tools will be really great.
You can submit a PR with template code for a GUI inspired from kicad-jlcpcb-tools.

@uPesy uPesy added enhancement New feature or request help wanted Extra attention is needed labels Apr 30, 2022
@Bouni
Copy link
Contributor Author

Bouni commented May 3, 2022

I thought a bit more about this and in the end haveing the GUI just out of the PCB editor is kind of limited.
Maybe a standalone GUI would be a better choice (also not a big deal).
If I find some spare time I'll submit a PR with a GUI approach ...

@uPesy
Copy link
Owner

uPesy commented May 4, 2022

I thought a bit more about this and in the end haveing the GUI just out of the PCB editor is kind of limited.
Could you explain a little more why you think is not a big deal ?
Thanks for your ideas.

@Bouni
Copy link
Contributor Author

Bouni commented May 4, 2022

What I wanted to say is that a GUI that can just be used out of the PCB editor is not ideal because you may also want to use it from within the schematics editor.
A usual workflow is Schematic -> PCB layout -> Production I guess and jumping back and forth just to use the GUI is not ideal.

With "not a big deal" I meant that it is equaly easy to build a standalone GUI compared to an action plugin.

I did a quick experiment yesterday but that was just a quick and dirty proof of concept so far:

image

Here are some of my thoughts / how I did things for my test:

  1. Calling easyeda2kicad without any parameters starts the GUI, if arguments are provided the tool works in CLI mode
  2. These function main.py#L127-L164 should be moved to a seperate file and being imported so that the can be used from the GUI as well
  3. The same applies for this logic as it can be used for the GUI as well main.py#L180-L244

I'll keep you up to date on my experiments!

@Bouni
Copy link
Contributor Author

Bouni commented May 4, 2022

I implemented a very basic version of this proposal, you can have a look at it here: https://github.com/Bouni/easyeda2kicad.py/tree/gui

If this goes into the right direction for you I'll put in some more effort and prepare a PR

@uPesy
Copy link
Owner

uPesy commented May 5, 2022

Thanks for your details explanation, i get it.

A usual workflow is Schematic -> PCB layout -> Production I guess and jumping back and forth just to use the GUI is not ideal.

Sure, i think the best solution should be to access the plugin in Eeschema and Pcbnew. But it seems that's tricky to create a plugin in Eeschema right ?
For now, having a standalone GUI seems the best approach. It will be also compatible with Kicad v5.x
Your POC GUI is fine for me. The use of wx is great for cross platform.
Great work !

@uPesy
Copy link
Owner

uPesy commented May 5, 2022

If this goes into the right direction for you I'll put in some more effort and prepare a PR

Sure it's seems fine for me.
I have thought a bit more about features that can be added in the gui :

  • Having the output log display in the GUI -> users can see if there are warning/errors
  • Having all fields values stored in a conf file (or JSON) to prefilled box on next GUI start
  • Add a checkbox to select between v5 or v6 lib format
  • Add a checkbox to use the default path (user/Documents/Kicad/libs/...) to save converted parts. If it's checked, that disable the custom library path

I'm too busy this week to work on the project, but will definitely work on it next week !

@Bouni
Copy link
Contributor Author

Bouni commented May 5, 2022

At the moment it's not possible to have eeschema plugins! That'll com down the road towards V7 but nobody knows when that's the case ...

Good points you got there!
I'll extend this a bit further until you're happy with it.

@github-actions
Copy link

github-actions bot commented Jun 5, 2022

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 5, 2022
@uPesy uPesy removed the Stale label Jun 8, 2022
@Bouni
Copy link
Contributor Author

Bouni commented Jun 9, 2022

I keep working on this but progress is slow (wx sucks to be honest 🙈 )

@uPesy
Copy link
Owner

uPesy commented Jun 9, 2022

Ok
Do you know an alternative GUI lib ? tkinter ?
You use wx in for your plugin right ?

@Bouni
Copy link
Contributor Author

Bouni commented Jun 9, 2022

Tkinter and Qt come to my mind but I've never used one of them before.

Maybe using a TUI is an option, like https://github.com/bczsalba/pytermgui
But I don't know how that works out on different platforms.

And last but with the most work needed, a web API (maybe fastapi) and a Vue frontend that runs in a browser.

Many options, all with their pros and cons.

Creating a nice looking UI in wx is a pain in the rear but might be the easiest way to do it ...

@uPesy
Copy link
Owner

uPesy commented Jun 10, 2022

Creating a nice looking UI in wx is a pain in the rear but might be the easiest way to do it ...

I agree

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jul 11, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@uPesy uPesy reopened this Jul 18, 2022
@github-actions
Copy link

github-actions bot commented Aug 2, 2022

This issue was closed because it has been stalled for 14 days with no activity.

@github-actions github-actions bot closed this as completed Aug 2, 2022
@uPesy uPesy removed the Stale label Aug 2, 2022
@uPesy uPesy reopened this Aug 2, 2022
@github-actions
Copy link

github-actions bot commented Oct 2, 2022

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 2, 2022
@github-actions
Copy link

This issue was closed because it has been stalled for 14 days with no activity.

@hattesen
Copy link

@Bouni, would it not be possible for your kicad-jlcpcb-tools plugin to show a "Fetch EasyEDA model" button next to a JLPCB component, and when pressed call easyeda2kicad.py with appropriate arguments to fetch and convert the EasyEDA model for the component and add to KiCAD libraries?

@Bouni
Copy link
Contributor Author

Bouni commented Jan 20, 2023

@hattesen This might be possible but see it as a future goal and not a simple low hanging fruit type of thing.
Also I would set this back until the schematic API is available in KiCAD because it would make much mor sense to select and download that sort of data whil in the schematic!

@uPesy uPesy reopened this Dec 10, 2023
@markusdd
Copy link

@Bouni maybe you are interested in this:
I made a UI now which makes the process more convenient.

Maybe you guys want to check it? I stepped away from doing it in wxwidgets directly in KiCAD because there is not much gain having it in there, but maintaining it is kind of a nightmare.

https://github.com/markusdd/EasyEDA_to_KiCAD_Lib_UI

I released a first windows build, more to follow.

I have not used easyeda2kicad though but JLC2KiCad_lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed Stale
Projects
None yet
Development

No branches or pull requests

4 participants