LDCheck - part checking program (1.0)


LDCheck - part checking program (1.0)
#1
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:

.pdf   problems-2019-06-24.pdf (Size: 36.15 KB / Downloads: 13)
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?
Reply
RE: [split] Teemu's Part Checker
#2
(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.
LEGO ergo sum
Reply
RE: [split] Teemu's Part Checker
#3
(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.
Reply
RE: [split] Teemu's Part Checker
#4
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
Reply
RE: [split] Teemu's Part Checker
#5
(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.
Reply
RE: [split] Teemu's Part Checker
#6
cool.
Reply
RE: [split] Teemu's Part Checker
#7
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.
LEGO ergo sum
Reply
RE: [split] Teemu's Part Checker
#8
(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?
Chris (LDraw Parts Library Admin)
Reply
RE: [split] Teemu's Part Checker
#9
(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.
LEGO ergo sum
Reply
RE: [split] Teemu's Part Checker
#10
(2019-08-19, 11:31)Willy Tschager Wrote: Ideal would be hosting it on the PT.

w.
What language is it written in?
Chris (LDraw Parts Library Admin)
Reply
RE: LDCheck - part checking program
#11
I cleaned up the code somewhat and fixed some checks. Either I've read the official file standards incorrectly or they have been changed (it looks like there's been a revision), but I've updated LDCheck, especially its check for collinearity to reflect the document as it is written now.

We've had some talk about putting it up on the PT, so I want to tag a 1.0 version that I can provide to Chris. But because I've modified the collinearity check I don't feel comfortable doing so just yet, so I put up the updated version at the usual location. Consider it a release candidate if you will.

I know the source repository is down, this is because Bitbucket has dropped Mercurial support. I'll need to figure out how to host the repository elsewhere. I'll at least provide the zipped source code when I get to tag 1.0.
Reply
RE: LDCheck - part checking program
#12
Source code is now available at my new mercurial repository at: https://hg.hecknology.net/ldcheck
Reply
RE: LDCheck - part checking program
#13
(2020-08-26, 10:52)Santeri Piippo Wrote: I cleaned up the code somewhat and fixed some checks. Either I've read the official file standards incorrectly or they have been changed (it looks like there's been a revision), but I've updated LDCheck, especially its check for collinearity to reflect the document as it is written now.

We've had some talk about putting it up on the PT, so I want to tag a 1.0 version that I can provide to Chris. But because I've modified the collinearity check I don't feel comfortable doing so just yet, so I put up the updated version at the usual location. Consider it a release candidate if you will.

I know the source repository is down, this is because Bitbucket has dropped Mercurial support. I'll need to figure out how to host the repository elsewhere. I'll at least provide the zipped source code when I get to tag 1.0.

502 Bad Gateway

w.
LEGO ergo sum
Reply
RE: LDCheck - part checking program
#14
(2020-08-29, 14:32)Willy Tschager Wrote: 502 Bad Gateway

w.
Sorry, had another server issue...

Anyway I decided to tag 1.0 and zipped up the source code.
Get it here: ldcheck-1.0.zip
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)