LDraw.org Discussion Forums
LDInspector - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: LDInspector (/thread-23882.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


LDInspector - Stefan Frenz - 2020-02-07

Hi there,

first of all, I would like to say my thanks to Roland for LDCad and to Philippe, Willy, Johann and Magnus for helping me out drawing models and making them OMR compliant.

After making the same mistakes multiple times and because I don't get MPDCenter running on my Linux box, I wrote a small Java tool to:
  • inspect and preview ldr/mpd files, list/preview sub-files
  • check OMR-compliance and some subtle things (like tires having Rubber color)
  • organize part lists (pbg import / export and generated from ldr/mpd files)
  • get part lists from Bricklink and Rebrickable with preview and pbg export
  • compare part lists of arbitrary source
  • search parts by description / filename / origin
I don't know if this software would be of any interest to the community. It is in some kind of early pre-alpha state, but if there are brave testers, I would be happy to get feedback or just "does not work" messages. Maybe it even helps other Linux-LDrawers to get their files OMR compliant? The gui requires JavaFX (see here), everything else is "plain Java" (version >=11).

Any suggestion or feedback is warmly welcome.

Best regards
Stefan

PS: If this is the wrong forum, please Administrator move it to another one.


RE: LDInspector - Stefan Frenz - 2020-02-07

Attached is today's snapshot jar (renamed to "zip" because the board does not allow jar-files; please rename to "ldinsp.jar" before using it). You'll need OpenJDK >=11 and JavaFX >=11 (at least the three libraries base, controls and graphics). To start the GUI, just enter:

Code:
java --module-path ldinsp.jar:javafx.base.jar:javafx.controls.jar:javafx.graphics.jar -m LDInspector/ldinsp.LDInspector

On the first start, there will be an example context configuration allowing some basic things. To have the "real" function, you'll need to "Config." the Workspace with an official and/or unofficial directory or zip file. If you would like to test the web functionality, you may enter a web cache prefix (which is best using a sub-directory), so all web files are stored locally and therefore are loaded only once. Then the configuration may be saved, and if the filename is LDInspector.ldi in the currently active directory, it will be used as configuration for future starts.

As mentioned above, it is in pre-alpha state.  Angel

Please use the updated versions below, this version is kept for discussion history reasons only.


RE: LDInspector - N. W. Perry - 2020-02-08

I could definitely see making use of a tool like this myself. I can run MPDCenter all right, but I have found it a little glitchy and wouldn't mind an alternative. So maybe I'll take a look at yours when I have occasion to check some files.

One thing to note, I see that you test for the optional qualifier in an OMR filename and that it's only required if greater than 1. However, according to the OMR spec, that's only true for the base MPD filename; for its subfiles, the qualifier is required even when it would be 1. (That seems weird and is probably just a discrepancy in the specification, but that's how it currently reads.)


RE: LDInspector - Stefan Frenz - 2020-02-08

(2020-02-08, 5:39)N. W. Perry Wrote: One thing to note, I see that you test for the optional qualifier in an OMR filename and that it's only required if greater than 1. However, according to the OMR spec, that's only true for the base MPD filename; for its subfiles, the qualifier is required even when it would be 1. (That seems weird and is probably just a discrepancy in the specification, but that's how it currently reads.)
Thanks for the hint. Smile  To be honest, now I'm completely lost. Huh If I understood your point correctly, the filename would be without "-1" (e.g. "123 - Setname.mpd"), but all the subfile names in this mpd would be with "-1" (e.g. "123-1 - Left Hose.ldr").

Some time ago ™ I thought having "-1" everywhere is a good idea: it would sync the numbers with Bricklink and Rebrickable, where "-1" is always present even for the first model (as far as I know). On my attempt creating the fire boat 4025 (see here), Johann explained OMR rules and OMRized my file (thank you very much!): the "-1" is removed everywhere, what I think is consequent and corresponds perfectly to the spec. In fact, another check done by my program is "are all numbers at the start of filename and subfile-names identical", which I treat being very reasonable.

For the subfiles I understand the spec (here
Code:
<Optional Qualifier> is a sequential number, starting with 1, added if there is more than one set that could be assigned <Set Number>.
that the "-1" would be required if there is another set with that number, but not added if there is no other set with that number. So at the time of modelling the first set, it seems to be kind of "not forbidden" and "not required" (how could I know if there would be another set with that number in the future?). It well may be another misunderstanding of mine. Blush I will happily adopt the check as soon as I have a new understanding. Wink 

I'm still a newbie here and I think the specification is done with many things in mind that I don't know and I am not aware of. And my English is not the very best, so another source of misunderstanding appears... Nevertheless, at this moment I would prefer an "-1" rule like "The -1 may be added or skipped for the first model, but the file and all its subfiles should be numbered consistently".

Said all that, I have the feeling that the "-1" seems to be not that critical: even my "-1" files are uploaded "as is" (thank you!). So my program reports the "-1" as hint and not as an error. Smile


RE: LDInspector - Willy Tschager - 2020-02-08

This is highly welcomed as I wasn't successful either to run MPDCenter on my linux machine. Will have a look!

w.


RE: LDInspector - Stefan Frenz - 2020-02-08

Please report without restraint, I'm motivated to develop the program to be "usable". Smile


RE: LDInspector - Magnus Forsberg - 2020-02-08

Could it be that the confusion comes from the fact that we are using the same suffix to describe different situations?

I see mainly three situations
1.)
The same setnumer is used on different markets.
347-1, Fire station, European version
347-2, Basic Building Set
347-3, Hospital - Lucy Lamb and Charlie Cat Visit Dr. Dog, European version of 137-1
347-4, Fire station, US version

2.)
The same set is used to build more than one, different models. Mainly Technic or 3in1 sets.
42079-1,  A-model, Forklift
42079-2,  B-model, Towing truck

3.)
The same set contains more than one model.
75893-1,  build 1, Dodge Challenger
75893-2,  build 2, Starter lights "christmas tree"
75893-3,  build 3, Dodge Charger

Another confusion is that we don't use the same suffix, like Bricklink or Brickset use it.

A third confusion is that we don't use the same term to describe the same thing.
There's a big difference between a submodel and a sub assembly.


RE: LDInspector - N. W. Perry - 2020-02-08

(2020-02-08, 8:31)Stefan Frenz Wrote: For the subfiles I understand the spec (here
Code:
<Optional Qualifier> is a sequential number, starting with 1, added if there is more than one set that could be assigned <Set Number>.
that the "-1" would be required if there is another set with that number, but not added if there is no other set with that number. So at the time of modelling the first set, it seems to be kind of "not forbidden" and "not required" (how could I know if there would be another set with that number in the future?). It well may be another misunderstanding of mine. Blush I will happily adopt the check as soon as I have a new understanding. Wink 

That's right, but for the base filename (the MPD as a whole), the spec is different:

Quote:Each MPD for the set will be named in the following manner:
<Set Number>[-<Optional Qualifier>] - <Set Name>[ - <Sub Model Name>]

Where:
<Optional Qualifier>: Is a sequential number, starting with 2.

The <Optional Qualifier> is not mandatory and gets added only if there is more than one set that could be assigned the same <Set Number>. The first set using a given number would be understood to never contain the qualifier however numbering should start with the oldest set and some investigation should be done in existing set databases.


So it's pretty clear that the intent is not to use 1 at all in the base filename, even when the set is the first of several with the same number. But, as you've quoted, the qualifier in subfile names does start at 1, not 2, and that it's "added if there is more than one set that could be assigned <Set Number>."

But as you also say, it seems reasonable that the start of every subfile name should be identical to that of the main file, and I have a feeling this is the intent of the specification. So it might be worth clarifying with the Standards Board (which I've now done).


RE: LDInspector - Stefan Frenz - 2020-02-08

(2020-02-08, 11:20)Magnus Forsberg Wrote: I see mainly three situations
Thanks for this! In fact I always had focused on your first situation.

Your second situation seemed to me always being "same number with name extension" like in 31084:
31084-1 - Pirate Roller Coaster.mpd  => main model
31084-1 - Pirate Roller Coaster - Ship ride.mpd => alternate build
31084-1 - Pirate Roller Coaster - Skull ride.mpd => another alternate build
I'm pretty happy with this naming scheme.

Your third situation I've lost completely, but I thought this would be identical to the second point without having a "main" model like in 42023:
42023-1 - Construction Crew - Dump Truck.mpd => one of three vehicles: the dump truck
42023-1 - Construction Crew - Excavator.mpd => one of three vehicles: the excavator
42023-1 - Construction Crew - Wheel Loader.mpd => one of three vehicles: wheel loader
I'm happy with this naming scheme, although I admit that it's not clear if all models together are in the set or if these are alternate builds and the main model is not modeled yet. But I would strongly prefer the way done for 42023 with all having the same number.


(2020-02-08, 11:20)Magnus Forsberg Wrote: There's a big difference between a submodel and a sub assembly.
Indeed I have never thought of the difference between sub model and sub assembly. Thanks again! My files are not too complex yet, so I think I always have only used sub assembly so far - except for my compilation of Knight's Castle and Shell Mini Bags with several models in one file.


RE: LDInspector - Magnus Forsberg - 2020-02-08

(2020-02-08, 15:37)Stefan Frenz Wrote: Your third situation I've lost completely, but I thought this would be identical to the second point without having a "main" model like in 42023:
42023-1 - Construction Crew - Dump Truck.mpd => one of three vehicles: the dump truck
42023-1 - Construction Crew - Excavator.mpd => one of three vehicles: the excavator
42023-1 - Construction Crew - Wheel Loader.mpd => one of three vehicles: wheel loader
I'm happy with this naming scheme, although I admit that it's not clear if all models together are in the set or if these are alternate builds and the main model is not modeled yet. But I would strongly prefer the way done for 42023 with all having the same number.

I don't know what the specs say, but I would say that it is wrong.

IMHO, it should be like this.
42023-1 - Construction Crew - Assembly.MPD (containing all three models)
42023-1 - Construction Crew - Dump Truck.LDR
42023-1 - Construction Crew - Excavator.LDR
42023-1 - Construction Crew - Wheel Loader.LDR

Note the difference in the file endings.