Problem creating submodels with Steps using LDCad


Problem creating submodels with Steps using LDCad
#1
I just can't get this to work quite right. I like to use LDD as a starting point for just playing around with new model ideas. It's quick and easy to just throw bricks in place. But then I want to take that into LDCad and break down the one single model into a collection of submodels in a .mpd file.

I can create new submodels in LDCad. I then cut and paste the selection of bricks I want from the existing single model into the empty submodel I just created, making sure to remove position and rotation information as I do so. I'll then take the submodels and "recombine" them into a new main model, this time made of the submodels instead of individual bricks. I can close and reopen the file at this point and everything is fine.

However, if I then go in and add Steps to the submodels I run into a problem. It's not apparent right away. I can create the steps and page through them and it looks fine. But if I close and reopen the file I'll find bricks have moved to different locations. Some are even part of different submodels. I can't seem to figure out what's causing them to move like that. It's definitely a result of adding steps to the submodels.

I can replicate this with any model I make, whether I start in LDD or even make the whole thing in LDCad. I can split a single model into submodels. But as soon as I add Steps to the submodels, the position of random bricks gets messed up upon reopening the file.
Reply
Re: Problem creating submodels with Steps using LDCad
#2
Weird, I did a quick test and it seems to work for me.

With position you mean the visual xyz location or just the (line) position in the .ldr/.mpd file?

If it's the second then it's correct behavior because that's how stepping works in the LDraw standard. But it should never effect the visual placement.
Reply
Re: Problem creating submodels with Steps using LDCad
#3
Roland Melkert Wrote:With position you mean the visual xyz location or just the (line) position in the .ldr/.mpd file?

I mean the xyz position.

And I've installed the software on two different computers, and I see the same behavior. It has to be something in the way I'm doing things. But I can't figure out what. I've been struggling with this for a couple of days.

Images before and after. These are from a .mpd file I created entirely in LDCad. The Red and Grey bricks are the two submodels. The only thing I did in between these screens was to insert an empty step in each submodel, then move 2 of the bricks to that step. I Save All and reload to see the "after" image.

Before:
[Image: RnyJUnW.png]


After:
[Image: TvQ2036.png]
Reply
Re: Problem creating submodels with Steps using LDCad
#4
It's definitely a bug then, and since I didn't run into it it's probably caused by a chain of events.

I'm suspecting the undo info is somehow corrupted and reintroduced, so some elimination:

Does it only happen with mpd's or also when using separate ldr files?
Does it happen when you restart after the split and before adding stepping?
Could you post a before and after mpd, maybe I can spot a pattern.
Reply
Re: Problem creating submodels with Steps using LDCad
#5
Roland Melkert Wrote:Does it only happen with mpd's or also when using separate ldr files?

I'm not sure how to do this using separate ldr files, so I can't say.

Roland Melkert Wrote:Does it happen when you restart after the split and before adding stepping?

No. It only happens after adding stepping.

Roland Melkert Wrote:Could you post a before and after mpd, maybe I can spot a pattern.

Here you go:
Before
After
Reply
Re: Problem creating submodels with Steps using LDCad
#6
After you mentioned looking for a pattern I decided to open the .mpd in LDDesignPad and I did spot a pattern.

It looks like the FILE, NAME, and AUTHOR lines were shifted down 3 lines each time. By taking the following lines and moving them up manually 3 lines in LDDesignPad every time they occurred, it looks fine when opened.

Code:
0 FILE Grey.ldr
0 NAME Grey.ldr
0 AUTHOR LEGO Digital Designer 4.3
Reply
Re: Problem creating submodels with Steps using LDCad
#7
I did notice somehow two lines ended up in front of the first FILE in the after.mpd, I was wondering how that happen.

I think those (blank?) lines are related because they might have corrupted the internal submodel offsets, so the editor starts moving stuff to the wrong place.

I'll try to figure out how those lines are caused (do you know when they first appear?), in the meantime I'm happy there is a simple workaround.
Reply
Re: Problem creating submodels with Steps using LDCad
#8
Roland Melkert Wrote:I did notice somehow two lines ended up in front of the first FILE in the after.mpd, I was wondering how that happen.

I think those (blank?) lines are related because they might have corrupted the internal submodel offsets, so the editor starts moving stuff to the wrong place.

I'll try to figure out how those lines are caused (do you know when they first appear?), in the meantime I'm happy there is a simple workaround.

I got it. I had the file opened in LDDesignPad and kept refreshing as I made changes to see what it did.

If I Insert a Step, it adds the 0 STEP line before the 0 FILE line. But if I Append a Step, it adds the 0 STEP line right after the last brick in the current submodel.

So the problem is in the way it is Inserting the 0 STEP line. It should insert it before the first brick in the submodel, but it's inserting in before the submodel file itself. This means when I'm then moving bricks to that step, they are now in a different submodel and under different transforms. Makes total sense.

Hope that helps you squash the bug. Smile

Before Insert of Step:
Code:
0 FILE Red.ldr
0 NAME Red.ldr
0 AUTHOR LEGO Digital Designer 4.3
1 320 0 0 0 1 0 0 0 1 0 0 0 1 3010.dat
1 320 0 0 20 1 0 0 0 1 0 0 0 1 3010.dat
1 320 0 0 40 1 0 0 0 1 0 0 0 1 3010.dat
1 320 0 0 60 1 0 0 0 1 0 0 0 1 3010.dat


After Insert of Step:
Code:
0 STEP
0 FILE Red.ldr
0 NAME Red.ldr
0 AUTHOR LEGO Digital Designer 4.3
1 320 0 0 0 1 0 0 0 1 0 0 0 1 3010.dat
1 320 0 0 20 1 0 0 0 1 0 0 0 1 3010.dat
1 320 0 0 40 1 0 0 0 1 0 0 0 1 3010.dat
1 320 0 0 60 1 0 0 0 1 0 0 0 1 3010.dat
Reply
Re: Problem creating submodels with Steps using LDCad
#9
Wait a minute, are you inserting the step in a file with a single model (so no submodels yet)?

Because there is a known bug (which i fixed in 1.3) concerning the FILE meta in a document containing only a single model.

I'll do some tests, but if that's the case this bug is already (indirectly) fixed Smile
Reply
Re: Problem creating submodels with Steps using LDCad
#10
No, I don't start inserting Steps until after I have the submodels setup. The snippet above was just for that one submodel. There is another submodel and the main model in that mpd file.
Reply
Re: Problem creating submodels with Steps using LDCad
#11
You are right, I just reproduced it. Using step insert will go wrong when the current step is 1.

I didn't notice this because I always use append (ctrl+ins) myself. I will fix this for the next version. Thanks for reporting / helping tracking it down.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 4 Guest(s)