Category:LDInspector: Difference between revisions

From LDraw.org Wiki
Jump to navigation Jump to search
m (Steffen moved page LDInspector to Category:LDInspector)
 
Line 52: Line 52:
== Howtos ==
== Howtos ==


* [[LDInspector/HowtoConfig]] How to do basic configuration.
see the list of articles in this category at the bottom of this page
* [[LDInspector/HowtoBricklink]] How to get a part list from Bricklink and post-process it.
* [[LDInspector/HowtoPartlistCompare]] How to compare multiple part lists and/or models with each other.
* [[LDInspector/HowtoOmrCheck]] How to check models against [https://omr.ldraw.org/ OMR] compliance.
* [[LDInspector/HowtoOmrFix]] How to automatically fix [https://omr.ldraw.org/ OMR] compliance issues.


== UI Conception ==
== UI Conception ==

Latest revision as of 19:29, 27 March 2024

LDInspector is an interactive and batch processing information retrieval software for LDraw models written by Stefan Frenz.

It was at first described at the LDraw forum, and over time here will arise some kind of how-to and documentation of LDInspector. You may get it here.

Installation

All systems

Get the desired version or the latest snapshot of LDInspector's jar file. Also get the installer zip. Therein you will find a short readme.txt as well as installer scripts for Linux (tested on XUbuntu and Mint) and Windows (tested on 8.1 and 10). If you already have the ldinsp.jar file or like to get the latest one, just grab the installer and it will download the latest version of ldinsp.jar during installation. Put the installer (and optionally the ldinsp.jar file) in a directory of your choice, start the installer and after successful execution of the install script this directory will contain a portable version of LDInspector (for the desired operating system only, of course).

Therefore the install script downloads an appropriate Java- and JavaFX-package from the web, extracts them and removes the original package as well as some unneeded files.

Linux

After putting both ldinsp.jar and install_lin.sh (extracted from ldiinst.zip) in one directory, call install_lin.sh from the command line to get the installation information, or just call it from your preferred file manager, if you don't need messages or have notify-send installed (package notify-osd, installed by default). If so, all messages will additionally be shown on your UI, so you really don't need a terminal.

Windows

After putting both ldinsp.jar and install_win.bat (extracted from ldiinst.zip) in one directory, start the install_win.bat file. If you like to have it installed in "Program Files" or other access limited directories, you will have to have administrator privileges. A terminal window will open up automatically and show progress messages. At the end the install scripts pauses until it is closed or "Enter" is pressed.

MacOS

At the moment, the install script don't support MacOS directly. In the forum it was reported to be possible to get it run.

Basic Configuration

You may play with LDInspector without having LDraw libraries installed. But typically at the first start if LDInspector, you will want to configure LDraw paths. To do so, in the main window click "Config." (or click "yes" if LDInspector asks for configuration at startup). This opens a new window:

  • Part sources may be configured by selecting an origin attribute (all parts of that source will be considered being official or unofficial), selecting a zip file or directory and then adding it. The part sources are used in an ordered way so that the first hit will be used - if you like to have official parts by default, move the corresponding entry to the top; if you like to have bleading edge unofficial parts by default, move this one to the top.
  • Web cache is only important, if you use the Web tab or the Bricklink/Rebrickable image preview in PartList tab. But if you use those, ensure to have caching activated and to have a valid cache file prefix, usually a directory.
  • Color definitions are integrated in LDInspector, but you may overwrite all colors and color-mappings.

After having configured everything and having pressed the OK button, save your configuration via "Save" button in the main window. This will contain the basic configuration as well as the current item list, so you may add some items and save again.

Howtos

see the list of articles in this category at the bottom of this page

UI Conception

Hopefully, you get the ui conception without reading this. ;) But just in case: the main window is divided in three sections:

On top contains some buttons

  • to configure the workspace ("Load", "Config.", "Save"),
  • to clear or add a new item to the item list ("Clear", "Part-List", "Part", "File", "Directory"), or
  • to cause LDInspector to do something ("Refresh", "Info", "Exit").

On the left there is the item list. You may always select exactly one item, some of them like directory items may have sub-items. At the moment there are four types of items:

  • Part-List: use this to hold a set of parts which you maybe like to change ("editable"). You can add and remove parts, change their color and amount. Main use case: prepare a part list that can be used in other scenarios like LDCad construction or Bricklink shopping.
  • Part: use this to reference a part. You can change the reference name, the color and amount. Main use case: inspect a single part you are interested in.
  • File: use this to reference a file. You can not change anything, the content is loaded on demand from the file system. Main use case: do something with a ldr/mpd file like OMR-checking or reference a part list on disk.
  • Directory: use this to reference a directory. You can not change anything, the directory content is loaded on demand from the file system and is recursively browsable. Main use case: point to a directory with all your models and access them fast and easily.

On the right there is a tabbed pane, at the top you select what you would like to do:

  • Item: get basic information about the selected item. Here you may remove this single item from your item list ("Remove item"), refresh its content ("Refresh item", for example after changing a file in another program), change its name, and depending on the item type there are other actions available:
    • Part-List: you can add a "new empty" part to an editable part list, trigger part sorting or export the list to PBG file (for example to build a model with those parts in LDCad) or to XML file (for example if you with to buy those parts at Bricklink).
    • Part or file pointing to a part or model: you may export the part to Wavefront OBJ (for example for further processing or giving a 3D model to someone who has one of the free OBJ viewers but nothing in mind with LDraw), export the part with all transitively used parts to a zip file (for example if you wish to give a model to someone without the required parts).
    • Directory: there is nothing more to do.
  • OMR-Check: if you selected a model, LDInspector performs some checks and reports their results in the text area. At the moment there is no "quick-fix" feature available (planned in a future version).
  • Render: get a preview of the model you selected. Note that there are several non-self-explanatory options:
    • Displayed lines: you may select between several options how many lines should be drawn. As the rendering pipeline of JavaFX does not support lines unfortunately, each line results in 12 triangles to be rendered. For large models this is very expensive and usually not required.
    • Color: you may override the color of the selected item to a fixed one (will only change "parent" color, so if there are defined colors in a part or model, they will not be replaced) or to select color depending on checks:
      • OMR-Checks: each part contributing to a OMR check message will be colored in blue (hint), orange (warn), red (solvable error) or magenta (hard error). All other parts are green (ok).
      • Collision: each part is colored in either green (ok) or magenta (colliding). Please note that this test is in pre-alpha state and very time consuming for large models.
    • Show steps: you can select shown steps by entering "from" and "to" numbers; having the "from" number set to 1, the rendering shows the model up to the step entered in "to"; having both numbers identically set, the rendering shows only those parts added in this step.
  • PartList: you get a list for all parts in the selected item - either a part list or a LDraw model. There are lots of use cases, see below.
  • PartGrid: you get a very short and read-only overview of all parts in the selected item - either a part list or a LDraw model.
  • UsedFiles: all transitively used parts are shown in the text area, for example if you want to check if there are "unwanted" parts or if you like to process them with another tool.
  • Source: just print the source code of the selected item.
  • Search: search a part by filename, description, author or origin. If you selected an editable part list in the item list and you found the part you were looking for, you may add this directly to your part list.
  • Web: get information about sets from Bricklink and Rebrickable. See use cases below.
  • Log: if something went wrong or if you are interested in statistics, take a look.

Use cases

Check OMR compliance

  1. Ensure you have your LDraw paths configured correctly (see "Basic Configuration" above).
  2. Add a file reference or directory reference to your workspace.
  3. Select OMR-Check tab.
  4. You'll get a short overview of all checks done, each having one of the following states:
    1. ign: the check is started but did nothing, perhaps because this check is not available for the selected item.
    2. ok: the check didn't find anything to grump about.
    3. hint: maybe (!) there is something that could be optimized, but as per definition, it is ok. Maybe the hint is to be ignored with reason, like having a part in a specific color even if the part name contains "tyre".
    4. warn: there is something that should be optimized, for example the model contains a sub-file that is never used.
    5. error: there is something that has to be fixed because it violates the OMR rules, for example if a referenced part is not found.
  5. At the moment, you will have to edit your file with some other tool. There are plans enabling LDInspector to offer quick-fix options for problems that can be fixed automatically like missing license lines.

Get inventories from external sources

  1. Ensure you have your LDraw paths configured correctly (see "Basic Configuration" above).
  2. Most likely you will want to have web cache path cofigured (see "Basic Configuration" above).
  3. Select Web-Check tab.
  4. Enter your set number in the "key" field.
  5. Search Bricklink and/or Rebrickable with one of the following (or do all of them by clicking "All"):
    1. Ass. BL search: search Bricklink as if entered in the Bricklink search on the main page.
    2. Full BL product search: search Bricklink for products listed with the given key.
    3. Ass. RB search: search Rebrickable as if entered in the Rebrickable search on the main page.
    4. RB set search: at Rebrickable directly look for a set with the given key.
  6. Recursively dive into the results. If done, you can add single parts to an editable part list or create a complete new part list.

Handling and diving into results may be done with the following actions:

  • "X": delete this item.
  • "Img.": load an image for this item if available.
  • "Product" (only Bricklink results): get product information about this item.
  • "Un.Inv.": remove sub-items of this item.
  • "Inv.Reg." (only Bricklink inventories): get regular items of this inventory item.
  • "Inv.All." (only Bricklink inventories): get all items of this inventory item. Attention: this may contain duplicates, but simplifies searching alternate parts.
  • "Set" (only Rebrickable results): get set information about this item.
  • "PBG" (only Rebrickable sets): download the official PBG file from Rebrickable for this set.
  • "Inventory" (only Rebrickable sets): get items of this inventory item.
  • "S" (only part results): search in the LDraw library for a replacement part (similar to Search tab).
  • "+WS" (only part results): add this part as part item to the workspace. The circle color in this button reports about
    • green: official LDraw part found for this entry.
    • orange: unofficial LDraw part found for this entry.
    • red: no LDraw part found for this entry.
  • "+LI" (only part results): add this entry as part to the selected editable part list.

If you like to have all images as soon as possible and all next to a description, select "Img.: integrated" and press "Load all images" if there are new items without image.

Handle a bunch of models

To your item list add a directory item pointing to the directory containing the models or sub-directories with models. Maybe save your workspace configuration if this directory is looked after more often. By clicking the triangle in front of the directory item's name, the sub-elements can be used directly for all other use cases.