juulsa / exportjson Goto Github PK
View Code? Open in Web Editor NEWSkill script for Allegro PCB designer, which generates a JSON representation of the board.
License: MIT License
Skill script for Allegro PCB designer, which generates a JSON representation of the board.
License: MIT License
Is there anyway I could run a command on windows command prompt to export the json? The export to html in one step code you had. Where do I put that?
1、it can't export boardGeometry\silkscreen_top(silkscreen_bottom) with text element
2、the exported silkscreen layer with solid shape only display the shape's outline
3、the exported assemble layer with shape doesn‘t display
> Sry for my late response ... I never had the chance to check that, so this was an approach for users using older files, but I think you're right, the mapping should not be dependent of the version... it's on my list, thanks!
Thank you for your update. When converting to ibom, I have another issue: for lower versions of outline and cutout, if they are drawn using line segments or arcs (not shape types), these elements do not appear in the exported ibom.
Originally posted by @Jinying-Tang in #14 (comment)
Hello @juulsA !
Is it possible to process and output to json not only lines but also shapes that are drawn at silkscreen layers?
Is it possible to include BOARD GEOMETRY/SILKSCREEN_TOP
BOARD GEOMETRY/SILKSCREEN_BOTTOM
to export?
Hello @juulsA ! Thanks for a great script!
I try to use it with my boards, I work with 22.1HF005. There is a bug I think. If there are any graphics at the Board geometry/Cutout subclass the json file can not be parsed by the python script. Says something like this:
d:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom>python generate_interactive_bom.py AD-FMComms3_revA.json
Loading AD-FMComms3_revA.json
2023-10-27 19:57:01,267 INFO Successfully parsed d:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\AD-FMComms3_revA.json
Traceback (most recent call last):
File "d:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\generate_interactive_bom.py", line 84, in <module>
main()
File "d:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\generate_interactive_bom.py", line 77, in main
ibom.main(parser, config, logger)
File "D:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\core\ibom.py", line 327, in main
pcbdata, components = parser.parse()
^^^^^^^^^^^^^^
File "D:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\ecad\genericjson.py", line 149, in parse
self.add_drawing_bounding_box(drawing, board_outline_bbox)
File "D:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\ecad\common.py", line 136, in add_drawing_bounding_box
{
File "D:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\ecad\common.py", line 134, in add_arc
bbox.add_svgpath(svgpath, width, self.logger)
File "D:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\ecad\common.py", line 237, in add_svgpath
for segment in parse_path(svgpath, logger):
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\ecad\svgpath.py", line 507, in parse_path
Arc(current_pos, radius, rotation, arc, sweep, end))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom\ecad\svgpath.py", line 131, in __init__
assert start != end
^^^^^^^^^^^^
AssertionError
Is it possible to fix it? I saw another issue where you recommend to comment a line with Cutout subclass. Is it a recommended workaround?
Hi:
I want to convert an allegro .brd file to json after converting to ibom, but I get the following error:
Command > exportJson
W- WARNING No variant.lst found, exporting entire design ...
CDS version: 16.600000
E- Error difference: can't handle (nil - 0.0)
Command > exportJson( ?excludeDNP t )
E- Command not found: exportJson( ?excludeDNP t )
I am not skilled in allegro, please advise how to solve this error, thank you!
Hello again!
I was testing your script and found out that it does not export thieving groups. I assume that you know that in Allegro thieving is a via with some padstack shape without drill. Is it possible to add thieving export? On some boards such things cover lots of board area.
Thanks for your work!
Hello,
we tried your script which is working though we could not add extra fields to the .json file for example "Part number", is it possible?
You show a AD-FMComms3_revA.BRD file, from this we could export .json file which contain extra fields like:
"extra_fields": {
"VALUE": "LNJ308G8TRA (green)",
"TOL": "N/A",
"SCH_MODIFIED_PART": "TRUE",
"PART_NAME": "DIOLED",
"PARENT_PPT_PART": "DIOLED_SM-LNJ308G8TRA (GREEN),4V,N/A,E006239,LED0603",
"PARENT_PPT": "DIOLED",
"PARENT_PART_TYPE": "DIOLED_SM"
But if we try using your script on our .brd file than the .json file doesn't contain any extra fields only
"VALUE": "2.6 mm furat",
"PART_NAME": "PAD"
Could you give us some help what we have to change on export or Allegro netlist generation or something like another file?
Or maybe the problem is that we have exactly OrCAD PCB Designer Professional?
Thank you.
And again thank you very much for your script!
There is another glitch I found I think.
Shapes with "dummy nets" from etch are exported but lines are not. Is it possible to add them to export? I have some text made with lines of dummy net, it would be great to have it exported to graphics.
Does this change the alegro file it is exporting too?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.