Git Product home page Git Product logo

Comments (10)

juulsA avatar juulsA commented on May 24, 2024

Hi,
I'm glad you like it!
I'm still working with 17.4 (but upgrading to 23.1 soon), in my case the cutouts were always parsed correctly ... so maybe the script is not working with 22.1 or - as you mentioned - there is a bug.

Do you use the latest version of the interactiveHtmlBom?
Could you share the .brd file (exported for 17.4), this would be much easier for me to debug it?

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?

Normally the script should work without any workarounds ... and yes, I think we should be able to fix it.

from exportjson.

karlsonrwa avatar karlsonrwa commented on May 24, 2024

Hi, I'm glad you like it! I'm still working with 17.4 (but upgrading to 23.1 soon), in my case the cutouts were always parsed correctly ... so maybe the script is not working with 22.1 or - as you mentioned - there is a bug.

I tried 17.4HF036 - the same issue with cutouts.

Do you use the latest version of the interactiveHtmlBom? Could you share the .brd file (exported for 17.4), this would be much easier for me to debug it?

Yes, I use the latest version, I've checked. In my case your demo board does not work as expected. You simply use "Shape add circle", select board geometry\cutout set it to unfilled and draw anywhere inside a design space, even outside a design outline.

My current python is:
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32

Packages I have:

C:\Users\Karlson>python -m pip list
Package            Version
------------------ ------------------------
attrdict3          2.0.2
attrs              23.1.0
certifi            2023.5.7
charset-normalizer 3.1.0
idna               3.4
jsonschema         4.17.3
numpy              1.25.0rc1
Pillow             9.5.0
pip                23.1.2
pyrsistent         0.19.3
requests           2.31.0
setuptools         65.5.0
six                1.16.0
urllib3            2.0.3
wheel              0.40.0
wxPython           4.2.1a1.dev5584+54b5aa71

from exportjson.

karlsonrwa avatar karlsonrwa commented on May 24, 2024

Hm, updated to

C:\Users\Karlson> pip list
Package                   Version
------------------------- ---------
attrdict3                 2.0.2
attrs                     23.1.0
certifi                   2023.7.22
charset-normalizer        3.3.1
idna                      3.4
jsonschema                4.19.1
jsonschema-specifications 2023.7.1
numpy                     1.26.1
Pillow                    10.1.0
pip                       23.3.1
pyrsistent                0.20.0
referencing               0.30.2
requests                  2.31.0
rpds-py                   0.10.6
setuptools                65.5.0
six                       1.16.0
urllib3                   2.0.7
wheel                     0.40.0
wxPython                  4.2.1

Issue is the same:

d:\Projects\OrCAD\Scripts\InteractiveHtmlBom\InteractiveHtmlBom>python generate_interactive_bom.py AD-FMComms3_revA.json
Loading AD-FMComms3_revA.json
2023-10-28 14:59:19,028 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

Here is my json:
AD-FMComms3_revA.json

Updated to python 3.12.0, issue is the same.

from exportjson.

juulsA avatar juulsA commented on May 24, 2024

Ok, thanks for sharing the .json. As you assumed, this has to be a bug in the script, but please be patient, I can't look into this until the end of next week ...

from exportjson.

juulsA avatar juulsA commented on May 24, 2024

I don't know if it helps at the moment, but this problem only occurs when using a full arc ... when I draw a rectangle it seems to work ...

from exportjson.

juulsA avatar juulsA commented on May 24, 2024

I reported this issue here, because I'm not sure if it is really a problem with the script or the parser ...

from exportjson.

karlsonrwa avatar karlsonrwa commented on May 24, 2024

Thank you very much for your time @juulsA ! I saw answer at the iBOM repository. I see what's wrong right now and I can live with that. Of course, if you fix this bug in future it would be very nice!

from exportjson.

juulsA avatar juulsA commented on May 24, 2024

No problem! It's on my list, I think next week I'll have a fix for this!

from exportjson.

juulsA avatar juulsA commented on May 24, 2024

Please check again with my last commit, it should be working now ...

from exportjson.

karlsonrwa avatar karlsonrwa commented on May 24, 2024

Yes, circle cutouts are exported fine! Thank you very much for you work! It helps a lot!

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.