Giter Club home page Giter Club logo

bxlsharp's People

Contributors

issus avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

bxlsharp's Issues

The footprint package is often in the BXL file but not used

Starting from the Component in the BXL fileallows you to get something resembling a package name (sometimes) from the Component.PatternName which is the footprint name I believe. I've seen a lot that use that to indicate the packaging type, but I think it's something the person that designed has to set, in some cases it's not that useful.

If there is something in the PatternName field, it should be added as a property to the footprint (Pattern) as a new property called PackageName.

Doesn't handle many Microchip provided Ultralibrarian files

Many symbols from Microchip are not parsed correctly, which causes them not to show any pin labels.

We can open a bxl package and look at the pins with:

var data = BxlDocument.ReadFromFile(fileName, BxlFileType.FromExtension, out var logs);

            var result = new List<Package>();

            foreach (var symbol in data.Symbols)
            {
                var package = new Package(symbol.Name);

                package.Pins.AddRange(
                    symbol.Data
                        .Where(d => d is LibPin && 
                            (d as LibPin).Name.Text.ToUpperInvariant() != "NC" &&
                            (d as LibPin).Name.Text.ToUpperInvariant() != "DNC")
                        .Select(d => d as LibPin)
                        .Select(d => new Pin(d.Designator.Text, d.Name.Text))
                    );

                result.Add(package);
            }

Example file: PIC18C452-X_P and many others in https://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en537519
(PIC18 CAD/CAE Schematic Symbols @ https://www.microchip.com/development-tools/reference-designs/cad-cae-symbols if that link does not work)

This shows the pins with numbers, but with no name.

This is because BXL files are not always consistent apparently. They can sometimes have the name on the Component rather than the symbol pin.

Currently, the way we read pins is:

  • iterate over the Components
  • then to get the symbols, iterate the Component's AttachedSymbols

So as it's a nested loop, for those cases where the pin has no name you could fall back to the Component's Pins

I think it can get the proper pin matching the Symbol's Pin PinNum with the Component's Pin SymPinNum, the descriptor should match but I wouldn't bet on that for all cases.

component.Pins.First(compPin => p.SymPinNum == pin.PinNum)

If the current method does not have a value for the Name property, it should try to match as above.

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.