trevorsandy / lpub3d

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

LPub3d crashed when generating BOM (treat as part issue) #671

Closed BerthWan closed 1 year ago

BerthWan commented 1 year ago

Subject

I used a universal joint in a model in three subparts in a single callout. I used the "treat as part function" to manage it. There's no problem with the step and its PLI. But, when generating the BOM, the software crashed. There's a error message : "failed to retrieve BOM render options using viewer step key 'ujoint';16;0' for image 'ujoint-0_16_1753_150_DPI_0.9_3023-45.png." where ujoint is my submodel's name. I bypass the issue by copy/paste the PLI png from "LPub3d\parts\" to "LPub3d\bom\" before generating the BOM pages.

Environment

Configuration

Logs

Screenshots

Steps to reproduce

generate a BOM using the treat as part functionnality (I encountered it on an other model but it was for a minifig, so I ignored it and it solved the issue)

Expected behaviour

the complete universal joint appears in the BOM

Actual behaviour

the software crashed after displaying the error message

Workaround

I tried to generate the BOM without the complete universal joint and it worked fine (but with three subparts in the BOM)

Solution suggestion

I copy/paste the PLI generated image file in the bom directory. lpub3d_big_bom.zip

trevorsandy commented 1 year ago

Thank you for reporting this behaviour.

I'll take a look.

Cheers,

trevorsandy commented 1 year ago

This behaviour has been corrected.

Screenshot - 24_01_2023 , 11_11_25

Cheers,

BerthWan commented 1 year ago

Thank you.

trevorsandy commented 1 year ago

Hello Berth,

Just a quick note to say

0 STEP and 0 ROTSTEP are the same in terms of declaring a new STEP. The only difference is ROTSTEP also presents rotation coordinates.

So this...

0 STEP
0 ROTSTEP 0 90 0 REL

can be replaced with

0 ROTSTEP 0 90 0 REL

Cheers,

BerthWan commented 1 year ago

Yes I know, but I had issues in the past with some software (I can't remember which one) that was solved with this trick, I kept the habit.