diff --git a/common/lc_bricklink.cpp b/common/lc_bricklink.cpp index 4e1776d1..af55fb09 100644 --- a/common/lc_bricklink.cpp +++ b/common/lc_bricklink.cpp @@ -1,312 +1,79 @@ - -#include - -#include "lc_colors.h" +#include "lc_global.h" #include "lc_file.h" #include "lc_library.h" #include "lc_mainwindow.h" -#include "lc_model.h" #include "pieceinf.h" -#include "project.h" - -namespace { +static QJsonDocument lcLoadBrickLinkMapping() +{ std::map Remapping; - std::string BrickLinkRemap(const char* LDBrick) + QFile File(lcGetPiecesLibrary()->mLibraryDir.absoluteFilePath(QLatin1String("ldraw2bl.txt"))); + QByteArray Data; + + if (File.open(QIODevice::ReadOnly)) + Data = File.readAll(); + else { - auto Remapped = Remapping.find(LDBrick); - if (Remapped != Remapping.end()) - { - return Remapped->second; - } - return LDBrick; + QFile DefaultFile(":/resources/ldraw2bl.txt"); + + if (DefaultFile.open(QIODevice::ReadOnly)) + Data = DefaultFile.readAll(); } - bool LoadRemapping() - { - if (!Remapping.empty()) - { - return false; - } - - QFile File(lcGetPiecesLibrary()->mLibraryDir.absoluteFilePath(QLatin1String("ldraw2bl.txt"))); - QByteArray Data; - - if (File.open(QIODevice::ReadOnly)) - Data = File.readAll(); - else - { - QFile DefaultFile(":/resources/ldraw2bl.txt"); - - if (DefaultFile.open(QIODevice::ReadOnly)) - Data = DefaultFile.readAll(); - } - - if (Data.isEmpty()) - return false; - - QTextStream Stream(Data); - QString Line; - while (!Stream.atEnd()) - { - Line = Stream.readLine(1024); - if (!Line.isEmpty() > 0) - { - // Commented line - if (Line.startsWith('!')) - { - continue; - } - auto parts = Line.trimmed().split(QLatin1Char(' ')); - if (parts.size() < 2) - { - qDebug() << "BL remappings: Invalid line" << Line; - continue; - } - auto result = Remapping.insert(std::make_pair(parts.value(0).toStdString(), - parts.value(1).toUtf8().data())); - if (!result.second) - qDebug() << "Duplicate" << parts.value(0); - } - } - - return true; - } - - int lcGetBrickLinkColor(int ColorIndex) - { - struct lcBrickLinkEntry - { - int LDraw; - int BrickLink; - }; - - lcBrickLinkEntry BrickLinkColors[] = - { - { 0, 11 }, // Black - { 1, 7 }, // Blue - { 2, 6 }, // Green - { 3, 39 }, // Dark Turquoise - { 4, 5 }, // Red - { 5, 47 }, // Dark Pink - { 6, 8 }, // Brown - { 7, 9 }, // Light Gray - { 8, 10 }, // Dark Gray - { 9, 62 }, // Light Blue - { 10, 36 }, // Bright Green - { 11, 40 }, // Light Turquoise - { 12, 25 }, // Salmon - { 13, 23 }, // Pink - { 14, 3 }, // Yellow - { 15, 1 }, // White - { 16, -1 }, // None - { 17, 38 }, // Light Green - { 18, 33 }, // Light Yellow - { 19, 2 }, // Tan - { 20, 44 }, // Light Violet - { 21, 46 }, // Glow in Dark Opaque - { 22, 24 }, // Purple - { 23, 109 }, // Dark Blue-Violet - { 24, -1 }, // None - { 25, 4 }, // Orange - { 26, 71 }, // Magenta - { 27, 34 }, // Lime - { 28, 69 }, // Dark Tan - { 29, 104 }, // Bright Pink - { 30, 157 }, // Medium Lavender - { 31, 154 }, // Lavender - { 32, 11 }, // Black - { 33, 14 }, // Trans-Dark Blue - { 34, 20 }, // Trans-Green - { 35, 108 }, // Trans-Bright Green - { 36, 17 }, // Trans-Red - { 37, 50 }, // Trans-Dark Pink - { 38, 18 }, // Trans-Neon Orange - { 39, 113 }, // Trans-Very Lt Blue - { 40, 13 }, // Trans-Black - { 41, 74 }, // Trans-Medium Blue - { 42, 16 }, // Trans-Neon Green - { 43, 15 }, // Trans-Light Blue - { 44, 114 }, // Trans-Light Purple - { 45, 107 }, // Trans-Pink - { 46, 19 }, // Trans-Yellow - { 47, 12 }, // Trans-Clear - { 52, 51 }, // Trans-Purple - { 54, 121 }, // Trans-Neon Yellow - { 57, 98 }, // Trans-Orange - { 60, 57 }, // Chrome Antique Brass - { 61, 52 }, // Chrome Blue - { 62, 64 }, // Chrome Green - { 63, 82 }, // Chrome Pink - { 64, 122 }, // Chrome Black - { 65, 3 }, // Yellow - { 66, 19 }, // Trans-Yellow - { 67, 12 }, // Trans-Clear - { 68, 96 }, // Very Light Orange - { 69, 93 }, // Light Purple - { 70, 88 }, // Reddish Brown - { 71, 86 }, // Light Bluish Gray - { 72, 85 }, // Dark Bluish Gray - { 73, 42 }, // Medium Blue - { 74, 37 }, // Medium Green - { 75, 116 }, // Speckle Black-Copper - { 76, 117 }, // Speckle DBGray-Silver - { 77, 56 }, // Light Pink - { 78, 90 }, // Light Flesh - { 79, 60 }, // Milky White - { 80, 67 }, // Metallic Silver - { 81, 70 }, // Metallic Green - { 82, 65 }, // Metallic Gold - { 83, 11 }, // Black - { 84, 150 }, // Medium Dark Flesh - { 85, 89 }, // Dark Purple - { 86, 91 }, // Dark Flesh - { 87, 77 }, // Pearl Dark Gray - { 89, 97 }, // Blue - Violet - { 92, 28 }, // Flesh - { 100, 26 }, // Light Salmon - { 110, 43 }, // Violet - { 112, 73 }, // Medium Violet - { 114, 100 }, // Glitter Trans-Dark Pink - { 115, 76 }, // Medium Lime - { 117, 101 }, // Glitter Trans-Clear - { 118, 41 }, // Aqua - { 120, 35 }, // Light Lime - { 125, 32 }, // Light Orange - { 128, 68 }, // Dark Orange - { 129, 102 }, // Glitter Trans-Purple - { 132, 111 }, // Speckle Black-Silver - { 133, 151 }, // Speckle Black-Gold - { 134, 84 }, // Copper - { 135, 66 }, // Pearl Light Gray - { 137, 78 }, // Metal Blue - { 142, 61 }, // Pearl Light Gold - { 148, 77 }, // Pearl Dark Gray - { 150, 119 }, // Pearl Very Light Gray - { 151, 99 }, // Very Light Bluish Gray - { 178, 81 }, // Flat Dark Gold - { 179, 95 }, // Flat Silver - { 183, 83 }, // Pearl White - { 191, 110 }, // Bright Light Orange - { 212, 105 }, // Bright Light Blue - { 216, 27 }, // Rust - { 226, 103 }, // Bright Light Yellow - { 232, 87 }, // Sky Blue - { 256, 11 }, // Black - { 272, 63 }, // Dark Blue - { 273, 7 }, // Blue - { 284, 114 }, // Trans-Light Purple - { 288, 80 }, // Dark Green - { 294, 118 }, // Glow In Dark Trans - { 297, 115 }, // Pearl Gold - { 308, 120 }, // Dark Brown - { 313, 72 }, // Maersk Blue - { 320, 59 }, // Dark Red - { 321, 153 }, // Dark Azure - { 322, 156 }, // Medium Azure - { 323, 152 }, // Light Aqua - { 324, 5 }, // Red - { 326, 158 }, // Yellowish Green - { 330, 155 }, // Olive Green - { 334, 21 }, // Chrome Gold - { 335, 58 }, // Sand Red - { 350, 4 }, // Orange - { 351, 94 }, // Medium Dark Pink - { 366, 29 }, // Earth Orange - { 373, 54 }, // Sand Purple - { 375, 9 }, // Light Gray - { 378, 48 }, // Sand Green - { 379, 55 }, // Sand Blue - { 383, 22 }, // Chrome Silver - { 406, 63 }, // Dark Blue - { 449, 24 }, // Purple - { 450, 106 }, // Fabuland Brown - { 462, 31 }, // Medium Orange - { 484, 68 }, // Dark Orange - { 490, 34 }, // Lime - { 493, -10 }, // Magnet - { 494, -11 }, // Electric_Contact_Alloy - { 495, -12 }, // Electric_Contact_Copper - { 496, 86 }, // Light Bluish Gray - { 503, 49 }, // Very Light Gray - { 504, 95 }, // Flat Silver - { 511, 1 }, // White - { 10001, 159 }, // Glow In Dark White - { 10002, 160 }, // Fabuland Orange - { 10003, 161 }, // Dark Yellow - { 10004, 162 }, // Glitter Trans-Light Blue - { 10005, 163 }, // Glitter Trans-Neon Green - { 10006, 164 }, // Trans-Light Orange - { 10007, 165 }, // Neon Orange - { 10008, 220 }, // Coral - { 10009, 166 }, // Neon Green - { 10010, 221 } // Trans-Light Green - }; - - int ColorCode = gColorList[ColorIndex].Code; - - for (unsigned int Color = 0; Color < LC_ARRAY_COUNT(BrickLinkColors); Color++) - if (BrickLinkColors[Color].LDraw == ColorCode) - return BrickLinkColors[Color].BrickLink; - - return 0; - } + return QJsonDocument::fromJson(Data); } -class Item +static std::string lcGetBrickLinkPart(const QJsonObject& PartMapping, const QString& LDrawPart) +{ + QJsonObject::const_iterator PartIt = PartMapping.find(LDrawPart); + + return (PartIt != PartMapping.end()) ? PartIt.value().toString().toStdString() : LDrawPart.toStdString(); +} + +static int lcGetBrickLinkColor(const QJsonObject& ColorMapping, int ColorIndex) +{ + int ColorCode = gColorList[ColorIndex].Code; + QJsonObject::const_iterator ColorIt = ColorMapping.find(QString::number(ColorCode)); + + return (ColorIt != ColorMapping.end()) ? ColorIt.value().toString().toInt() : 0; +} + +class lcBrickLinkItem { public: - Item(const std::string& id, int color, int count) + lcBrickLinkItem(const std::string& id, int color, int count) : mId(id), mColor(color), mCount(count) - { - } + { + } + void AddToCount(int count) - { - mCount += count; - } + { + mCount += count; + } + std::string mId; int mColor; int mCount; }; -void ExportBrickLink(const Project& project) +void lcExportBrickLink(const QString& SaveFileName, const lcPartsList& PartsList) { - lcPartsList PartsList; - - auto Models = project.GetModels(); - if (!Models.IsEmpty()) - Models[0]->GetPartsList(gDefaultColor, true, false, PartsList); - - if (PartsList.empty()) - { - QMessageBox::information(gMainWindow, project.tr("LeoCAD"), project.tr("Nothing to export.")); - return; - } - - QString SaveFileName = project.GetExportFileName(QString(), "xml", project.tr("Export BrickLink"), project.tr("XML Files (*.xml);;All Files (*.*)")); - - if (SaveFileName.isEmpty()) - return; - - if (Remapping.empty()) - { - if (!LoadRemapping()) - { - qDebug() << "Loading BL remappings failed."; - } - } + QJsonDocument Document = lcLoadBrickLinkMapping(); + QJsonObject Root = Document.object(); + QJsonObject PartMapping = Root["Parts"].toObject(); + QJsonObject ColorMapping = Root["Colors"].toObject(); lcDiskFile BrickLinkFile(SaveFileName); char Line[1024]; if (!BrickLinkFile.Open(QIODevice::WriteOnly)) { - QMessageBox::warning(gMainWindow, project.tr("LeoCAD"), project.tr("Could not open file '%1' for writing.").arg(SaveFileName)); + QMessageBox::warning(gMainWindow, QObject::tr("LeoCAD"), QObject::tr("Could not open file '%1' for writing.").arg(SaveFileName)); return; } - std::map Inventory; + std::map Inventory; BrickLinkFile.WriteLine("\n"); @@ -316,21 +83,20 @@ void ExportBrickLink(const Project& project) for (const auto& ColorIt : PartIt.second) { - char FileName[LC_PIECE_NAME_LEN]; strcpy(FileName, Info->mFileName); char* Ext = strchr(FileName, '.'); if (Ext) *Ext = 0; - std::string Remapped = BrickLinkRemap(FileName); - int Color = lcGetBrickLinkColor(ColorIt.first); + std::string Remapped = lcGetBrickLinkPart(PartMapping, FileName); + int Color = lcGetBrickLinkColor(ColorMapping, ColorIt.first); std::string key(Remapped); key += "-" + std::to_string(Color); auto iter = Inventory.find(key); if (iter == Inventory.end()) { - Inventory.emplace(std::make_pair(key, Item(Remapped, Color, ColorIt.second))); + Inventory.emplace(std::make_pair(key, lcBrickLinkItem(Remapped, Color, ColorIt.second))); } else { diff --git a/common/lc_bricklink.h b/common/lc_bricklink.h index 0e331765..6967a883 100644 --- a/common/lc_bricklink.h +++ b/common/lc_bricklink.h @@ -1,6 +1,3 @@ - #pragma once -class Project; - -void ExportBrickLink(const Project& project); +void lcExportBrickLink(const QString& FileName, const lcPartsList& PartsList); diff --git a/common/lc_viewwidget.cpp b/common/lc_viewwidget.cpp index 22b83f92..60083de8 100644 --- a/common/lc_viewwidget.cpp +++ b/common/lc_viewwidget.cpp @@ -31,6 +31,11 @@ QSize lcViewWidget::sizeHint() const return mPreferredSize.isEmpty() ? QOpenGLWidget::sizeHint() : mPreferredSize; } +lcView* lcViewWidget::GetView() const +{ + return mView.get(); +} + void lcViewWidget::SetView(lcView* View) { if (View) diff --git a/common/lc_viewwidget.h b/common/lc_viewwidget.h index 45e3b866..bf0fdcde 100644 --- a/common/lc_viewwidget.h +++ b/common/lc_viewwidget.h @@ -7,11 +7,7 @@ class lcViewWidget : public QOpenGLWidget public: lcViewWidget(QWidget* Parent, lcView* View); - lcView* GetView() const - { - return mView.get(); - } - + lcView* GetView() const; void SetView(lcView* View); QSize sizeHint() const override; diff --git a/common/project.cpp b/common/project.cpp index 993a8eec..6142b02c 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -1130,7 +1130,23 @@ bool Project::Export3DStudio(const QString& FileName) void Project::ExportBrickLink() { - ::ExportBrickLink(*this); + lcPartsList PartsList; + + if (!mModels.IsEmpty()) + mModels[0]->GetPartsList(gDefaultColor, true, false, PartsList); + + if (PartsList.empty()) + { + QMessageBox::information(gMainWindow, tr("LeoCAD"), tr("Nothing to export.")); + return; + } + + QString SaveFileName = GetExportFileName(QString(), "xml", tr("Export BrickLink"), tr("XML Files (*.xml);;All Files (*.*)")); + + if (SaveFileName.isEmpty()) + return; + + lcExportBrickLink(SaveFileName, PartsList); } bool Project::ExportCOLLADA(const QString& FileName) diff --git a/common/project.h b/common/project.h index 38d89183..db6232bf 100644 --- a/common/project.h +++ b/common/project.h @@ -98,9 +98,9 @@ public: void UpdatePieceInfo(PieceInfo* Info) const; +protected: QString GetExportFileName(const QString& FileName, const QString& DefaultExtension, const QString& DialogTitle, const QString& DialogFilter) const; -protected: std::vector GetModelParts(); void SetFileName(const QString& FileName); diff --git a/resources/ldraw2bl.txt b/resources/ldraw2bl.txt index 8089c874..5f5beb2f 100644 --- a/resources/ldraw2bl.txt +++ b/resources/ldraw2bl.txt @@ -1,425 +1,591 @@ -! 0 LDraw to BrickLink mappings. CC-0 licensed -10199 4672 -10201 2436b -10314 6191 -10498 90641 -10830 10830c01 -10830p01 10830c01 -11153 61678 -12825 2555 -13670 6587 -13731 85970 -14395 2339 -14533 90640 -14696 3711 -14769p06 14769pb003 -14769p07 14769pb011 -14769ps2 14769pb025 -15207 30413 -15379 3873 -15556 64567 -15646 90202 -15672 92946 -15712 2555 -16091 30663 -167 6190 -17514 88000 -18228 98385 -18575 32269 -18626 4025 -18738 30193 -18759 2341 -18841 553c -19475-f1 19475c01 -19478-f1 19467c01 -20401 20401pb01 -20430 6259 -21599 44375b -21709 30394 -21731 93274 -22749 32190 -22750 32191 -22972 32188 -22973 32189 -23065 41250 -23221 x153 -23893 87580 -2431p70 2431pb499 -2436a 2436 -24505 3648 -2454b 2454 -2476a 2476 -25194 19729 -2533c01 x110c01 -2543 x70 -25866c01 93094c01 -25866c02 93094c02 -25866c03 93094c03 -2588 2888 -2654a 2654 -26674-f1 bb875 -27059 90541 -2714 2714a -2723 2958 -2748 3857 -28290 56890 -2850a 2850 -28618 6126b -28653 3023 -28738 bb0892c01 -28809 18677 -28920 13770 -2894c01 590 -28959 43892 -28964 76766 -2910 109 -29219 62462 -298 4592 -30007 4215 -30008 3024 -30009 2362b -30010 4865 -30039 3070b -30057 4073 -30059 4346 -3005pf0 3005pb016 -30060 4345 -30061 4218 -30063 4740 -30065 3960 -30068 3062b -30069 4070 -30070 3069b -30071 3005 -30089a 30089 -30124 2446 -30125 4533 -30130 6133 -30224 x59 -30234 4285b -30244 2412b -30258p01 30258pb001 -30259 892 -30296p01 30296px1 -30320 30117 -30337 6192 -30345 989 -30367 553a -30367b 553b -30367c 553c -30369 x52 -30370 x164 -30385 52 -3039p04 3039px16 -3039p101 3039ps1 -3039pc8 3039pb013 -3039pc9 3039pb045 -3040b 3040 -3046 3046a -30475 x161 -30480 x134 -30499 3684a -30561 x132 -30646 30646a -3068bp00 3068bpb0116 -3069bp0i 3069bpb436 -3069bp12 3069p12 -3069p25 3069bp25 -3070bpty 3070bpb033 -30 70644 -30741 62576 -31459 3011 -31460 3437 -3149d 3149 -314d 314 -31511 98585 -32005 2739a -32006 2825 -32064a 32064 -32086 551 -32123 4265c -32123a 4265c -32123b 4265c -32126 44 -32239 6588 -32277 41239 -3228 3228a -32294 x136 -3245a 3245b -32476 x240 -32495c01 x873c01 -32496 x873 -32531 40344 -32531b 40344 -32532 40345 -32532b 40345 -33122 x112 -33176 x12 -33299a 33299 -33763 78c26 -34432 3649 -35331 87606 -35334 2447 -35338 54200 -35343 22388 -35382 3005 -35386 3069b -3626cp8k 3626cpb0405 -3626bps0 3626bpx48 -3626bp08 3626bpx83 -3626bp80 3626bpb0023 -3626bp84 3626bpb0628 -3648b 3648 -3650c 3650b -3660b 3660 -3665b 3665 -3729 3731 -37364 970cm00 -3747 3747a -3815 970 -3815b 970 -3816 971 -3816b 971 -3817 972 -3817b 972 -3818 982 -3819 981 -3820 983 -3957a 3957 -40240 x219 -4032a 4032 -40620 71137b -41357 40249 -4150ps0 4150px24 -41669 x346 -41751 x224 -41761 42021 -41762 42022 -41763 42023 -42019 41749 -42020 41750 -4210a 194 -42114 x156 -42284 30293 -42291 30294 -42409 x789 -42534 41539 -42657 4066 -4268 353 -4275b 4275 -4276b 4276 -4287a 4287 -4287b 4287 -4287c 4287 -43127 2419 -4328 x93 -43337 30413 -4345b 4345 -43675 78c19 -43802 4201 -44041 4204 -44042 2356 -44237 2456 -44360 x181 -44590 3754 -4476 4476b -44882 43898 -4503 x167 -45505 3622 -45729 44375a -46361 30562 -46667 x577 -47223d-f1 4694cc01 -4770 4773 -47904 30602 -482 30553 -48310 47543 -4865a 4865 -48729a 48729 -48729b 48729 -49673 49668 -50231 522 -50746 54200 -50903 x1307 -50951 50945 -51000 x1435 -51011 42611 -58119 59510c01 -51373 50990 -51595 30225 -51930 41250 -52211 3471 -52639 6510 -52901 2958 -53454 53705 -53933 30293 -53934 30294 -54196 2654 -55295 6246b -55298 6246a -55299 6246e -55300 6246d -55539 42604 -55709 32199 -56204 45411 -56640 43898 -56907 x1825 -57488 32558 -577 64567 -577b 64567 -578 30374 -58120 58120c01 -58121 58121c01 -58123 58123c01 -58123p01 58123bc01 -58572 4094 -58772 44359 -58773 44359 -59195 45705 -59350 59349 -59426 32209 -59443 6538c -59858 x167 -59900 4589b -60033 4202 -6014 6014b -6014c02 6014bc05 -60169 30104 -60288 57587 -604547 11402h -604548 11402c -604549 11402b -604550 11402a -604551 11402g -604552 11402i -604553 11402d -604614 11402f -604615 11402e -60470a 60470 -60475 30241 -60475b 30241b -60616a 60616 -60801 60583 -60803 57895 -60897 4085d -6090 x41 -6093 x104 -6098 3867 -6116 3941 -61183 43753 -6135 2536b -6135b 2536b -6141 4073 -6143 3941 -6188 4589 -61903 62520c01 -61929 bb0339c01 -6218 6259 -6221 424 -6223 3003 -6225 3023 -6227 3039 -6234 600 -6237 601 -6255 x8 -62622 4738a -62623 4739a -6264 3899 -6269 2343 -6270 3040 -62808 40359a -62821 62821b -62930 54930c02 -63965a 63965 -64228 87513c01 -64288 4589b -64289 40490 -64290 32525 -64634 62576 -64871 32278 -6562 3749 -6590 3713 -70358 590 -70973 48245 -71014 59 -71075a 71076 -71076a 71075 -71128 x85 -71137 71137b -71551 75c13 -71874 4740 -71944 78c06 -71951 78c08 -71952 78c04 -71986 78c11 -72039 78c18 -72040 71612cx1 -72504 78c02 -72706 78c03 -72824 x45 -731 731c02 -73603 3403c01 -74695 60483 -75347 6168c01 -75974 67c01 -75977 30086 -76019 60c01 -76116 98313 -76324 75c09 -76385 989 -769 23318 -85543 x71 -85544 x37 -85545 x89 -85546 x90 -86035 4485b -86209 60601 -86210 60603 -88072 4623b -88323 57518 -88412 3878 -88415 2446 -88422 42511 -88513 53451 -89650 61053 -90194 48183 -90393 90370 -90508 90301 -90510 30171 -91143 2431 -92290 92289 -92410 4532 -92411 44728 -92538 3006 -92693c02 92693c01 -92693c01-f1 92693c01 -92756 30410 -92903 6005 -93094 93094pb01 -93094p01 93094pb01 -! 93221 LDraw has only one version -93221 93221pb01 -93549 93549pb01 -93791 2654 -93792 3004 -93794 2555 -! 93888 Unoffical LDraw part -93888 3007 -94148 3022 -94638 87552 -95820 30237b -96910 99563 -973p101 973ps1 -973p6x 973px132 -973paw 973pb1336 -973pr3 973px58 -975 982 -976 981 -977 983 -98313 53989 -98384 98384pb01 -98570 98570pb01 -99498 99498c01 -99499 99499c01 -u9026 3062old -x223 33320 +{ + "Comment": "LDraw to BrickLink mappings. CC-0 licensed", + "Parts": + { + "10199": "4672", + "10201": "2436b", + "10314": "6191", + "10498": "90641", + "10830": "10830c01", + "10830p01": "10830c01", + "11153": "61678", + "12825": "2555", + "13670": "6587", + "13731": "85970", + "14395": "2339", + "14533": "90640", + "14696": "3711", + "14769p06": "14769pb003", + "14769p07": "14769pb011", + "14769ps2": "14769pb025", + "15207": "30413", + "15379": "3873", + "15556": "64567", + "15646": "90202", + "15672": "92946", + "15712": "2555", + "16091": "30663", + "167": "6190", + "17514": "88000", + "18228": "98385", + "18575": "32269", + "18626": "4025", + "18738": "30193", + "18759": "2341", + "18841": "553c", + "19475-f1": "19475c01", + "19478-f1": "19467c01", + "20401": "20401pb01", + "20430": "6259", + "21599": "44375b", + "21709": "30394", + "21731": "93274", + "22749": "32190", + "22750": "32191", + "22972": "32188", + "22973": "32189", + "23065": "41250", + "23221": "x153", + "23893": "87580", + "2431p70": "2431pb499", + "2436a": "2436", + "24505": "3648", + "2454b": "2454", + "2476a": "2476", + "25194": "19729", + "2533c01": "x110c01", + "2543": "x70", + "25866c01": "93094c01", + "25866c02": "93094c02", + "25866c03": "93094c03", + "2588": "2888", + "2654a": "2654", + "26674-f1": "bb875", + "27059": "90541", + "2714": "2714a", + "2723": "2958", + "2748": "3857", + "28290": "56890", + "2850a": "2850", + "28618": "6126b", + "28653": "3023", + "28738": "bb0892c01", + "28809": "18677", + "28920": "13770", + "2894c01": "590", + "28959": "43892", + "28964": "76766", + "2910": "109", + "29219": "62462", + "298": "4592", + "30007": "4215", + "30008": "3024", + "30009": "2362b", + "30010": "4865", + "30039": "3070b", + "30057": "4073", + "30059": "4346", + "3005pf0": "3005pb016", + "30060": "4345", + "30061": "4218", + "30063": "4740", + "30065": "3960", + "30068": "3062b", + "30069": "4070", + "30070": "3069b", + "30071": "3005", + "30089a": "30089", + "30124": "2446", + "30125": "4533", + "30130": "6133", + "30224": "x59", + "30234": "4285b", + "30244": "2412b", + "30258p01": "30258pb001", + "30259": "892", + "30296p01": "30296px1", + "30320": "30117", + "30337": "6192", + "30345": "989", + "30367": "553a", + "30367b": "553b", + "30367c": "553c", + "30369": "x52", + "30370": "x164", + "30385": "52", + "3039p04": "3039px16", + "3039p101": "3039ps1", + "3039pc8": "3039pb013", + "3039pc9": "3039pb045", + "3040b": "3040", + "3046": "3046a", + "30475": "x161", + "30480": "x134", + "30499": "3684a", + "30561": "x132", + "30646": "30646a", + "3068bp00": "3068bpb0116", + "3069bp0i": "3069bpb436", + "3069bp12": "3069p12", + "3069p25": "3069bp25", + "3070bpty": "3070bpb033", + "30": "70644", + "30741": "62576", + "31459": "3011", + "31460": "3437", + "3149d": "3149", + "314d": "314", + "31511": "98585", + "32005": "2739a", + "32006": "2825", + "32064a": "32064", + "32086": "551", + "32123": "4265c", + "32123a": "4265c", + "32123b": "4265c", + "32126": "44", + "32239": "6588", + "32277": "41239", + "3228": "3228a", + "32294": "x136", + "3245a": "3245b", + "32476": "x240", + "32495c01": "x873c01", + "32496": "x873", + "32531": "40344", + "32531b": "40344", + "32532": "40345", + "32532b": "40345", + "33122": "x112", + "33176": "x12", + "33299a": "33299", + "33763": "78c26", + "34432": "3649", + "35331": "87606", + "35334": "2447", + "35338": "54200", + "35343": "22388", + "35382": "3005", + "35386": "3069b", + "3626cp8k": "3626cpb0405", + "3626bps0": "3626bpx48", + "3626bp08": "3626bpx83", + "3626bp80": "3626bpb0023", + "3626bp84": "3626bpb0628", + "3648b": "3648", + "3650c": "3650b", + "3660b": "3660", + "3665b": "3665", + "3729": "3731", + "37364": "970cm00", + "3747": "3747a", + "3815": "970", + "3815b": "970", + "3816": "971", + "3816b": "971", + "3817": "972", + "3817b": "972", + "3818": "982", + "3819": "981", + "3820": "983", + "3957a": "3957", + "40240": "x219", + "4032a": "4032", + "40620": "71137b", + "41357": "40249", + "4150ps0": "4150px24", + "41669": "x346", + "41751": "x224", + "41761": "42021", + "41762": "42022", + "41763": "42023", + "42019": "41749", + "42020": "41750", + "4210a": "194", + "42114": "x156", + "42284": "30293", + "42291": "30294", + "42409": "x789", + "42534": "41539", + "42657": "4066", + "4268": "353", + "4275b": "4275", + "4276b": "4276", + "4287a": "4287", + "4287b": "4287", + "4287c": "4287", + "43127": "2419", + "4328": "x93", + "43337": "30413", + "4345b": "4345", + "43675": "78c19", + "43802": "4201", + "44041": "4204", + "44042": "2356", + "44237": "2456", + "44360": "x181", + "44590": "3754", + "4476": "4476b", + "44882": "43898", + "4503": "x167", + "45505": "3622", + "45729": "44375a", + "46361": "30562", + "46667": "x577", + "47223d-f1": "4694cc01", + "4770": "4773", + "47904": "30602", + "482": "30553", + "48310": "47543", + "4865a": "4865", + "48729a": "48729", + "48729b": "48729", + "49673": "49668", + "50231": "522", + "50746": "54200", + "50903": "x1307", + "50951": "50945", + "51000": "x1435", + "51011": "42611", + "58119": "59510c01", + "51373": "50990", + "51595": "30225", + "51930": "41250", + "52211": "3471", + "52639": "6510", + "52901": "2958", + "53454": "53705", + "53933": "30293", + "53934": "30294", + "54196": "2654", + "55295": "6246b", + "55298": "6246a", + "55299": "6246e", + "55300": "6246d", + "55539": "42604", + "55709": "32199", + "56204": "45411", + "56640": "43898", + "56907": "x1825", + "57488": "32558", + "577": "64567", + "577b": "64567", + "578": "30374", + "58120": "58120c01", + "58121": "58121c01", + "58123": "58123c01", + "58123p01": "58123bc01", + "58572": "4094", + "58772": "44359", + "58773": "44359", + "59195": "45705", + "59350": "59349", + "59426": "32209", + "59443": "6538c", + "59858": "x167", + "59900": "4589b", + "60033": "4202", + "6014": "6014b", + "6014c02": "6014bc05", + "60169": "30104", + "60288": "57587", + "604547": "11402h", + "604548": "11402c", + "604549": "11402b", + "604550": "11402a", + "604551": "11402g", + "604552": "11402i", + "604553": "11402d", + "604614": "11402f", + "604615": "11402e", + "60470a": "60470", + "60475": "30241", + "60475b": "30241b", + "60616a": "60616", + "60801": "60583", + "60803": "57895", + "60897": "4085d", + "6090": "x41", + "6093": "x104", + "6098": "3867", + "6116": "3941", + "61183": "43753", + "6135": "2536b", + "6135b": "2536b", + "6141": "4073", + "6143": "3941", + "6188": "4589", + "61903": "62520c01", + "61929": "bb0339c01", + "6218": "6259", + "6221": "424", + "6223": "3003", + "6225": "3023", + "6227": "3039", + "6234": "600", + "6237": "601", + "6255": "x8", + "62622": "4738a", + "62623": "4739a", + "6264": "3899", + "6269": "2343", + "6270": "3040", + "62808": "40359a", + "62821": "62821b", + "62930": "54930c02", + "63965a": "63965", + "64228": "87513c01", + "64288": "4589b", + "64289": "40490", + "64290": "32525", + "64634": "62576", + "64871": "32278", + "6562": "3749", + "6590": "3713", + "70358": "590", + "70973": "48245", + "71014": "59", + "71075a": "71076", + "71076a": "71075", + "71128": "x85", + "71137": "71137b", + "71551": "75c13", + "71874": "4740", + "71944": "78c06", + "71951": "78c08", + "71952": "78c04", + "71986": "78c11", + "72039": "78c18", + "72040": "71612cx1", + "72504": "78c02", + "72706": "78c03", + "72824": "x45", + "731": "731c02", + "73603": "3403c01", + "74695": "60483", + "75347": "6168c01", + "75974": "67c01", + "75977": "30086", + "76019": "60c01", + "76116": "98313", + "76324": "75c09", + "76385": "989", + "769": "23318", + "85543": "x71", + "85544": "x37", + "85545": "x89", + "85546": "x90", + "86035": "4485b", + "86209": "60601", + "86210": "60603", + "88072": "4623b", + "88323": "57518", + "88412": "3878", + "88415": "2446", + "88422": "42511", + "88513": "53451", + "89650": "61053", + "90194": "48183", + "90393": "90370", + "90508": "90301", + "90510": "30171", + "91143": "2431", + "92290": "92289", + "92410": "4532", + "92411": "44728", + "92538": "3006", + "92693c02": "92693c01", + "92693c01-f1": "92693c01", + "92756": "30410", + "92903": "6005", + "93094": "93094pb01", + "93094p01": "93094pb01", + "!93221": "LDraw has only one version", + "93221": "93221pb01", + "93549": "93549pb01", + "93791": "2654", + "93792": "3004", + "93794": "2555", + "!93888": "Unoffical LDraw part", + "93888": "3007", + "94148": "3022", + "94638": "87552", + "95820": "30237b", + "96910": "99563", + "973p101": "973ps1", + "973p6x": "973px132", + "973paw": "973pb1336", + "973pr3": "973px58", + "975": "982", + "976": "981", + "977": "983", + "98313": "53989", + "98384": "98384pb01", + "98570": "98570pb01", + "99498": "99498c01", + "99499": "99499c01", + "u9026": "3062old", + "x223": "33320" + }, + "Colors": + { + "0": "11", + "1": "7", + "2": "6", + "3": "39", + "4": "5", + "5": "47", + "6": "8", + "7": "9", + "8": "10", + "9": "62", + "10": "36", + "11": "40", + "12": "25", + "13": "23", + "14": "3", + "15": "1", + "16": "-1", + "17": "38", + "18": "33", + "19": "2", + "20": "44", + "21": "46", + "22": "24", + "23": "109", + "24": "-1", + "25": "4", + "26": "71", + "27": "34", + "28": "69", + "29": "104", + "30": "157", + "31": "154", + "32": "11", + "33": "14", + "34": "20", + "35": "108", + "36": "17", + "37": "50", + "38": "18", + "39": "113", + "40": "13", + "41": "74", + "42": "16", + "43": "15", + "44": "114", + "45": "107", + "46": "19", + "47": "12", + "52": "51", + "54": "121", + "57": "98", + "60": "57", + "61": "52", + "62": "64", + "63": "82", + "64": "122", + "65": "3", + "66": "19", + "67": "12", + "68": "96", + "69": "93", + "70": "88", + "71": "86", + "72": "85", + "73": "42", + "74": "37", + "75": "116", + "76": "117", + "77": "56", + "78": "90", + "79": "60", + "80": "67", + "81": "70", + "82": "65", + "83": "11", + "84": "150", + "85": "89", + "86": "91", + "87": "77", + "89": "97", + "92": "28", + "100": "26", + "110": "43", + "112": "73", + "114": "100", + "115": "76", + "117": "101", + "118": "41", + "120": "35", + "125": "32", + "128": "68", + "129": "102", + "132": "111", + "133": "151", + "134": "84", + "135": "66", + "137": "78", + "142": "61", + "148": "77", + "150": "119", + "151": "99", + "178": "81", + "179": "95", + "183": "83", + "191": "110", + "212": "105", + "216": "27", + "226": "103", + "232": "87", + "256": "11", + "272": "63", + "273": "7", + "284": "114", + "288": "80", + "294": "118", + "297": "115", + "308": "120", + "313": "72", + "320": "59", + "321": "153", + "322": "156", + "323": "152", + "324": "5", + "326": "158", + "330": "155", + "334": "21", + "335": "58", + "350": "4", + "351": "94", + "366": "29", + "373": "54", + "375": "9", + "378": "48", + "379": "55", + "383": "22", + "406": "63", + "449": "24", + "450": "106", + "462": "31", + "484": "68", + "490": "34", + "493": "-10", + "494": "-11", + "495": "-12", + "496": "86", + "503": "49", + "504": "95", + "511": "1", + "10001": "159", + "10002": "160", + "10003": "161", + "10004": "162", + "10005": "163", + "10006": "164", + "10007": "165", + "10008": "220", + "10009": "166", + "10010": "221" + } +}