-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fileformat: BVR3 #224
Comments
What's the first line in the BVR file? I'm guessing it'll be a BVR3 version file, as opposed to BVR1 that OBV currently has implemented. BVR3 needs to be ported over but there's other items in my queue that I have to sort out first. |
Example file: 820-02020_V1.0.bvr |
Yes, that's a version-3 BVR file, likewise will be the case with the 820-02016 board and any other new ones that come out. BVR (v3) is in FlexBV currently but needs to be backported to OBV, or someone else can write their own decoder for OBV ( it's relatively trivial, BVR v3 is explicitly verbose in order to make parsing extremely simple ) |
Will it be supported in the future? |
I dare say it will be, yes. Just a case of finding the time to do it ( I'm busy working on Teboview currently ) |
Ok thanks for your help so far :) |
I was trying to access the exact same BV3 file yesterday for the A2338 MacBook Pro, but didn't want to purchase FlexBV just to open a single board. After reading the comments here, then comparing the BVR3 file with a BVR1 file to understand the format, I thought I would try to write a decoder for BVR3. I'm pleased to say that I was successful and have been able to open this BVR3 file and see the board. All the parts and pins appear to be loaded perfectly, but I have come across an issue with the board outline ('format' in BRDFile). You can see the extent of the issue by checking the screenshot of OBV below and then comparing against a physical PCB photo from iFixit: The board outline is defined at the end of the BVR3 file with the prefix "OUTLINE_SEGMENTED". I'm unsure of the format of this but it appears to be a set of points in the style "x1 y1 x2 y2 x3 y3...", so that is how the code is currently parsing them. This can't be far off because the board outline is largely correct, but something is clearly not right. I have noticed that under this format assumption, the outline path seems to return to previously visited points frequently, which is something I am yet to understand fully. Here's a snippet of the problematic section of the file: I don't have a copy of FlexBV but if anyone does, I would appreciate it if they could open the above BVR3 file in that to see what the outline of the board looks like, and ideally posting a screenshot. I'm assuming the problem is with my understanding of this section of the file, but there is an outside chance it's actually an error in the original file and the board will look the same in FlexBV. I'd like to get this issue resolved before raising a PR. If anyone is interested the code for this change is currently in a branch here: https://github.com/Tedworthy/OpenBoardView/tree/bvr3-file-format. Anyone wanting to view BVR3 files with OBV can check this out and compile their own version of OBV with this capability, as everything else is functional, it's only the outline of the board is likely to be incorrect. The instructions for doing so in the readme are really straightforward. |
The outlines are segments ( x1,y1 - x2, y2 ) and not gauranteed to be sequential in outline traversal. You'll need to update the board outline function to have a segmented mode or you can write a sequencer that'll take the array of point pairs and sequence them by looking for the next pair that has the closest end point and merging them in to a sequential generic poly. |
Thanks so much for that, the data certainly makes a lot more sense now. I will update the code to reflect that approach and raise a PR if all is successful. |
@Tedworthy I have installed your application (build/run was successful) ... when I open a file with format ".BVR" I still get the error message "unrecognized file format". |
@HeyWatchOutDude OK, did you take the code from the branch bvr3-file-format? Regardless, let me know which board file you're trying to open and I'll give it a go myself. Would be a useful test case as I've only checked a single file so far. |
For anyone who is interested, I've managed to get the outlines to work perfectly as far as I can see from testing. I have therefore raised a PR: #236 |
@Tedworthy I have used the following file "820-02020.bvr" (A2338 | MacBook Pro M1) |
@HeyWatchOutDude OK that's the same file I was using, and I can confirm it opens fine. I'm not sure where things are going wrong but it sounds most likely that the OBV version you're using does not contain the BVR3 code. I suggest you go to https://github.com/Tedworthy/OpenBoardView/tree/bvr3-file-format and make sure you have downloaded or cloned that particular branch. You will know you have got the correct code if you can find the file src/openboardview/FileFormats/BVR3File.cpp. Then build using build.sh and run the resulting executable, and that version will successfully open that board file. |
@inflex Could you possibly help me understand a few more things about the BVR3 format please? Most of these are off the back of comments in the PR above.
|
@Tedworthy could you please provide me your .bvr file, maybe mine is bad? |
@HeyWatchOutDude I got mine from the Badcaps forum. I don't want to attach the file here just in case of copyright issues, but if you search 'badcaps 820-02020' in Google, the first result is the thread, and somebody attaches the board about halfway down the first page. |
Not actually sure why they're there. They're not part of the format; however they're rather "harmless" as it were as they do not interfere with the decoding.
O = both. Aside from that, nothing else.
That's used if the pin placements are defined as part of a package, so the actual locations will need to be relative to the PART_ORIGIN. In the current BVR files this isn't really used. It's more of a "future thing".
As above.
Future planning. I'm presuming you're just filtering through a FlexBV binary to see the various tags? There'll likely also be a few deprecated or defunct ones too. |
@inflex Thanks a lot for that info, much appreciated. We were actually just going through various BVR3 board files from Badcaps testing the parsing code and checking the meanings of the tags, as part of the PR I raised. I'll update the code to handle the O/both case on part and pin side, and will make comments against the other tags in the parsing code for future reference. |
@Tedworthy Hello! I already downloaded your modification but I don't know how to build the app. Could you provide me with the exe already made? Or explain to me how can I do it? Thanks |
Hi,
is the ".BVR" format not supported by the "OBV" software?
Cant open it.
The text was updated successfully, but these errors were encountered: