Git Product home page Git Product logo

Comments (9)

bennymeg avatar bennymeg commented on July 26, 2024

Could you please test again with the latest release.

from jlc-plugin-for-kicad.

CreativeRobotics avatar CreativeRobotics commented on July 26, 2024

I just installed the latest release and now BOM and position generation is broken when "exclude DNP.." is selected.

from jlc-plugin-for-kicad.

fh-nbt avatar fh-nbt commented on July 26, 2024

Can confirm the same on my machine and setup. No BOM or position files are being generated.
Win11
Kicad 8.1
Fabrication-Toolkit 4.30

from jlc-plugin-for-kicad.

bennymeg avatar bennymeg commented on July 26, 2024

Does some part get excluded or the entire files do not get generated?
Could you please test again with the 4.4.0 pre-release.

from jlc-plugin-for-kicad.

fh-nbt avatar fh-nbt commented on July 26, 2024

Unfortunately, I only get the following outputs on the 4.4 pre-release:

  • gerber.zip
  • netlist.ipc
  • designators.csv

Just to check and be sure, I went back to 4.0 and there I still get the BOM output.

from jlc-plugin-for-kicad.

bennymeg avatar bennymeg commented on July 26, 2024

I traced the bug to here: #128
The added condition seems to misbehave, some more exploration needed.

from jlc-plugin-for-kicad.

msalau avatar msalau commented on July 26, 2024

@bennymeg
I traced the issue to the commit 88ae87b

            skip_footprint = ((footprint.GetAttributes() & pcbnew.FP_EXCLUDE_FROM_POS_FILES)
                                or footprint.GetPadCount() == 0
                                or exclude_dnp
                                    and (footprint_has_field(footprint, 'dnp')
                                        or (footprint.GetValue().upper() == 'DNP')
                                        or getattr(footprint, 'IsDNP', bool))
            )

The issues I see:

  1. getattr(footprint, 'IsDNP', bool) is not called anymore. It was getattr(footprint, 'IsDNP', bool)() but became getattr(footprint, 'IsDNP', bool) and since it is a function reference and is not None - it evaluates to True
  2. not enough parentheses

How to fix:

            skip_footprint = ((footprint.GetAttributes() & pcbnew.FP_EXCLUDE_FROM_POS_FILES)
                                or footprint.GetPadCount() == 0
                                or (exclude_dnp
                                    and ((footprint_has_field(footprint, 'dnp')
                                        or (footprint.GetValue().upper() == 'DNP')
                                        or getattr(footprint, 'IsDNP', bool)())))
            )

I've tested the fix on KiCAD v8.01 with the plugin 4.3.0 + fixes.

In the master branch the fix should look like below:
https://github.com/bennymeg/Fabrication-Toolkit/blob/master/plugins/process.py#L162

            is_dnp = (footprint_has_field(footprint, 'dnp') 
                      or (footprint.GetValue().upper() == 'DNP') 
                      or getattr(footprint, 'IsDNP', bool)())

I.e. add parentheses to call the function returned by getattr()

from jlc-plugin-for-kicad.

bennymeg avatar bennymeg commented on July 26, 2024

Thank you @msalau, I'll fix it.

from jlc-plugin-for-kicad.

bennymeg avatar bennymeg commented on July 26, 2024

Fixed in v4.4.1

from jlc-plugin-for-kicad.

Related Issues (20)

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.