Parts Tracker Submit Validation Checks and Automatic Corrections

Maintained By: LDraw.org Official Parts Library Adminstrators

This is an ratified, official LDraw.org document. Non-adminstrative changes can only be made with the approval of the maintainer.

Upon submission to the Parts Tracker, the following checks are run on the submitted file.

Error

Will result in file rejection.

  • First line in the file is not 0 <description>
  • Description contains invisible control characters, unused code points, the line separator character (U+2028), or the paragraph separator character (U+2029)
  • Description of a part does not start with ~ and has a LDRAW_ORG type of Subpart
  • Description of a part does not start with ~ and has a CATEGORY of Moved or Obsolete
  • Description of a part does not start with = and has a LDRAW_ORG optional qualifier Alias
  • Description of a part does not start with | or ~| and has a Name of the form tNNNN.dat (Third Party Part)
  • Description ends with (Obsolete) or starts with ~Obsolete but does not have CATEGORY of Obsolete
  • Missing or invalid Author statement
  • Missing or invalid Name statement
  • Name contains characters other than a-z, 0-9, _,-, ., \
  • Name starts with x (i.e. old style unknown part number)
  • Name of a part does not end with kNN if the LDRAW_ORG optional qualifier is Flexible_Section and is not in the Moved or Obsolete category
  • LDRAW_ORG type is Part or Shortcut and Name ends with pNNNN or pXX(X) and Description does not end with Pattern (<optional qualifier>)
  • LDRAW_ORG type is Part or Shortcut and Name ends with pNNNN or pXX(X) and does not have a "set" KEYWORD (as defined in the LDraw.org Official Parts Library Standard)
  • Directory in part Name does not match the directory defined by LDRAW_ORG type (e.g. Subpart does not begin with s\)
  • The submitted file filename does not match Name
  • Missing or invalid LDRAW_ORG statement
  • LDRAW_ORG optional qualifier is Alias and LDRAW_ORG type is not Part or Shortcut
  • LDRAW_ORG optional qualifier is Flexible_Section and LDRAW_ORG type is not Part
  • Missing or invalid LICENSE statement
  • LICENSE is not an approved license for the LDraw.org Official Parts Library
  • No 0 BFC CERTIFY CCW statement in header
  • CATEGORY is not in the valid category list
  • CATEGORY is Obsolete and description does not end with (Obsolete) or start with ~Obsolete
  • Invalid HISTORY statement(s)
  • Author listed in HISTORY not a registered author
  • Part body contains meta commands other than 0 // style comments, TEXMAP commands, or BFC
  • Any number exceeds 5 decimal places in types 1-5 lines
  • Any number contains leading or trailing zeros, except a single zero immediately before the decimal point
  • Type 2 or 5 lines not color 24
  • Type 1, 3, or 4 lines that are color 24
  • Type 2-5 lines with identical vertexes
  • Type 1 lines with a singular matrix
  • Type 3, 4, or 5 lines with collinear vertexes
  • Type 4 lines that exceed 3 degrees of planar deviation
  • Type 4 lines that define concave or bowtie geometry

Warnings

  • A number in the description that may not have the required leading spaces
  • Numbers the exceed the decimal precision recommendation for the LDRAW_ORG type but do not exceed 5 decimal places.
  • An invalid PREVIEW statement for the LDraw.org Official Parts Library
  • The CC-BY-2.0 License is used
  • The CATEGORY is Minifig. This is a reviewer aid to ensure a more specific Minifig category is not warranted.
  • A sticker color or base part in a sticker shortcut is not color 16
  • Type 4 lines that exceed 1 degree but do not exceed 3 degrees of planar deviation

Automatic Corrections

  • Invalid UTF-8 encoding
  • All legal, horizontal whitespace characters are converted to spaces
  • With the exception of the first line (the description), multiple, consecutive spaces in a line are converted to 1 space
  • Multiple, consecutive blank lines will be consolidated to 1 blank line
  • LDRAW_ORG type is not Unofficial_<type>, "Unofficial_" will be added
  • An invalid PREVIEW statement for the LDraw.org Official Parts Library will be discarded
  • Non-critical invalid header commands are discarded
  • Out of order header commands are placed in proper order