![]() |
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) |
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:
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. ![]() 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. ![]() ![]() 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>. ![]() ![]() 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. ![]() 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". ![]() 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) 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: 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 situationsThanks 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: 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. RE: LDInspector - Stefan Frenz - 2020-02-09 (2020-02-08, 17:34)Magnus Forsberg Wrote: IMHO, it should be like this.Ah, thanks! ![]()
Anyhow: as LDInspector checks for file-name-structure, sub-file-name-structure, therefore used numbers and so on, I think the differences between sub-models and sub-assemblies have still to be handled by the user and not the program (but as user I never distinguished this before, so it helps me understanding!). RE: LDInspector - Orion Pobursky - 2020-02-09 Don't get too "wrapped around the axle" trying to get the file structure perfect. I'm sure there will be some crazy edge case that will come along and show that the spec has flaws. The OMR isn't the parts library so the OMR spec is more of a guideline and as long as everything "makes sense" then it's good enough. RE: LDInspector - Stefan Frenz - 2020-02-09 (2020-02-09, 14:43)Orion Pobursky Wrote: as long as everything "makes sense" then it's good enough.I'm very happy with that. ![]() ![]() RE: LDInspector - Magnus Forsberg - 2020-02-09 Yes OK, Let me once more emphasis that I'm only voicing my interpretation of the general difference between mpd / ldr / dat -files. Not the OMR specifications. Sub-assemblies should be placed in model.ldr file. i.e. Sub-assemblies to the excavator should be placed in the Excavator.ldr file. Let me share my version of the set 42023
RE: LDInspector - Stefan Frenz - 2020-02-11 (2020-02-07, 22:16)Stefan Frenz Wrote: As mentioned above, it is in pre-alpha state.There was a bug in configuration saving that prevented a configured web cache path to be loaded on restart. Attached is a fixed version that also includes a "load all images" button in web view to ease part identification. Please use the updated versions below, this version is kept for discussion history reasons only. RE: LDInspector - Willy Tschager - 2020-02-11 (2020-02-07, 21:50)Stefan Frenz Wrote: The gui requires JavaFX (see here), everything else is "plain Java" (version >=11). Yet an additional install. It's not that I'm a hard core linux user. Would a all-in-one be possible. w. RE: LDInspector - Stefan Frenz - 2020-02-11 Thanks for trying. Attached is an All-in-One-zip for Linux 64 bit systems, only Java>=11 is required. Please unpack to any user directory and start run.sh script. I hope that I integrated all required libs... Edit: Removed ~8 MB zip with integrated libs as it doesn't seem to work. RE: LDInspector - Willy Tschager - 2020-02-12 (2020-02-11, 18:57)Stefan Frenz Wrote: Thanks for trying. Attached is an All-in-One-zip for Linux 64 bit systems, only Java>=11 is required. Please unpack to any user directory and start run.sh script. I hope that I integrated all required libs... Ain't workin w. RE: LDInspector - Stefan Frenz - 2020-02-12 (2020-02-12, 7:31)Willy Tschager Wrote: Ain't workinOh, I'm very sorry, perhaps some libraries are still missing. Does any message appear? Should I bundle with Java? RE: LDInspector - Stefan Frenz - 2020-02-13 Hi Willy, if you could give it another chance, attached is a zip file containing LDInspector and four bash scripts
Thanks for reporting and best regards Stefan RE: LDInspector - Willy Tschager - 2020-02-13 (2020-02-13, 9:36)Stefan Frenz Wrote: Thanks for reporting and best regards Believe it or not but I got it running. Now I need to know some things: 1. How do I create a desktop starter for it, 'cos mine isn't working on Linux Mint 2. I presume the prog wants to know where my LDraw library is - but it didn't ask at start-up 3. I tried to load an .mpd via "Workspace -> Load" but nothing happens 4. I'm irritated by the fact that the prog apparently closes and re-opens after I had hit "Load". - It does the same thing after I opened the "Info" dialog and pushed "OK". w. RE: LDInspector - Stefan Frenz - 2020-02-14 ![]() ![]() ad 1: Right-click on the desktop, select "Create Launcher", select the 4_run.sh script as "Command" and ensure to have the right "Working Directory" pointing to the directory where the run script is stored. The latter is needed because the starter-script at the moment assumes that it is run in its own directory, which isn't checked and isn't ensured. Now knowing that LDInspector runs on your machine, I will beautify the scripts. ad 2: By default without configuration, LDInspector uses some kind of minimalistic internal data to enable playing even without LDraw. Please click on "Config." to configure paths to LDraw (if unconfigured, there will be an entry "Test", which should be removed if a real LDraw-directory or complete.zip-file is used). The "Load" button does not load a file but a workspace configuration. In a workspace there may be "loose items" which refer to parts by name, "file references" which refer to a single file by its name, "directory references" which refer to a complete directory by name and other things. I use this to have a default configuration having a reference to my OMR-working-directory and a reference to the downloaded official OMR-files, so configured once I don't need to adjust configuration or "load" files anymore. ad 3: Yes. ![]() ad 4: Yes. ![]() ![]() RE: LDInspector - Stefan Frenz - 2020-02-14 (2020-02-13, 20:40)Willy Tschager Wrote: working on Linux Mint Which version of Linux Mint do you use? Maybe it is possible to run something like Code: sudo apt-get install openjdk-11-jre openjfx If this is installed and the ldinsp.jar is in the current directory, the following command should start LDInspector Code: java --module-path ldinsp.jar:/usr/share/openjfx/lib -m LDInspector/ldinsp.LDInspector I think this would be much easier than downloading Java and JavaFX in a script, additionally the system updates will ensure having an up-to-date environment. A drawback is that it is not self-contained / portable and requires root access to the machine... RE: LDInspector - Stefan Frenz - 2020-02-14 Updated version with support for step-by-step render preview and some bugfixes. Edit: removed very buggy file. Sorry to all of you testing and thank you N.W.Perry for reporting the exception! RE: LDInspector - N. W. Perry - 2020-02-14 (2020-02-14, 15:15)Stefan Frenz Wrote: Updated version with support for step-by-step render preview and some bugfixes. Still working on getting this to run; I'm a bit mixed up which of the various procedures I should be using (Mac OS 10.14.6 here)? RE: LDInspector - Stefan Frenz - 2020-02-14 (2020-02-14, 16:16)N. W. Perry Wrote: I'm a bit mixed up which of the various procedures I should be using (Mac OS 10.14.6 here)?I'm sorry for that. I don't have a Mac to test and some colleagues reported some caveats for Java on Mac (perhaps they are >=MacOS 10.15), but I would assume that if you have java and openjfx installed, it should work. You can get JavaFX from gluon and Java from Oracle or AdoptOpenJDK. RE: LDInspector - Stefan Frenz - 2020-02-15 Attached are four example use cases. Please click on the preview-images to have animated GIFs. Use case 1: preview mpd (more useful if there is a directory with many mpds to preview) Use case 2: check mpd for OMR compliance Use case 3: create part list from Bricklink web info (useful before making the mpd to get a Bricklink-pbg and afterwards to check parts count); this use case is split into six steps as they are independent and the gif-image-filesize limit is 500 kb... 3.1: search sets and get the inventory from Bricklink 3.2: resolve nested inventories for missing or unofficial parts 3.3: replace Bricklink-listed but LDraw-missing parts by manual search+replace 3.4: automatically replace all ~moved parts 3.5: create part list and export to LDCad pbg or Bricklink XML 3.6: compare used parts in mpd versus listed parts in part list use case 4: create part list from Rebrickable web info and/or get pbg file directly RE: LDInspector - Willy Tschager - 2020-02-15 (2020-02-14, 15:14)Stefan Frenz Wrote: Which version of Linux Mint do you use? Linux Mint 18.3 Sylvia (2020-02-14, 15:14)Stefan Frenz Wrote: Maybe it is possible to run something like Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig E: Paket openjdk-11-jre kann nicht gefunden werden. RE: LDInspector - Stefan Frenz - 2020-02-15 Ok, so this is not an option anymore. Thanks for reporting! I will make an installer with download. RE: LDInspector - Stefan Frenz - 2020-02-21 Attached is an updated version of LDInspector, asking for a configuration if started without one (thanks for hinting this might be helpful) and with some new features and bugfixes. Also attached is an installer for Linux and Windows: both download required files and create an appropriate starter script. Edit: updated install zip as suggested by Willy. RE: LDInspector - Willy Tschager - 2020-02-21 (2020-02-21, 9:41)Stefan Frenz Wrote: Attached is an updated version of LDInspector, asking for a configuration if started without one (thanks for hinting this might be helpful) and with some new features and bugfixes. Also attached is an installer for Linux and Windows: both download required files and create an appropriate starter script. Please add "Linux" or "Windows" to the file name. I'm supposed to remove the old version? w. RE: LDInspector - Stefan Frenz - 2020-02-21 Done. ![]() RE: LDInspector - Willy Tschager - 2020-02-23 (2020-02-21, 9:41)Stefan Frenz Wrote: Attached is an updated version of LDInspector, asking for a configuration if started without one (thanks for hinting this might be helpful) and with some new features and bugfixes. Also attached is an installer for Linux and Windows: both download required files and create an appropriate starter script. I get: "missing ldinsp.jar, please put it in /home/..." Could you pack a readme file with instructions how to run the .sh script? w. RE: LDInspector - Stefan Frenz - 2020-02-23 Thanks for reporting, attached is an updated version with readme. At the moment I'm quite unsure what is best - I thought of the following:
Does the install script work if both install-script and ldinsp (zip or jar) are in the same directory? RE: LDInspector - Willy Tschager - 2020-02-25 (2020-02-23, 11:36)Stefan Frenz Wrote:Personally speaking I would prefer this method. w. RE: LDInspector - Willy Tschager - 2020-02-25 Stefan, would it be possible to put all this stuff at the LDraw wiki? w. RE: LDInspector - Willy Tschager - 2020-02-25 This is impressive, especially the amount of data you pull form it. However I have some suggestions: * Please rename "Check" to "OMR-Check" and place the tab between "Item" and "Render" * I loaded a .ldr file with unofficial part. I get all warnings but I don't know how to: Fix movetos Inline unofficials with the correct OMR-nomenclatura Fix description Fix filename * In the PartList Chart I would prefer the long name "Official" "Unofficial" instead of "ofc", "uno" * Does "ign" stand for "Ignor"? w. RE: LDInspector - Stefan Frenz - 2020-02-25 Thanks a lot! ![]() (2020-02-25, 11:51)Willy Tschager Wrote: * Please rename "Check" to "OMR-Check" and place the tab between "Item" and "Render"Done. (2020-02-25, 11:51)Willy Tschager Wrote: * I loaded a .ldr file with unofficial part. I get all warnings but I don't know how to:Yes, at the moment there is no hint about how to fix. I plan to implement some kind of "quick fix" which should fix all errors/warnings that can be fixed automatically. But at the moment, LDInspector only reads user data and never writes them back - I'm still unsure about the preferred user interface therefore. For all other errors (like "part missing") I plan to give some more information about what is wrong and how it could be fixed. (2020-02-25, 11:51)Willy Tschager Wrote: * Does "ign" stand for "Ignor"?Yes. At the moment every check that is started will print exactly one line. Would you prefer skipping the output of ignored checks? Thank you very much for repeated testing. I really do appreciate your feedback very much. ![]() RE: LDInspector - Stefan Frenz - 2020-02-25 (2020-02-25, 11:29)Willy Tschager Wrote: would it be possible to put all this stuff at the LDraw wiki?Hi Willy, yes, of course! I just requested a wiki account. ![]() Best regards Stefan RE: LDInspector - Orion Pobursky - 2020-02-25 (2020-02-25, 13:10)Stefan Frenz Wrote: Hi Willy, Well. I think I'd prefer Github/SourceForge/etc but we can host in a pinch. RE: LDInspector - Philippe Hurbain - 2020-02-25 Hi Stefan, Can't seem to be able to install it on my (win10) machine... Code: BITSADMIN version 3.0 RE: LDInspector - Stefan Frenz - 2020-02-25 Hum. ![]() ![]() Maybe you could test again with the attached installer and report? I changed the way the current directory is used... I still don't have a reliable windows machine to test on, sorry. ![]() RE: LDInspector - Philippe Hurbain - 2020-02-25 (2020-02-25, 15:47)Stefan Frenz Wrote: Hum.Install worked! Now I need to play with program ![]() RE: LDInspector - Philippe Hurbain - 2020-02-25 (2020-02-25, 16:14)Philippe Hurbain Wrote: Install worked! Now I need to play with programIt will require MUCH more exploration time (and maybe to read some documentation if/when it's available ![]() RE: LDInspector - Stefan Frenz - 2020-02-25 Thanks a lot for testing, reporting and the nice words! ![]() If there is anything you would like to have, to not have or to have changed: please let me know! ![]() RE: LDInspector - N. W. Perry - 2020-02-25 (2020-02-14, 16:37)Stefan Frenz Wrote: I'm sorry for that. I don't have a Mac to test and some colleagues reported some caveats for Java on Mac (perhaps they are >=MacOS 10.15), but I would assume that if you have java and openjfx installed, it should work. You can get JavaFX from gluon and Java from Oracle or AdoptOpenJDK. OK, I've downloaded both version 11 and version 13 of JavaFX, where do I place the files I've downloaded? RE: LDInspector - Stefan Frenz - 2020-02-25 Please try the following directory structure: Code: ../somePath/ldinsp.jar then in a terminal the following should start LDInspector: Code: cd ../somePath Thanks for testing! RE: LDInspector - N. W. Perry - 2020-02-25 (2020-02-25, 17:56)Stefan Frenz Wrote: Please try the following directory structure: Thanks! After revising the terminal commands (shown here for my own copy/paste purposes) to reflect actual directory structure, I get this error: Code: Exception in Application start method RE: LDInspector - Stefan Frenz - 2020-02-25 (2020-02-25, 21:15)N. W. Perry Wrote:Thanks for testing and reporting. Hum, the "jdk-13.0.2.jdk/Contents/Home/bin/java" seems strange to me, it should read "jdk-13.0.2/bin/java". But the exception seems to be an independent issue, did you use the "last" version of LDInspector? Hum, this thread is messed ![]() ![]() RE: LDInspector - Stefan Frenz - 2020-02-26 Hi Willy, I got an account and played a bit - looks perfect. ![]() Thanks again! Best regards Stefan |