wokwi / easyeda2kicad

Convert EasyEDA designs to KiCad EDA
https://wokwi.com/tools/easyeda2kicad
Other
285 stars 38 forks source link

new files for schematic support + required changes of existing files #52

Closed yaybee closed 3 years ago

yaybee commented 3 years ago

Hi Uri,

I did some work on the schematic side. In my new branch you find a implementation for the Kicad V6 schematics. I hope you will merge this with your pcb conversion. In de readme you can find some more information. I started this project to get some knowledge of Typescript. Your code helped me a lot, but you will probable see that I am not a professional coder.

It would be nice to make the schematic and pcb work together, but I have not tested it yet.

urish commented 3 years ago

Thank you very much! I'll have a look on Friday.

Meanwhile, I'd love to learn about you: Where are you from? What's your background? What are you working on right now?

yaybee commented 3 years ago

I am from The Netherlands. I used to work in networking as a network designer and later as a product owner. End last year I went with retirement, so during the winter I have some spare time to work on hobbies like electronics and programming (including Arduino & ESP). Note: your new strictNullChecks gave me some problems and I have solved it the quick way with some if statements. Please correct it if you can make it simpler.

urish commented 3 years ago

Nice to meet you :-)
You are invited to hop on our discord server. People like you are what we need!

Note: your new strictNullChecks gave me some problems and I have solved it the quick way with some if statements. Please correct it if you can make it simpler.

Yes, they usually require if() to check for null/undefined values. In many cases, the optional chaining operator can do the work for you.

urish commented 3 years ago

Thanks again for spending the time to work in this PR! It seems like you worked hard on this one :-)

What's the reason for including formatting (e.g. _LF_, _LF1_, etc). in the spectra files? Does KiCad require these newlines to parse the file?

yaybee commented 3 years ago

Hi Uri,

The formatting of the output helps to view the generated output in relation to the files generated with native Kicad during the reverse engineering process. It also solves the reported 1M character line limit of Kicad. So I created some unique strings in the output and spectra converts them into linefeeds (LF) with optional indentation (LF1) in the function encodeObject. I hope you try it out and give me a feedback on the quality of the code. I would like to see a webbased implementation, but that is out of scope for me at the moment. Maybe I have a go at the Image conversion, but only for the node.js way of the conversion.

At the moment I try to make component independent symbols in the schematic conversion. It seems I hit some bugs in Kicad that prevent an easy implementation. The big issue is the creation of one symbol for the four possible rotation states of a symbol. The current development version can create shared symbols, but only for symbols with the same rotation angle.

Op za 20 feb. 2021 om 23:14 schreef Uri Shaked notifications@github.com:

Thanks again for spending the time to work in this PR! It seems like you worked hard on this one :-)

What's the reason for including formatting (e.g. LF, LF1, etc). in the spectra files? Does KiCad require these newlines to parse the file?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wokwi/easyeda2kicad/pull/52#issuecomment-782757478, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASYBMPY5VWIDAVK5P4LBN3TTAAX4VANCNFSM4XHPYNEQ .