Git Product home page Git Product logo

Comments (18)

juulsA avatar juulsA commented on May 28, 2024

Sorry for my late response ... no, the script does not change the allegro file.

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

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?

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

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 ...

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

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.

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

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.

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

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.

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

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

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

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?

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

Check out my latest commit. It supports the export of the inner layers.

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

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

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

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 ....

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

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!

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

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

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

I would put the file up but github doesnt support the file type.

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

Can you put everything in a zip-folder?

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

Sample.zip

from exportjson.

juulsA avatar juulsA commented on May 28, 2024

Please check out my latest commit. It should be working now.

from exportjson.

ankithjv avatar ankithjv commented on May 28, 2024

It worked thank you!

from exportjson.

Related Issues (11)

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.