Minor bfc problem in some parts


Minor bfc problem in some parts
#1
Hi all,

I noticed in e.g. 4019.dat lines, like:

0 BFC CERTIFY INVERTNEXT

when investigating a render glitch in my editor, it doesn't expect the CERTIFY token because I was under the impression it's not permitted in this case, confirming:

http://www.ldraw.org/Article415.html

I will loosen the parser, but the library reviewers might want to correct this for the next release.
Reply
Re: Minor bfc problem in some parts
#2
I think you are right to notice this as an exception to the specification - "0 BFC INVERTNEXT" should be sufficient. FWIW, LDView also flags these lines as "CERTIFY command after other BFC" warnings, and seems to figure it out and render as intended.
Reply
4019.dat
#3
4019.dat seems to me to be the only currently official part having this bug.

We took care of many others already, but this one has slipped through.

I'll send that file to Chris for uploading to the PT to let it get fixed.

In your parser, you anyway need a concept of "errors vs. warnings".

For example, when a file lacks its trailing CRLF, you could give up completely,
but that will not be very useful.
Issuing a warning in that case, like a computer language compiler does,
is the right thing to do.

Optionally, you can give your parser an option "treat warnings as errors",
which will harden its warning level.

Thanks for finding that part, which has slipped through!
Reply
Re: 4019.dat
#4
sent that file to Chris for uploading to PT
Reply
Re: 4019.dat
#5
Actually there are some more, if you do a quick grep it will find:

273.dat
30094.dat
3842a.dat
3842b.dat
4019.dat
40378.dat
47405.dat
48724.dat
52036.dat
55423.dat
6574.dat
2739as01.dat
2739bs01.dat
3068as01.dat

I've changed the parser to look at any occurrence of "INVERTNEXT" instead of checking the first token after "BFC" only. It will issue a warning when it's not the first (and only one) now.


My app logs errors and warnings when a recoverable problem is found, like so:

Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\3702.dat | line 16 | Reference "STUD3A.DAT" case mismatch, should be "stud3a.dat".
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\3702.dat | line 18 | Reference "STUD3A.DAT" case mismatch, should be "stud3a.dat".
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\3702.dat | line 64 | Reference "2-4cyli.DAT" case mismatch, should be "2-4cyli.dat".
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\752.dat | line 29 | Matrix has been corrected due to an invalid determinant.
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\752.dat | line 30 | Matrix has been corrected due to an invalid determinant.
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\3650a.dat | line 42 | Quad is twisted but could be corrected.
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\3650a.dat | line 43 | Quad is twisted but could be corrected.
Warning | render prep | C:\Program Files (x86)\ldraw\parts\3404.dat | Subfile BFC processing canceled due to dependency on subfile without BFC information, caused by "C:\Program Files (x86)\ldraw\p\48\4-4edge.dat". Dual lighting will be used for entire tree.
Warning | render prep | C:\Program Files (x86)\ldraw\parts\3403.dat | Subfile BFC processing canceled due to dependency on subfile without BFC information, caused by "C:\Program Files (x86)\ldraw\p\48\4-4edge.dat". Dual lighting will be used for entire tree.
Error | LDraw file load | C:\Program Files (x86)\ldraw\parts\6252.dat | line 698 | Duplicate point in line definition, line will not be used.
Error | LDraw file load | C:\Program Files (x86)\ldraw\parts\6252.dat | line 699 | Duplicate point in line definition, line will not be used.
Error | LDraw file load | C:\Program Files (x86)\ldraw\parts\6252.dat | line 701 | Multiple duplicate points in quad definition, quad will not be used.
Error | LDraw file load | C:\Program Files (x86)\ldraw\parts\6252.dat | line 702 | Multiple duplicate points in quad definition, quad will not be used.
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\2546.dat | line 80 | Quad is not flat, it will be split into two triangles.
Warning | LDraw file load | C:\Program Files (x86)\ldraw\parts\2546.dat | line 81 | Quad is not flat, it will be split into two triangles.


I'm afraid ridding the official library of all warnings might be a huge job, but most are recoverable problems though.
Reply
you are right, my error
#6
You are right.
When posting the above, I had accidentially caught the wrong local folder 8-)
I grepped again and additionally found

S\2739as01.dat
S\2739bs01.dat
S\3068as01.dat

Ironing these glitches out can be done, we already have fixed many other issues in the library.
Examples are:
- erroneous use of plastic color "dark grey" for metal parts
- BFC errors
- syntax errors
etc.

The list of official files which contain BFC CERTIFY INVERTNEXT is fortunately quite short.
Do you want to fix the problems and send the files to Chris for uploading to the PT?
Reply
Re: you are right, my error
#7
Steffen Wrote:
-------------------------------------------------------
> Do you want to fix the problems and send the files
> to Chris for uploading to the PT?

I have never worked with the tracker, just thought of letting the right people know about this misformatting issue.
Reply
Re: you are right, my error
#8
Roland Melkert Wrote:
-------------------------------------------------------
> Steffen Wrote:
> --------------------------------------------------
> -----
> > Do you want to fix the problems and send the
> files
> > to Chris for uploading to the PT?
>
> I have never worked with the tracker, just thought
> of letting the right people know about this
> misformatting issue.

I can make these fixes and submit them to Chris [Dee?] unless either of you are already on it - are you?
Reply
Re: you are right, my error
#9
Jim DeVona Wrote:
> I can make these fixes and submit them to Chris
> unless either of you are already on it - are you?

I'm not, so feel free to submit corrections.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)