LDraw.org Discussion Forums

Full Version: Lay out all the parts in model
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone have a tool or script that would take a standard LDR or MPD file and then create a new LDR file that contains all the parts from that model, but lay them out in nice neat rows? The layout as shown below is the kind of thing I'm after.

[Image: v9-2.jpg]

Ideally the script would have some sort of bounding box method to intelligently position the pieces.

As an alternative, is there a script or tool that can analyse the pieces in an LDR file and generate an output like this (ideally as a new LDR file)?

[Image: L%28EGO%29Draw33.png]

How about a more clever script that takes all the parts and then randomly assembles them in a pile - like this:
[Image: LegoBricks.jpg]
FYI: I've made the first picture by placing the parts manually in MLCAD.
Your second picture is basically a BOM as in LPUB.

However the BOM Pictures are not all the same size, they are in relation to each other.
Checkout My little tool:

https://github.com/zzjin/ldraw_explosion

[Image: car_origin.png]=>[Image: car_explosion.png]
...stupid question (Github noob here):
"Download prebuilt one-file-binary for your platform, and drag&drop ldr file on it." Where do we download binary?
(2021-05-13, 14:52)Philippe Hurbain Wrote: [ -> ]...stupid question (Github noob here):
"Download prebuilt one-file-binary for your platform, and drag&drop ldr file on it." Where do we download binary?

https://github.com/zzjin/ldraw_explosion/releases
(2021-05-13, 12:16)zzjin zeng Wrote: [ -> ]Checkout My little tool:

https://github.com/zzjin/ldraw_explosion

[Image: car_origin.png]=>[Image: car_explosion.png]

great job!
Funny little tool Smile To make echo to this discussion https://forums.ldraw.org/thread-23610-po...l#pid33654 , doesn't work with mpd extension, had to rename to .ldr...
(2021-05-14, 6:05)Philippe Hurbain Wrote: [ -> ]Funny little tool Smile To make echo to this discussion https://forums.ldraw.org/thread-23610-po...l#pid33654 , doesn't work with mpd extension, had to rename to .ldr...

thanks for testing~. I'll look at .mpd file support asap.
Interesting. Where can I find lp_win.exe? I am not able to build it. Wouldn't have a clue how  Blush
I'd like to test too.
(2021-06-11, 9:29)Jaco van der Molen Wrote: [ -> ]Interesting. Where can I find lp_win.exe? I am not able to build it. Wouldn't have a clue how  Blush
I'd like to test too.

As far as I see, it is inclueded in the link, Travis posted last month.
(2021-06-11, 13:50)Max Martin Richter Wrote: [ -> ]As far as I see, it is inclueded in the link, Travis posted last month.

Ah yes, found it. Looked over it.
I’ll give it a try
(2021-06-11, 15:42)Jaco van der Molen Wrote: [ -> ]Ah yes, found it. Looked over it.
I’ll give it a try

Doesn't work :-( ?

I downloaded https://github.com/zzjin/ldraw_explosion...lp_win.exe in the same folder as my LDR file.
Drag and drop LDR on EXE nothing happens...
(2021-06-14, 7:53)Jaco van der Molen Wrote: [ -> ]Doesn't work :-( ?

Some files work, and some don't.
Is the program looking for something in the fileheader? Or in the structure in the file?
(2021-06-14, 16:08)Magnus Forsberg Wrote: [ -> ]Some files work, and some don't.
Is the program looking for something in the fileheader? Or in the structure in the file?

Ah, OK. I will try a few other files too then, I have only tried one ;-)