LDraw.org Discussion Forums

Full Version: Tutorial: Adding unofficial LDraw parts to MLCad
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Guys,

attached you'll find the first draft of my new tutorial: Adding unofficial LDraw parts to MLCad.

I would appreciate some feedback. Also your tips and tricks when working with unofficials are welcome.

w.
I disagree with the entire notion of installing the complete unofficial parts "library". It's not a library, rather a collection of WIP parts on the parts tracker. The website page for the unofficial parts which you even took a screenshot of goes out of its way to mention first off that these parts are liable to change without warning and it's generally much better to get them one-by-one. I don't think we want to encourage the ultimately reckless behavior of getting all the unofficial parts. We'll just get users complaining that their models break because they used held parts...
I think Willy has been pretty explicit in identifying most of the risks, but it would be nice to put that standard disclaimer at the very top of the document.

I have some comments:

1) The zip file is normally refreshed every 5 minutes, but if only there have been any changes. [Sometimes it also gets refreshed manually in between, if I've done a bunch of renames].

2) I may have missed it, but there should be a recommendation to never, ever put the Unofficial "library" ahead of the Official library in the search path. This can potentially break existing models, and although it's rare and hard to explain, it might be worth adding.

a) This can happen because sometimes we change already official files to move code in or out of their parents. Whilst at Parts Update time we ensure that fixes to all dependent files are released together, they won't all necessarily exist on the Parts Tracker at a particular point in time. The most common case is when an existing official part is subparted to allow for patterning. The symptoms depend on what has been changed and in what order the author adds the new subpart and its parent to the Parts Tracker. If the parent is added first there will be missing surfaces until the subpart is added.

b) If the interface between a subpart and its parent get changed then even adding the subpart first may cause problems if it takes a while to upload all it related parents.

3) Sometime when a bunch of related parts and subparts get added with bad names, the renaming and re-organising can span across several interations of the file refresh. In extreme cases I may need to do something else (like eat) part way through. In these cases, even new parts the unofficial area can appear broken for extended period of time.

4) Unzipping a zip archive into an existing directory is an additive process. I think you should recommend that users clean out or delete the unofficial directory each time they unzip a new download. Otherwise they risk accumulating files that have later been renamed and will never appear in the official library with that number.

5) All files issued in a Parts Update are programmatically checked to ensure that they have valid LDraw headers, including the License statement and are authored by someone who has affirmed the Contributor Agreement. I have not implemented that check at upload to time for fear of novice authors might lose interest in failing those checks on an otherwise perfect part.

6) I can't remember if I have ever checked that we have nothing left on the Parts Tracker from any non-CA authors. If I find them I usually hold for redevelopment, but that doesn't stop them being included in the zip file. We shouldn't be distributing those (even as one-by-one downloads, really).
You've got some very good points I'm gonna include.

w.
I think you need to adress the issue of duplicated files somehow.

The unofficial library also contains all the updated, new versions of official parts being reworked.
As far as I know the scan order in mlcad.ini defines what version you will see. An updated part in the unofficial folder, will only be seen in MLCad if you remove it from the ordinary parts folder too. How do LDView decide which file to show? LPub? LDMakeList?

I do it like that. I always move the official version to a third folder "old parts", in a retained folder structure.
The downside is that every release of a Parts Update means that I have to rearrange all my files. It's either that or dump all the unofficial parts in the ordinary Parts folder. I want to only see and work with the latest versions of all the parts.

Or is there an another way?

That's also why I never use the "parts update".exe. It doesn't only adds the new parts. It also adds all the official files.
I don't want to have the files that are not ready for release, reinstated in my official folder.
Chris Dee Wrote:6) I can't remember if I have ever checked that we have nothing left on the Parts Tracker from any non-CA authors. If I find them I usually hold for redevelopment, but that doesn't stop them being included in the zip file. We shouldn't be distributing those (even as one-by-one downloads, really).

There are no files with the explicit Non-CA license line in the unofficial parts archive ldrawunf.zip. There are, however, a total of 40 files without the explicit CA license header. I don't know about William J. Wood or Paul Izquierdo Rojas but the others look rather CA-affirmed to me...
Code:
[~/desktop/ldrawunf] > for f in $(find -type f); do if [ -z "$(grep CAreadme $f)" ]; then echo -e "$f: $(head -n1 $f)\n$(head -n3 $f |tail -n1)\n"; fi; done    
./parts/32562.dat: 0 ~Electric USB Camera Bottom
0 Author: William J. Wood

./parts/73311.dat: 0 _Bike  2 Wheel Motorcycle with Red Wheels (Complete) Lt Grey
0 Author: Chris Dee

./parts/3496.dat: 0 Tap  1 x  2 Base
0 Author: Tore Eriksson

./parts/x224.dat: 0 ~Technic Rubber Belt element R13
0 Author: Philippe Hurbain [Philo]

./parts/x51ps1.dat: 0 Technic Dome 6 x 6 x 5 2/3 No Eye Pattern
0 Author: William J. Wood

./parts/32561.dat: 0 ~Electric USB Camera Top
0 Author: William J. Wood [wjwood]

./parts/41660.dat: 0 Technic Bionicle 5 x 5 Shield with Circular Saw (MOCKUP)
0 Author: Michael Heidemann [mikeheide]

./parts/x447.dat: 0 ~Train Wheel Old with  4 Studs and Traction Teeth
0 Author: Niels Karsdorp

./parts/41663.dat: 0 Technic Bionicle 5 x 5 Shield with Dual Blasters (MOCKUP)
0 Author: Michael Heidemann [mikeheide]

./parts/x51ps2.dat: 0 Technic Dome 6 x 6 x 5 2/3 Eye Pattern
0 Author: William J. Wood

./parts/x223.dat: 0 Technic Rubber Belt (open file for usage guide)
0 Author: Philippe Hurbain [Philo]

./parts/3004p07.dat: 0 Brick  1 x  2 with Ice Cream Pattern
0 Author: Michael Heidemann

./parts/73538.dat: 0 _Bike  2 Wheel Motorcycle with Red Wheels (Complete) White
0 Author: Chris Dee

./parts/3278.dat: 0 ~Tap  1 x  2 Spout (Needs Work)
0 Author: Tore Eriksson

./parts/3496c02.dat: 0 Tap  1 x  2 with Chrome Spout
0 Author: Steffen [Steffen]

./parts/43460.dat: 0 ~Subpart of Electric RC Race Buggy Steering Unit (Left)
0 Author: Guy Vivan

./parts/x228.dat: 0 ~Technic Rubber Belt straight
0 Author: Philippe Hurbain [Philo]

./parts/3496c01.dat: 0 Tap  1 x  2
0 Author: Tore Eriksson

./parts/32561c01.dat: 0 Electric USB Camera with TransBlack Bottom and LtGrey Focus Ring
0 Author: William J. Wood

./parts/2982c02.dat: 0 Electric Light Sensor (Complete Assembly Shortcut with Cable)
0 Author: Kevin L. Clague

./parts/73327.dat: 0 _Bike  2 Wheel Motorcycle with Red Wheels (Complete) Blue
0 Author: Chris Dee

./parts/x225.dat: 0 ~Technic Rubber Belt element R30.5
0 Author: Philippe Hurbain [Philo]

./parts/x226.dat: 0 ~Technic Rubber Belt element R47
0 Author: Philippe Hurbain [Philo]

./parts/3004p70.dat: 0 Brick  1 x  2 with Fire Logo and White Diagonal Stripes Pattern
0 Author: Michael Heidemann [mikeheide]

./parts/x227.dat: 0 ~Technic Rubber Belt element R9
0 Author: Philippe Hurbain [Philo]

./parts/4719c03.dat: 0 ~Minifig Bicycle Minifig Rider (Shortcut)
0 Author: William Howard

./parts/5306c01.dat: 0 Electric Wire with End Connectors  2 x  2 (Complete)
0 Author: Kevin L. Clague

./parts/32552.dat: 0 Technic Bionicle Weapon Double-Edged Sword
0 Author: Robert Sexton

./parts/s/32552s01.dat: 0 ~Technic Bionicle Weapon Double-Edged Sword Handle
0 Author: Robert Sexton

./parts/s/32552s02.dat: 0 ~Technic Bionicle Weapon Double-Edged Sword Blade
0 Author: Robert Sexton

./parts/s/x51s01.dat: 0 ~Technic Dome 6 x 6 x 5 2/3 No Pattern
0 Author: William J. Wood

./parts/s/x51s02.dat: 0 ~Technic Dome 6 x 6 x 5 2/3 Side
0 Author: William J. Wood

./parts/73419.dat: 0 _Bike  2 Wheel Motorcycle with Red Wheels (Complete) Yellow
0 Author: Chris Dee

./parts/2977c02.dat: 0 Electric Rotation Sensor (Complete Assembly Shortcut with Cable)
0 Author: Kevin L. Clague

./parts/43459.dat: 0 ~Subpart of Electric RC Race Buggy Steering Unit (Right)
0 Author: Guy Vivan

./parts/32561c02.dat: 0 Electric USB Camera with TransBlue Bottom and Yellow Focus Ring
0 Author: William J. Wood

./parts/x325.dat: 0 ~Electric Camera USB Focus Ring
0 Author: William J. Wood

./parts/73429.dat: 0 _Bike  2 Wheel Motorcycle with Red Wheels (Complete) Red
0 Author: Chris Dee

./parts/30185c01.dat: 0 Window Bay  3 x  8 x  6 with Smoke Glass
0 Author: William Howard [WilliamH]

./parts/33230.dat: 0 Brick 16 x 16 1/4 Circle
0 Author: Paul Izquierdo Rojas
Magnus Forsberg Wrote:That's also why I never use the "parts update".exe. It doesn't only adds the new parts. It also adds all the official files.
I don't want to have the files that are not ready for release, reinstated in my official folder.

I don't understand. If you mean by "parts update".exe the Windows installer for the complete library (e.g. LDraw1401.exe), that only installs parts that are ready for release, but you are correct that it re-installs the entire Official Library. It does NOT install files that are not ready for release.
Just for the record, for years I have used the brute force, simple minded method: when there is an update, I unzip complete.zip over my LDraw folder, then on top of it, unzip current ldrawunf.zip (that I sometimes refresh between updates). No complex configuration to do, and I have yet to see ill effects of this method!
Granted, the thing I do is to make mpd of valuable models including unofficial parts, using mpdwizard and a reference folder containing complete.zip.
Thanks for producing this and saving me some work in identifying those files. I'll work through the list.
Yes.
I know that it doesn't install any parts that are not ready for release.
It re-installs the entire current official library, and as I tried to explain, I don't want that. Only the new and updated parts.

Maybe I should do it like Philo does. All files in one library.
But I sometimes want to do a comparative study of new and old files.....

We have LDFind and LDStructure to help us in finding files. I wish we had a LD Library Manager.
Pages: 1 2 3