Comments (2)
So, I went a little bit more deep in the file format. I think that the string reader for this section (SectionKeys) would be different from the string reader used in other places in the same PCB lib.
Take a look at the attached screenshot. It is the raw stream from the previous library for the SectionKeys stream.
The Int32 data read at offset 4 is the lenght of the following block, but the following 0x20 is not a blankspace, it is the string lenght instead, similarly to what the do in the raw Pin representation on the Schlib for the pin name, designator and Swap ID.
To summarize, the problems I see are two.
- a raw char indicating the string lenght is taken as part of the string for both the libref and sectionkey read from this stream (in the beginning of the string).
- the last char is dropped because it's taken as the string is 0 terminated while it is not.
I still didn't go as deep in your code to suggest how to edit it, or send you a PR yet, but I hope it was more clear to you what I see.
from altiumsharp.
What the library is doing at the moment is that it is starting reading the string at offset 8 (taking a whitespace in the beginning, you can notice that in the picture of the first comment) until offset 0x29 (reading 33 bytes) and then dropping the last one since it is assumed the string would be 0 terminated, leaving the string as VERY_LONG_USEFUL_FOOTPRINT_NAME
without the number 1 at the end, with a whitespace in the beginning of the string.
from altiumsharp.
Related Issues (12)
- Add name to license HOT 1
- Pad designators too big when rendering big components with small pins HOT 1
- System.FormatException : Input string was not in a correct format HOT 3
- usage of AltiumSharp as an bridge to EasyEDA HOT 5
- Read PCB footprint error HOT 7
- Support PinTextData R/W
- IndexOutOfRangeException: Read past the end of the block HOT 4
- Dependency on System.Drawing.Common
- Footprint rename
- how to produce gerber files with with library
- How to Read PcbDoc Files Using AltiumSharp
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from altiumsharp.