trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
136 stars 19 forks source link

Part placed after CALLOUT does not display in the PLI #793

Closed citrasusanto closed 1 day ago

citrasusanto commented 1 day ago

continue from #772 I've noticed that when I add a part after a callout, the part doesn't appear in the part list. It seems like this hasn't been reported yet. Line 105 won't show up

image

This behaviour seems to happen in any devices i've tested on.

  1. macOS apple silicon
  2. intel (10th gen) windows 11 or linux
trevorsandy commented 1 day ago

Thank you for reporting this behaviour.

Workaround Place your CALLOUT at the bottom of your STEP

Cheers,

trevorsandy commented 1 day ago

I am not able to reproduce this behaviour with this simple configuration. For me, part 1 14 -80 -48 30 1 0 0 0 1 0 0 0 1 95820.dat placed after 0 !LPUB CALLOUT END at line 11 in STEP 2 behaves as expected. If there are other settings to take into account please do not hesitate to share them.

You can try my sample model file available here

0 FILE main.ldr
0 Name: main.ldr
0 Author: LPub3D
0 !LPUB MULTI_STEP BEGIN
1 1 -80 0 30 1 0 0 0 1 0 0 0 1 3894.dat
0 STEP
0 !LPUB CALLOUT BEGIN ROTATED
1 16 0 0 0 1 0 0 0 1 0 0 0 1 subModel-1.ldr
0 !LPUB CALLOUT POINTER RIGHT 0.313 0.300 0.654 0.000 0.000 0.000 0.000 0.000 0.000 0.000 1
0 !LPUB CALLOUT PLACEMENT LEFT BOTTOM ASSEM OUTSIDE OFFSET -0.4632 0.0000
0 !LPUB CALLOUT END
1 14 -80 -48 30 1 0 0 0 1 0 0 0 1 95820.dat
0 STEP
0 !LPUB MULTI_STEP END
0 NOFILE
0
0 FILE submodel-1.ldr
0 Name: submodel-1.ldr
0 Author: LPub3D
0 !LPUB MULTI_STEP BEGIN
0 !LPUB MULTI_STEP PLACEMENT LOCAL CENTER PAGE INSIDE
1 1 -80 -24 30 1 0 0 0 1 0 0 0 1 3700.dat
0 STEP
1 0 -80 -14 20 0 0 -1 0 1 0 1 0 0 2780.dat
0 STEP
0 !LPUB MULTI_STEP END
0 NOFILE
0

My behaviour Screenshot 2024-11-24 224835

Cheers,

citrasusanto commented 1 day ago

I tried your code, and it successfully displays the submodel and the part list.

However, when I create a temporary file, the error seems to occur again. Below is an example result from my temporary file: testcallout.ldr.zip

0 FILE main.ldr
0 Author: Citra S
0 Name: Model-4311-main.ldr
0 !LPUB CALLOUT BEGIN
1 16 80 -20 -20 1 0 0 0 1 0 0 0 1 subModel-1.ldr
0 !LPUB CALLOUT POINTER CENTER 0 0.496479 0.274194 0 0 0 0 0 0 1
0 !LPUB CALLOUT END
1 1 80 0 -40 1 0 0 0 1 0 0 0 1 39789.dat
1 4 80 0 0 1 0 0 0 1 0 0 0 1 39789.dat
0 NOFILE
0
0 FILE subModel-1.ldr
0 Author: Citra S
0 Name: Model-3166-subModel-1.ldr
1 15 0 0 0 1 0 0 0 1 0 0 0 1 3941.dat
0 NOFILE

Screenshot 2024-11-25 at 09 10 22

I suspect the issue might be related to LDCad version 1.7. The subfile was generated using the ‘Reorganize’ option in LDCad, but despite the code looking similar, it display differently. I’m struggling to understand why this happens.

trevorsandy commented 1 day ago

Thank you for the example file. With it, I was able to reproduce and correct this behaviour.

Unfortunately, I checked in the DevOps build for today just before seeing your post - so this correction will be available in the next DevOps build.

Screenshot 2024-11-25 041220

Cheers,