LDraw.org Discussion Forums

Full Version: Submodels, mpd, and Lpub3D
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Howdy y'all. I've been using MLCAD forever but just started using Lpub3D a few months ago. I've overcome a lot of learning curve but now I've run into a problem. I created a neat little model that I'm giving away as a prize. Since there's some SNOT and inverted building involved, I decided to break the model into 14 submodels for clarity's sake.

Great, figured out the mpd function in MLCAD.

Then I bring it into Lpub3D. I don't necessarily want every submodel to look like a callout so I group steps together for each submodel and remove the callout formatting so it looks like you're building a bunch of table scraps.

Here's where my problem comes in.

I want to build submodel 1, 2, and 3 and then show how they go together. Then I want to build submodel 4 and attach it to the growing assembly, then submodel 5 and 6 and attach them to the main model. Build submodels 7-10 and show them being attached. Submodels 11 and 12 get built directly onto the main model. There are 4 copies of submodel 13, then attach them, finally submodel 14 goes in place and then gets rotated a bit.

I know there's a buffer exchange solution in here somewhere. I'm just not sure how to show a few submodels getting built, then show the main model with those submodels attached, then go to build a few more submodels, then attach them, etc.

One solution I thought of is to create a few ldr files that show the main build in progress and insert them into the main mpd. But then I'm not sure how to show those correctly throughout the instructions.

I could share my mpd file but I'm trying to keep it a highly guarded secret for now.

Thanks, Dag
(2018-02-09, 7:20)Brian Dag Wrote: [ -> ]<snip>
I want to build submodel 1, 2, and 3 and then show how they go together. Then I want to build submodel 4 and attach it to the growing assembly, then submodel 5 and 6 and attach them to the main model. Build submodels 7-10 and show them being attached. Submodels 11 and 12 get built directly onto the main model. There are 4 copies of submodel 13, then attach them, finally submodel 14 goes in place and then gets rotated a bit.
<snip>

One way to tackle this is to have multiple sub-levels of sub-models. You create your 13 individual "bottom-most" sub-models and then combine them to form another sub-model. For example;

Your top-level model would be defined as:
  Sub-model [A]
    Which is created as the combination of [1], [2] and [3]
  (Insert a "STEP" command here).
  Add [4]
  (Insert a "STEP" command here).
  Add [5]
  Add [6]
  (Insert a "STEP" command here).
  Add [7]
  Add [8]
  Add [9]
  Add [10]
  (Insert a "STEP" command here).
  Add [11]
  Add [12]
  (Insert a "STEP" command here).

  Add [13] #1
  (Insert a "STEP" command here).
  Add [13] #2
  (Insert a "STEP" command here).
  Add [13] #3
  (Insert a "STEP" command here).
  Add [13] #4
  (Insert a "ROTSTEP" command here).

N.B. you may find this easier to do the above using LDCAD. LDCAD offers an interactive 3D model perspective, part snapping and integration with the STEP command which (in my view) are easier to do with LDCAD than with MLCAD.

Regards,

David
(2018-02-09, 8:14)David Manley Wrote: [ -> ]
(2018-02-09, 7:20)Brian Dag Wrote: [ -> ]<snip>
I want to build submodel 1, 2, and 3 and then show how they go together. Then I want to build submodel 4 and attach it to the growing assembly, then submodel 5 and 6 and attach them to the main model. Build submodels 7-10 and show them being attached. Submodels 11 and 12 get built directly onto the main model. There are 4 copies of submodel 13, then attach them, finally submodel 14 goes in place and then gets rotated a bit.
<snip>

One way to tackle this is to have multiple sub-levels of sub-models. You create your 13 individual "bottom-most" sub-models and then combine them to form another sub-model. For example;

Your top-level model would be defined as:
  Sub-model [A]
    Which is created as the combination of [1], [2] and [3]
  (Insert a "STEP" command here).
  Add [4]
  (Insert a "STEP" command here).
  Add [5]
  Add [6]
  (Insert a "STEP" command here).
  Add [7]
  Add [8]
  Add [9]
  Add [10]
  (Insert a "STEP" command here).
  Add [11]
  Add [12]
  (Insert a "STEP" command here).

  Add [13] #1
  (Insert a "STEP" command here).
  Add [13] #2
  (Insert a "STEP" command here).
  Add [13] #3
  (Insert a "STEP" command here).
  Add [13] #4
  (Insert a "ROTSTEP" command here).

N.B. you may find this easier to do the above using LDCAD. LDCAD offers an interactive 3D model perspective, part snapping and integration with the STEP command which (in my view) are easier to do with LDCAD than with MLCAD.

Regards,

David

Thanks David, this is kind of what I was thinking. I'm trying to figure out how to integrate it into the instructions though. To create submodels of my model I need to create new mpd files right? Then I have to bring these mpd files into the main mpd but that doesn't look possible, importing an mpd into another mpd.
No wait, I think I got it! I inserted some steps into my main mpd file between the submodels. That's giving me what I wanted, a graphic of the main build in progress after a few submodels are built! Now I just need to dink around with the buffer exchange to figure out how to show the submodels slightly separated...
Some of my submodels are pretty small. It would be nice to save some paper and show 2 or 3 of them on the same page. Except I can't seem to "Add next step" once the entire submodel is on the page. Is that a post production step, fiddling with the pdfs?
(2018-02-09, 17:42)Brian Dag Wrote: [ -> ]
(2018-02-09, 8:14)David Manley Wrote: [ -> ]One way to tackle this is to have multiple sub-levels of sub-models. You create your 13 individual "bottom-most" sub-models and then combine them to form another sub-model. For example;

Your top-level model would be defined as:
  Sub-model [A]
    Which is created as the combination of [1], [2] and [3]
  (Insert a "STEP" command here).
  Add [4]
  (Insert a "STEP" command here).
  Add [5]
  Add [6]
  (Insert a "STEP" command here).
  Add [7]
  Add [8]
  Add [9]
  Add [10]
  (Insert a "STEP" command here).
  Add [11]
  Add [12]
  (Insert a "STEP" command here).

  Add [13] #1
  (Insert a "STEP" command here).
  Add [13] #2
  (Insert a "STEP" command here).
  Add [13] #3
  (Insert a "STEP" command here).
  Add [13] #4
  (Insert a "ROTSTEP" command here).

N.B. you may find this easier to do the above using LDCAD. LDCAD offers an interactive 3D model perspective, part snapping and integration with the STEP command which (in my view) are easier to do with LDCAD than with MLCAD.

Regards,

David

Thanks David, this is kind of what I was thinking. I'm trying to figure out how to integrate it into the instructions though. To create submodels of my model I need to create new mpd files right? Then I have to bring these mpd files into the main mpd but that doesn't look possible, importing an mpd into another mpd.

Hi
Here is a very good Toturial for MLCad.
http://www.holly-wood.it/mlcad-en.html

Regards Johann
(2018-02-09, 18:35)Johann Eisner Wrote: [ -> ]
(2018-02-09, 17:42)Brian Dag Wrote: [ -> ]Thanks David, this is kind of what I was thinking. I'm trying to figure out how to integrate it into the instructions though. To create submodels of my model I need to create new mpd files right? Then I have to bring these mpd files into the main mpd but that doesn't look possible, importing an mpd into another mpd.

Hi
Here is a very good Toturial for MLCad.
http://www.holly-wood.it/mlcad-en.html

Regards Johann

Thanks Johann, I've been through that guide a few times as well as the slightly less easy to use LPub4 guide. I still can't fully wrap my head around the buffer exchange method but after a few trial and error sessions I think I'll get there.
FWIW I found a simple solution to a problem by using grouping. In my final step I want to show an assembly being placed, then rotated. I made a copy of the submodel, rotated and placed it where I wanted, then made it into a group. I also turned the original placement into a group. It seems redundant but it creates the necessary state to use the LPUB REMOVE GROUP command. The buffer exchange was not making sense to me. So the basics of the commands are:

...
0 STEP
0 MLCAD BTG GROUP
0 STEP
0 !LPUB REMOVE GROUP
0 MLCAD BTG GROUP ROTATED
...

Thanks for all the inputs. And thanks to Jaco's guide where this was buried in the Remove Group page. :-)

Cheers, Dag
(2018-02-12, 19:06)Brian Dag Wrote: [ -> ]FWIW I found a simple solution to a problem by using grouping. In my final step I want to show an assembly being placed, then rotated. I made a copy of the submodel, rotated and placed it where I wanted, then made it into a group. I also turned the original placement into a group. It seems redundant but it creates the necessary state to use the LPUB REMOVE GROUP command. The buffer exchange was not making sense to me. So the basics of the commands are:

...
0 STEP
0 MLCAD BTG GROUP
0 STEP
0 !LPUB REMOVE GROUP
0 MLCAD BTG GROUP ROTATED
...

Thanks for all the inputs. And thanks to Jaco's guide where this was buried in the Remove Group page. :-)

Cheers, Dag

And how are the parts displayed in the PLI with this syntax?
I would still do it with buffer exchange.

Syntax for LPUB3D

.....
0 STEP
0 BUFEXCHG A STORE
1 0 268 0 280 0 1 0 -1 0 0 0 0 1 Sub23.ldr (Submodelposition before assembly)
0 MLCAD ARROW 67170319 85 40 160 1 0 0 0 1 0 0 0 1  15 4 13 90  4 30 1 2  16 16 (Arrow to show how assembly)
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB PART BEGIN IGN 
1 0 118 -20 280 0 1 0 -1 0 0 0 0 1 Sub23.ldr (Submodell in right position)
0 !LPUB PART END
0 STEP
...
(2018-02-12, 21:04)Johann Eisner Wrote: [ -> ]
(2018-02-12, 19:06)Brian Dag Wrote: [ -> ]FWIW I found a simple solution to a problem by using grouping. In my final step I want to show an assembly being placed, then rotated. I made a copy of the submodel, rotated and placed it where I wanted, then made it into a group. I also turned the original placement into a group. It seems redundant but it creates the necessary state to use the LPUB REMOVE GROUP command. The buffer exchange was not making sense to me. So the basics of the commands are:

...
0 STEP
0 MLCAD BTG GROUP
0 STEP
0 !LPUB REMOVE GROUP
0 MLCAD BTG GROUP ROTATED
...

Thanks for all the inputs. And thanks to Jaco's guide where this was buried in the Remove Group page. :-)

Cheers, Dag

And how are the parts displayed in the PLI with this syntax?
I would still do it with buffer exchange.

Syntax for LPUB3D

.....
0 STEP
0 BUFEXCHG A STORE
1 0 268 0 280 0 1 0 -1 0 0 0 0 1 Sub23.ldr (Submodelposition before assembly)
0 MLCAD ARROW 67170319 85 40 160 1 0 0 0 1 0 0 0 1  15 4 13 90  4 30 1 2  16 16 (Arrow to show how assembly)
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB PART BEGIN IGN 
1 0 118 -20 280 0 1 0 -1 0 0 0 0 1 Sub23.ldr (Submodell in right position)
0 !LPUB PART END

0 STEP
...

My mpd file is built as stated above per David. There is a step to build this submodel shown on the page before. Even though I'm turning it into a group is still seems to act as a submodel when it needs to and yet still subjects itself to group commands when needed. Note that I turned the submodel within my mpd file into a group. I didn't substitute a group for a submodel. I can add "0 !LPUB PLI SHOW LOCAL TRUE" to the submodel and format it to look like a regular step on it's own page. Then on the main model page it can be treated as a group.

But thank you for the context. I had been trying to use buffer exchange but somehow was not figuring out the PART BEGIN/END portion. It worked equally as well and I'll keep that instead.

Dag
(2018-02-12, 21:20)Brian Dag Wrote: [ -> ]
(2018-02-12, 21:04)Johann Eisner Wrote: [ -> ]And how are the parts displayed in the PLI with this syntax?
I would still do it with buffer exchange.

Syntax for LPUB3D

.....
0 STEP
0 BUFEXCHG A STORE
1 0 268 0 280 0 1 0 -1 0 0 0 0 1 Sub23.ldr (Submodelposition before assembly)
0 MLCAD ARROW 67170319 85 40 160 1 0 0 0 1 0 0 0 1  15 4 13 90  4 30 1 2  16 16 (Arrow to show how assembly)
0 STEP
0 BUFEXCHG A RETRIEVE
0 !LPUB PART BEGIN IGN 
1 0 118 -20 280 0 1 0 -1 0 0 0 0 1 Sub23.ldr (Submodell in right position)
0 !LPUB PART END

0 STEP
...

My mpd file is built as stated above per David. There is a step to build this submodel shown on the page before. Even though I'm turning it into a group is still seems to act as a submodel when it needs to and yet still subjects itself to group commands when needed. Note that I turned the submodel within my mpd file into a group. I didn't substitute a group for a submodel. I can add "0 !LPUB PLI SHOW LOCAL TRUE" to the submodel and format it to look like a regular step on it's own page. Then on the main model page it can be treated as a group.

But thank you for the context. I had been trying to use buffer exchange but somehow was not figuring out the PART BEGIN/END portion. It worked equally as well and I'll keep that instead.

Dag

Hi
The problem is that.
The Buffer exchange syntax from lpub doesn't work in lpub3d.
In lpub you use normally the ghost command in the “Store“ action. This command doesn't work in lpub3d. 
So you must ignore the parts in the retrieve action  

There is already a discussion on 
https://sourceforge.net
Pages: 1 2