-
Notifications
You must be signed in to change notification settings - Fork 479
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
EasyEDA Pro support. #322
Comments
This looks pretty good but a cursory glance didn't reveal any drastic changes from the normal EasyEDA format. Can you summarize the changes? It may be easier to adapt existing easyeda parser included in ibom to read that too. Regarding text, the "text" property only works for KiCad. It relies on "font_data" to know how to draw the characters. Since this is KiCad specific, it's not included in the json schema, you should use "svgpath". Here is relevant schema bit:
|
So just taking another look at the old format after spending a while dealing with the new format. I do definitely see similarities. But without digging into the details of the old format I couldn't really tell you how close it is. One big difference is the source download no longer contains everything you need to construct the board. So instead you need to "save document" which gives you a zip containing several notable files.
The next notable file is the epcb file. This is what you get when you use the download source option. This contains everything you need to construct the PCB except for the actual components themselves. The component data listed in this file just contains component positions, pin>net mappings and various attributes including a device key.
Are you saying I would need to convert the text to SVG format? I don't know about the old format but the new format does not seem to include any svg data for the text. |
I see, so they are saving a few bytes for no good reason.
Yes, old format has text in svg format in field 10 of the text entry
If it's not there anymore then you'll have to generate it using font and text attributes (size, weight etc). You would need a good library, it's not a trivial task. |
Just double-checked but no. This is all you get for text now.
And component designators are similar. They are just added as an attribute on the component.
So that's going to be a lot of fun... There are also a few other things i need to figure out. Like despite everything else working perfectly a couple components in my test case have their silkscreen offset slightly. And a couple components randomly have their pads rotated 90 degrees. I suspect I'm missing some random offsets and rotations somewhere. Heres my test bom if you want to take a look. https://ss.brandon3055.com/346e8 |
There are 2 ways you can go about it. If you use the array of coordinates then you can imitate holes by fracturing the original polygon. In essence it's adding a 0 pixel wide "channel" or extra 2 edges between some vertex of the "hole" and the outer edge. That's how KiCad does it. I could also accept a patch to optionally use the even-odd rule if it makes things easier. The real issue may be that the actual zone fill is not stored in the project/data, only the outline that the user draws. In that case finding actual shape would mean reimplementing the whole zone fill algorithm, that's why zones are not supported in current parser. (Although I don't dismiss the possibility that the data is there and I just missed it).
Current parser supports traces but not zones. Example https://openscopeproject.org/InteractiveHtmlBomDemo/html/2.4G_Telecontrol_Board%20V1.0-PCB.html |
Hmm... Ether I'm doing something wrong or EasyEDA did something to break that because this is what I get when I download and convert that example project. https://oshwlab.com/UserSupport/2-4g_telecontrol_board_v1-0 |
Probably not passing And yes, nets are also not supported in easyeda parser. |
Interesting. Tracks seem to be included by default when generating from the official json format. But even adding |
That's a bug.
You probably didn't turn on tracks in html. The settings are cached so if you previously had the same page opened and it didn't have tracks they won't appear unless manually turned on. |
Good to know. I would probably have been rather confused if one day that bug got fixed and my tracks randomly stopped working xD
That was it. |
I initially came here to ask if someone could add EasyEDA Pro support.
But then I realized, Hay! I'm someone, And I know how to program! (in java)
So for anyone who, like me has been experimenting with EasyEDA Pro. Here you go!
EasyEDA Pro to Json
Though I should warn you its very unpolished, the new easy eda format is rather annoying and I did not have much time to work on this. So I got it to the point where it produces a usable json and for now, that is where it will most likely stay for now.
But while I'm here. Not having text is kinda bothering me. So if anyone can give me an example of a working text element that would be great!
I tried using the example listed here https://github.com/openscopeproject/InteractiveHtmlBom/blob/master/DATAFORMAT.md#text
But the result I get is a completely broken ibom that generates without any errors.
The text was updated successfully, but these errors were encountered: