LDraw.org Discussion Forums
[split] Teemu's Part Checker - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: Parts Author Tools (https://forums.ldraw.org/forum-24.html)
+--- Thread: [split] Teemu's Part Checker (/thread-23520.html)



[split] Teemu's Part Checker - Santeri Piippo - 2019-06-24

I had some time to work on the checking tool and I put up a new version up at the usual location, roughly doubling the amount of detected issue types. I've attached here a table of the current implementation status of the tool:
[attachment=3782]
A couple of things that I'd like to discuss on our current hold reasons table:
  • "HELP entry length": didn't we decide that help entry length was not limited?
  • "Filename ending does not match declared LDRAW_ORG file type.": what does this mean? How do filename endings correlate with LDRAW_ORG file type? I guess subfiles have 's01' and so on but other than that I don't really get it.
  • "Filename ending does not match declared LDRAW_ORG part type qualifier." likewise...?
  • "Wrong BFC command found." What is a wrong BFC command?
  • "T-Junction detected." T-junction detection can be very difficult to implement and only a small minority of T-junctions are actual problems. Do we really want to automate this?



RE: [split] Teemu's Part Checker - Willy Tschager - 2019-06-29

(2019-06-24, 7:34)Santeri Piippo Wrote: I had some time to work on the checking tool and I put up a new version up at the usual location, roughly doubling the amount of detected issue types. I've attached here a table of the current implementation status of the tool:

Teemu,

I guess this is wrong:

u8017c01.dat
  • Line 10: keywords are not allowed for Shortcut files — WARNING
    0 !KEYWORDS Automatic Binding Brick
It should trigger a warning for subs and prims but not for a shortcut.

w.


RE: [split] Teemu's Part Checker - Steffen - 2019-06-30

(2019-06-24, 7:34)Santeri Piippo Wrote: "HELP entry length": didn't we decide that help entry length was not limited?
I think yes there is no limit.
You could issue a warning if a line is "ridiculously" long, but other than that I would not limit the length.

(2019-06-24, 7:34)Santeri Piippo Wrote: [*]"Filename ending does not match declared LDRAW_ORG file type.": what does this mean? How do filename endings correlate with LDRAW_ORG file type? I guess subfiles have 's01' and so on but other than that I don't really get it.
No, this is about the file extension. It is very simple:
- models must have *.ldr
- everything in our library is parts, shortcuts, subparts and so on and therefore must have *.dat

(2019-06-24, 7:34)Santeri Piippo Wrote: [*]"Filename ending does not match declared LDRAW_ORG part type qualifier." likewise...?
I think this is simply a duplicate of the above.

(2019-06-24, 7:34)Santeri Piippo Wrote: [*]"Wrong BFC command found." What is a wrong BFC command?
for example:
0 BFC CERTIFY INVERTNEXT
. This got inserted by older MLCad versions automatically sadly.

(2019-06-24, 7:34)Santeri Piippo Wrote: [*]"T-Junction detected." T-junction detection can be very difficult to implement and only a small minority of T-junctions are actual problems. Do we really want to automate this?
I agree that implementing it could be difficult. We should not hold up the integration of your checker into the Parts Tracker
because of this. Something like this can be added later if really desired.


RE: [split] Teemu's Part Checker - Steffen - 2019-06-30

Hej Teemu, may I ask for some more checks in your checking tool?

There are some lines which frequently slip into parts which get uploaded to the PT,
we should prevent the upload directly in such cases. They are:

(1)
the following lines frequently automatedly get inserted by MLCad:
0 BFC CERTIFY INVERTNEXT
0 ROTATION ...

(2)
the following line is an old-style comment
0 WRITE some comment goes here
which nowadays gets written
0 // some comment goes here
so we should prevent upload of files which contain 0 WRITE

(3)
lines with prefix
0 !LPE
are LD Part Editor commands which are not allowed in official files on the PT

(4)
lines with prefix
0 !LPUB
are LPub3D commands which are not allowed in official files on the PT


RE: [split] Teemu's Part Checker - Santeri Piippo - 2019-06-30

(2019-06-30, 11:43)Steffen Wrote: Hej Teemu, may I ask for some more checks in your checking tool?

There are some lines which frequently slip into parts which get uploaded to the PT,
we should prevent the upload directly in such cases. They are:

(1)
the following lines frequently automatedly get inserted by MLCad:
0 BFC CERTIFY INVERTNEXT
0 ROTATION ...

(2)
the following line is an old-style comment
0 WRITE some comment goes here
which nowadays gets written
0 // some comment goes here
so we should prevent upload of files which contain 0 WRITE

(3)
lines with prefix
0 !LPE
are LD Part Editor commands which are not allowed in official files on the PT

(4)
lines with prefix
0 !LPUB
are LPub3D commands which are not allowed in official files on the PT

Hey, that is already done:
Quote: Line 9: unknown or deprecated metacommand: BFC CERTIFY INVERTNEXT — HOLD
0 BFC CERTIFY INVERTNEXT
Line 10: unknown or deprecated metacommand: WRITE writings — HOLD
0 WRITE writings
Line 11: unknown or deprecated metacommand: ROTATION 1 2 3 — HOLD
0 ROTATION 1 2 3
Line 12: unknown or deprecated metacommand: !LPE things — HOLD
0 !LPE things
Line 13: unknown or deprecated metacommand: !LPUB more things — HOLD
0 !LPUB more things
Line 14: unknown or deprecated metacommand: STUPID METACOMMAND — HOLD
0 STUPID METACOMMAND

"0 //..." is interpreted as a comment, everything else has to be an official metacommand or it gets complained about.


RE: [split] Teemu's Part Checker - Steffen - 2019-06-30

cool.


RE: [split] Teemu's Part Checker - Willy Tschager - 2019-08-03

I used this for almost two month now and had no major issue with it. Could we start adding it as a checker to the PT?

w.


RE: [split] Teemu's Part Checker - Chris Dee - 2019-08-19

(2019-08-03, 7:04)Willy Tschager Wrote: I used this for almost two month now and had no major issue with it. Could we start adding it as a checker to the PT?

w.

What do you mean? Update the link on the tools page or host the checker on the Parts Tracker server?


RE: [split] Teemu's Part Checker - Willy Tschager - 2019-08-19

(2019-08-19, 11:15)Chris Dee Wrote: What do you mean? Update the link on the tools page or host the checker on the Parts Tracker server?

Ideal would be hosting it on the PT.

w.


RE: [split] Teemu's Part Checker - Chris Dee - 2019-08-19

(2019-08-19, 11:31)Willy Tschager Wrote: Ideal would be hosting it on the PT.

w.
What language is it written in?