Tool to combine/reduce the number of parts? - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html) +--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html) +--- Thread: Tool to combine/reduce the number of parts? (/thread-23880.html) |
Tool to combine/reduce the number of parts? - Michael Horvath - 2020-02-06 I am creating a large mosaic image. Unfortunately, the largest plate in MLCAD's generator is 2x4, and the largest in LDDMC is 2x2. So this large mosaic has many many small parts. Is there a tool that can, say, combine two 2x4 plates to create one 4x4 plate, etc.? Thank you. Mike RE: Tool to combine/reduce the number of parts? - Lasse Deleuran - 2020-02-06 (2020-02-06, 20:04)Michael Horvath Wrote: I am creating a large mosaic image. Unfortunately, the largest plate in MLCAD's generator is 2x4, and the largest in LDDMC is 2x2. So this large mosaic has many many small parts. Is there a tool that can, say, combine two 2x4 plates to create one 4x4 plate, etc.? Thank you.In LDDMC under "Settings" -> "Export" you can set it to substitute parts according to your "part_types.txt" file. Enabling this will cause the generated LDraw file to use larger plates when possible. If you really want to just build with 4x4 plates, then I can add that as an option to "construction techniques" as well. You can also create the mosaic with 1x1 plates and simply use 4x4 plates when building. It all depends on your use case. RE: Tool to combine/reduce the number of parts? - Michael Horvath - 2020-02-07 (2020-02-06, 23:37)Lasse Deleuran Wrote: In LDDMC under "Settings" -> "Export" you can set it to substitute parts according to your "part_types.txt" file. Enabling this will cause the generated LDraw file to use larger plates when possible. Wow, I did not know LDDMC was configurable! I will take a look at "part_types.txt", thanks. What I really want is for the program to always use the largest plates possible. RE: Tool to combine/reduce the number of parts? - Lasse Deleuran - 2020-02-07 (2020-02-07, 11:45)Michael Horvath Wrote: Wow, I did not know LDDMC was configurable! I will take a look at "part_types.txt", thanks. What I really want is for the program to always use the largest plates possible. LDDMC tries to maximize the size of the parts used. However. Placing one very large part might force the use of a larger number of smaller parts, so this is not an easy problem to solve. LDDMC uses a heuristic where it always tries to cover the mosaic in the largest parts first, then the second largest, and so on. It is not guaranteed that it will always choose the optimal placement, or largest plates as you put it. For the nitty-gritty details, the source code for the heuristic is found here: https://github.com/LasseD/brickgraphics/blob/master/src/building/Optimizer.java RE: Tool to combine/reduce the number of parts? - Michael Horvath - 2020-02-07 (2020-02-07, 12:39)Lasse Deleuran Wrote: LDDMC tries to maximize the size of the parts used. However. Placing one very large part might force the use of a larger number of smaller parts, so this is not an easy problem to solve. LDDMC uses a heuristic where it always tries to cover the mosaic in the largest parts first, then the second largest, and so on. It is not guaranteed that it will always choose the optimal placement, or largest plates as you put it. For the nitty-gritty details, the source code for the heuristic is found here: https://github.com/LasseD/brickgraphics/blob/master/src/building/Optimizer.java Good to know, thank you! RE: Tool to combine/reduce the number of parts? - Michael Horvath - 2020-03-13 (2020-02-06, 23:37)Lasse Deleuran Wrote: In LDDMC under "Settings" -> "Export" you can set it to substitute parts according to your "part_types.txt" file. Enabling this will cause the generated LDraw file to use larger plates when possible. In which folder is "part_types.txt" supposed to go? What is the syntax inside this file? Could you provide an example? Thanks. |