LDraw.org Discussion Forums

Full Version: LPub & ROTSTEP - skips rotation step
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,
I have what I hope to be a simple question... I'm using LPub to make instructions for a large 10k piece model.  I'm well aware of the ROTSTEP command, which was critical in ensuring the right perspective at all times.

The problem is that I would like to add a completely blank step showing just the rotation action, so the reader can see the new perspective *before* adding the parts for the next step.  I tried the following seemingly obvious schema, but the extra "step" is being discarded. - I can only assume that LPub has logic to ignore "Step" commands where no parts were added.

Code:
0 STEP
0 ROTSTEP 30 -60 0 ABS
0 !LPUB ASSEM MODEL_SCALE LOCAL  0.25000
0 !LPUB INSERT ROTATE_ICON OFFSET 0.5 0.5
0 STEP
0 !LPUB ASSEM MODEL_SCALE LOCAL  0.25000
1 0 -2540 -152 640 0 0 1 0 1 0 -1 0 0 snotpanel12.ldr
1 0 -2540 -152 -400 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 -200 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 0 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 200 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 400 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
0 STEP

Help appreciated!

Sincerely,
---tom
If I remember well a way to get an emty step is to add a buffer exchg store, followed immediately by a retrieve.
(2018-03-05, 16:38)Philippe Hurbain Wrote: [ -> ]If I remember well a way to get an emty step is to add a buffer exchg store, followed immediately by a retrieve.

Or you can put a random brick between the (rot)steps and surround it with LPUB part ignore meta commands
(2018-03-05, 16:15)tom alphin Wrote: [ -> ]Hello all,
I have what I hope to be a simple question... I'm using LPub to make instructions for a large 10k piece model.  I'm well aware of the ROTSTEP command, which was critical in ensuring the right perspective at all times.

The problem is that I would like to add a completely blank step showing just the rotation action, so the reader can see the new perspective *before* adding the parts for the next step.  I tried the following seemingly obvious schema, but the extra "step" is being discarded. - I can only assume that LPub has logic to ignore "Step" commands where no parts were added.

Code:
0 STEP
0 ROTSTEP 30 -60 0 ABS
0 !LPUB ASSEM MODEL_SCALE LOCAL  0.25000
0 !LPUB INSERT ROTATE_ICON OFFSET 0.5 0.5
0 STEP
0 !LPUB ASSEM MODEL_SCALE LOCAL  0.25000
1 0 -2540 -152 640 0 0 1 0 1 0 -1 0 0 snotpanel12.ldr
1 0 -2540 -152 -400 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 -200 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 0 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 200 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
1 0 -2540 -152 400 0 0 1 0 1 0 -1 0 0 snotpanel10.ldr
0 STEP

Help appreciated!

Sincerely,
---tom


Hi Tom

Both ways lead to the success.

For Philippe's way you need this code for example:

0 STEP
0 ROTSTEP 0 180 0 REL
0 BUFEXCHG A STORE
0 BUFEXCHG A RETRIEVE
0 STEP

Johann
(2018-03-05, 16:38)Philippe Hurbain Wrote: [ -> ]If I remember well a way to get an emty step is to add a buffer exchg store, followed immediately by a retrieve.

This is an awkward workaround, but it worked perfectly.  Thanks!
(2018-03-05, 20:02)Johann Eisner Wrote: [ -> ]Hi Tom

Both ways lead to the success.

For Philippe's way you need this code for example:

0 STEP
0 ROTSTEP 0 180 0 REL
0 BUFEXCHG A STORE
0 BUFEXCHG A RETRIEVE
0 STEP

Johann

The whole empty steps things comes from LPub ignoring duplicate step metas, because many people "abuse" the meta by having a normal step followed by a rotstep.

I think the main problem here is people don't realize the step meta is an indication of the END of a step not the beginning.

Those double steps, and thus empty steps, are very annoying in editors.

Or am I missing a genuine reason to have double step metas?
(2018-03-05, 23:46)Roland Melkert Wrote: [ -> ]
(2018-03-05, 20:02)Johann Eisner Wrote: [ -> ]Hi Tom

Both ways lead to the success.

For Philippe's way you need this code for example:

0 STEP
0 ROTSTEP 0 180 0 REL
0 BUFEXCHG A STORE
0 BUFEXCHG A RETRIEVE
0 STEP

Johann

The whole empty steps things comes from LPub ignoring duplicate step metas, because many people "abuse" the meta by having a normal step followed by a rotstep.

I think the main problem here is people don't realize the step meta is an indication of the END of a step not the beginning.

Those double steps, and thus empty steps, are very annoying in editors.

Or am I missing a genuine reason to have double step metas?

You are right Roland

The whole thing works also without the empty steps.

This code for example:

0 Untitled
0 Name: Test.ldr
0 Author: Eisner Johann [technicbasics]
0 Unofficial Model
0 !LPUB MULTI_STEP BEGIN
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
1 4 0 0 0 0 -1 0 1 0 0 0 0 1 32316.dat
1 1 -20 0 40 -1 0 0 0 -1 0 0 0 1 6558.dat
0 STEP
1 2 -20 0 0 0 -1 0 1 0 0 0 0 1 32316.dat
0 STEP
0 BUFEXCHG A STORE
0 BUFEXCHG A RETRIEVE
0 ROTSTEP 0 180 0 REL
1 4 -40 0 40 0 -1 0 0 0 -1 1 0 0 32316.dat
0 STEP
1 7 -60 -40 40 1 0 0 0 0 -1 0 1 0 87082.dat
1 7 -60 40 40 1 0 0 0 0 -1 0 1 0 87082.dat
0 STEP
0 !LPUB MULTI_STEP END
0

Generate this modell: