Giter Site home page Giter Site logo

Comments (24)

jnavila avatar jnavila commented on June 6, 2024

I've started having a look at supporting the new format. This will take some time.

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

By the way, the new format comes with the new version of Kicad which will be scriptable, make basically plotkicadsch useless.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

What do you mean by scriptable? Do you think it is possible to generate a schematic image with python as we print layouts?
If this is is true, I think we should do something to add this on Kidiff too. Then the tool will be complete.

But I think this will take a long time to be implemented/available. v6 will have pretty limited support for eeschema in python and the whole library was pushed to v7. And you know how long these versions of Kicad take to be released. We can add 1,5 years at least.

I think the suggestion here is valid since Kicad 5.1.9 is already generating kicad_sch files.

How hard would be to implements this @jnavila? I am not sure how this is done here, I am assuming it is not hard. But I can be wrong.

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

But I think this will take a long time to be implemented/available. v6 will have pretty limited support for eeschema in python and the whole library was pushed to v7. And you know how long these versions of Kicad take to be released. We can add 1,5 years at least.

Yes, I may have been too optimistic...

For the new kicad_sch file format, I'm working on it, but the lack of clear specification of the format is a big road block. The specification document no longer reflects the actual format. The format is full of unused features and I don't have a lot of spare time to sort out what's actually useful so it's going to take some time. But I'm not overly pessimistic, because from what I see, only the fields needed to draw the same primitives as the old format are actually used.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

Good to know.

I came here to say that if we could find something that converts this new format to the old format we could use it as the initial way to make it work for both formats. But I am not sure this exists.

Also, I am not sure, but I think Kicad 5.1.9 is generating both formats at once.

I have a small board that has these 2 files, I am linking here for reference in case you need to check something inside. I believe both are in sync with each other.
https://github.com/leoheck/assoc-board/blob/main/board.sch
https://github.com/leoheck/assoc-board/blob/main/board.kicad_sch

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

The format is full of unused features and I don't have a lot of spare time to sort out what's actually useful so it's going to take some time.

I could try to find projects with the new format then we could use them as starting point to have this new feature implemented? I am eager to move my projects to Kicad 6 (or 5.99) since this is a completely new world full of good features.

What do you think?
Do you have a branch with the current work?

This new branch could add a flag to enable this new format/parser while it is a work in progress... then users could bring new issues as they will be appearing, instead of providing a fully working parser all at once.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

Some examples here https://gitlab.com/search?search=kicad_sch&group_id=6593436&project_id=15502567&scope=&search_code=true&snippets=false&repository_ref=master&nav_source=navbar

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

Here it is: https://github.com/jnavila/plotkicadsch/tree/new_kicad

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

Nice, thank you. Found this now, in case someone is interested: eeschema_schematic_file_format_EN.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

@jnavila I tested this when you shared this 3 days ago and it I thought I saw it working but now it is not creating anything on a simple board that I am using to test. Does this feature need to be activated with a flag?

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

For now, I haven't finished yet the parser, so, yes... It does not produce anything.

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

Please note also that the new format has more than just the file format. There's no longer need for a cache library, because the cache is embedded in each file. OTOH, the annotation of parts is no longer contained in the schematic file but is available in the ".kicad_pro" file (if I understood correctly). So that is a completely different processing of files.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

Indeed, this new file ends with the cache-lib which is better.
For the annotation, I am not sure this happens.
I created one project here with a single component. One resistor R1.

I could only see references to R1 in .kicad_pcb and .kicad_sch as you can see

kicad-v6-project on  master took 4s 
➜ grep R1 -R *                 
board.kicad_pcb:  (net 1 "unconnected-(R1-Pad1)")
board.kicad_pcb:  (net 2 "unconnected-(R1-Pad2)")
board.kicad_pcb:    (fp_text reference "R1" (at 0 -1.27) (layer "F.SilkS")
board.kicad_pcb:      (net 1 "unconnected-(R1-Pad1)") (pintype "passive") (tstamp 00d8cf93-ce0c-4c2b-9990-7e3df08bbc91))
board.kicad_pcb:      (net 2 "unconnected-(R1-Pad2)") (pintype "passive") (tstamp a1ee7c76-d7bd-48a2-8ac7-c25f87091595))
board.kicad_sch:    (property "Reference" "R1" (id 0) (at 157.9881 97.6641 0)
board.kicad_sch:      (reference "R1") (unit 1) (value "100") (footprint "Resistor_SMD:R_0201_0603Metric")

kicad-v6-project on  master 
➜ ls
board-backups  board.kicad_pcb  board.kicad_prl  board.kicad_pro  board.kicad_sch  fp-info-cache 

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

I recall badly. Annotations are in the root schematic. Here is the link: https://forum.kicad.info/t/kicad-nightly-v5-99-new-schematic-and-symbol-library-file-formats-are-now-the-default/22655 . See the 5th point

from plotkicadsch.

Gasman2014 avatar Gasman2014 commented on June 6, 2024

I did ask about eeschema scripting a while back on the forum. I was told that this is still planned for version 6 according to @craftyjon.

from plotkicadsch.

craftyjon avatar craftyjon commented on June 6, 2024

It is still planned for V6 although I don't have any updates on timelines yet. I would assume that it may take some iteration to get everything into the new API that is needed, so I don't think it will instantly make tools that parse the schematic files directly obsolete.

Also, I am not sure, but I think Kicad 5.1.9 is generating both formats at once.

This is not true, the new file format is only in 5.99 (future 6.0). If you see both files, it's likely because you have 5.99 installed next to 5.1 and you opened an existing project and saved: this will result in 5.99 saving the kicad_sch files next to the old sch files.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

Yeah, this seems correct. I might have ran both stable and nightly version of the Kicad in the same project and then I had the wrong conclusion.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

A note from a Kicad dev
https://forum.kicad.info/t/attention-python-devs-6-0-api-and-plugin-repository-info/32035

It looks like we are not going to have a way to export .kicad_sch to .svg soon on Kicad.
Having plotkicadsch updated for Kicad 6.0 would be awesome!

@jnavila thoughts?

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

I am linking here the work in progress of this new sexpr-schematic
https://dev-docs.kicad.org/en/file-formats/sexpr-schematic/

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

Thanks for the heads up. I'll try to get this working by the time the version 6.0 is out.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

Nice, if there is anything that I can do to help you. maybe testing current work.. let me know.

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

An interesting observation here is that if plotgitsch is going to support Kicad-v6, then it would be good that the support of Kicad-v5 still remains in the same tool. Since we are going to see some migrations from 5 to 6, and it will be possible to compare different versions of the schematics during this migration to the new format.

from plotkicadsch.

jnavila avatar jnavila commented on June 6, 2024

I was planning to keep the V5 in the tool. But, allowing a comparison between V5 and V6 is another story. The filenames are changed so the filename matching needs to be generalized. I'm still struggling with the parser...

from plotkicadsch.

leoheck avatar leoheck commented on June 6, 2024

from plotkicadsch.

Related Issues (20)

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.