Closed ankithjv closed 1 year ago
Sorry for my late response ... no, the script does not change the allegro file.
thank you! Is there a way for me to change the script so the json that gets outputted includes all of the inner layers as well, not just the front and back?
Theoretically you could changed it this way, but I'm not sure, if the interactive html bom supports this ... To do so, you have to expand the case statement and append the copper to the correct position afterwards ...
can you give a little bit more guidance? How should I change the case statement and where do I append the copper? Sorry for the inconvenience.
You should first verify, that the interactive html bom does support displaying the inner layers ... I don't want to say something wrong, but the time I wrote the script, it did not! If the ibom supports it, I think I would implement this feature anyway.
The ibom doesn't currently feature inner layers however I am thinking of adding the support myself. I also found another hard fork that does implement the extra layers (Written for Eagle CAD but I think I can make it work with json). The allegro skill script is just Mandarin to me so the json conversion is tough.
Ok, but I can only recommend you to try to understand what is happening here, although I know it is not easy the first time ...
The "only" thing you have to do is, to fit the addCopper()
procecdure to your needs. And at this moment I see, that my code could run a lot faster, because the inner layers are already parsed, but not stored ...
So any time there is a case( child->layer ...
loop you need to add code to the t
case, which is whenever the copper is not on top or bottom or you could eliminate the whole case
loop and do the storing of the elements more dynamically, what is the best solution I think, because the number of layers can be different.
I would suggest to to declare two tables, one for the tracks and one for the zones. This is done by:
tracks = makeTable( "tracks" nil )
zones = makeTable( "zones" nil )
In the following you have to assign parsed elements depending on their layers (this needs to be done for the zones as well):
if( tracks[ child->layer ] then ; checks, if the list exists
tconc( tracks[child->layer] track ) ; appends the track to the list
else
tracks[child->layer] = tconc( nil track ) ; creates a new list
)
At the end you have to loop over all layers layers = tracks->?
and build the json string as I did in line 2090 to 2144
I have almost finished what you need, because I think this makes my code more "elegant". The only questions is, what is the naming convention for the inner layers?
Check out my latest commit. It supports the export of the inner layers.
thank you so much I appreciate it! Will this still work for the existing ibom? This is the hard fork I am going to use ----- > https://github.com/oceanofthelost/InteractivePCB
If you don't pass exportInnerLayers t
it is the normal export, without the inner layers.
This is the hard fork I am going to use ----- > https://github.com/oceanofthelost/InteractivePCB
I already looked it up, unfortunately there is no "rendered" demo ... so I can't imagine how it looks ....
okay thanks again, I can probably edit ibom to allow for inner layer integration if https://github.com/oceanofthelost/InteractivePCB doesn't work out. Will let you know how it goes thanks again!
I am getting this error when exporting and resulted in an empty json Error eval: unbound variable - indentedStrings. What do yo uthink is the issue because I saw the code and it looked like you handled it? Only for one file
I would put the file up but github doesnt support the file type.
Can you put everything in a zip-folder?
Please check out my latest commit. It should be working now.
It worked thank you!
Does this change the alegro file it is exporting too?