1963maniac

LPUB3D crops the assembly image at the edge of the page.

Recommended Posts

Attika's%20Devil2%20(2019_10_11_page_244

When the image is repositioned, LPUB3D does not redraw all of it. Even when

Redraw is clicked, LPUB3D does not render the whole assembly image.

Attika's%20Devil2%20(2019_10_11_page_244

Does anyone know how this can be fixed?

I found this article: https://sites.google.com/site/workingwithlpub/general/advanced-techniques/largemodels

It seems long and complicated giving too much room for error, even if I could understand it. Also, it is from 2012 and was made for LPUB not LPUB3D.

Share this post


Link to post
Share on other sites
14 hours ago, 1963maniac said:

Does anyone know how this can be fixed?

Have you tried one of the latest LPub3D versions? There is now a native renderer, which not only is MUCH faster, but also attempts to scale the model to fit it on page. This may not be the behaviour you would like, but it's a solution (I'd prefer to be able to zoom in on a part of the model...).

Share this post


Link to post
Share on other sites
18 hours ago, 1963maniac said:

When the image is repositioned, LPUB3D does not redraw all of it.

Well, have you actually tried to set the ASSEM MODEL_SCALE ? This usually works. Often it only needs to be a fraction tinier than the 1.25 it seems to use as default.

Mylenium

Edited by Mylenium

Share this post


Link to post
Share on other sites

I'm using LPUB3D 2.3.13 revision 113 build 1624 Hash 81d28f06 which I believe is the latest version. I'm using the LDVIEW renderer. For some reason the native renderer doesn't work well at all.

I have tried to change the scale for just that page, but that doesn't work either.

I tried changing the paper size from A4 to A3. The assembly image does redraw perfectly. But when I change back to A4, the cropping reoccurs. 

Could there be something wrong with the file itself. This has been on my desk for a long time. I would like to get it done.

The MOC has 2679 parts 70 submodels so far. I have about 780 parts still to be organized into steps and substeps, and etc.

Edited by 1963maniac

Share this post


Link to post
Share on other sites
14 hours ago, supertruper1988 said:

Are you saying that it cuts off and you cannot more to a specific place on the assembly?

Compare the two images above. The assembly image can be moved. However, LPUB3D does not draw the cropped (missing) part of the image after the image is moved toward the center of the page.

Share this post


Link to post
Share on other sites
10 hours ago, 1963maniac said:

Compare the two images above. The assembly image can be moved. However, LPUB3D does not draw the cropped (missing) part of the image after the image is moved toward the center of the page.

Oh sorry I missed the OP. I believe that the "trick" is to use a larger page size for the one page and cropping it later in a program like photoshop. another work around is to use buff exchange to add a part way off in the distance that will shift the center of focus on the model.

Also I know that trevor hasnt been the most active but if you are feeling up to the challenge, I am sure that there is an interface between LPub3D and the Ldview renderer. it might be possible to change the call to tell ldraw to render the whole model regardless of page size. 

Let me see If I can find something in the LDView call list. 

Share this post


Link to post
Share on other sites

I played with it some in the LDview Config ini file accessible from the parameters menu. I cant seem to get it to render a size that is different from the page size. 

One other thing you might try is posting over at the LDraw forums to see if the creator of LDView might be able to offer some insight on how the interface between LPub and LDview is working. There may be a setting or line of code that can be added to the LDview config that will force LDview to render and return the entire model instead of just the page size. 

If you find out, please update us here!

Share this post


Link to post
Share on other sites
13 hours ago, supertruper1988 said:

 I believe that the "trick" is to use a larger page size for the one page and cropping it later in a program like photoshop. another work around is to use buff exchange to add a part way off in the distance that will shift the center of focus on the model.

Thanks, supertrooper1988, you have been a big help in the past too. I will try both of these.

13 hours ago, supertruper1988 said:

I actually went ahead and posted over there. I am curious about how this works as well. 

https://forums.ldraw.org/thread-24200.html

Changing the DPI might do it too.

Edited by 1963maniac

Share this post


Link to post
Share on other sites

OK, this what I have tried now,

1. Changed the page size from A4 to A3 for that page only. Saved it. It is now uncropped.

2. Drag/drop assem. image & rotate icon would not move. So, changed assembly placement to  left of center. Saved it. Redrew, saved it. Still uncropped.

3. Changed the page size back to A4. It remained uncropped. I cannot move the assembly image but it will work the way it is.

I have not tried changing the DPI nor have I tried the BUF. EX. trick yet.

Edited by 1963maniac

Share this post


Link to post
Share on other sites
7 hours ago, 1963maniac said:

OK, this what I have tried now,

1. Changed the page size from A4 to A3 for that page only. Saved it. It is now uncropped.

2. Drag/drop assem. image & rotate icon would not move. So, changed assembly placement to  left of center. Saved it. Redrew, saved it. Still uncropped.

3. Changed the page size back to A4. It remained uncropped. I cannot move the assembly image but it will work the way it is.

I have not tried changing the DPI nor have I tried the BUF. EX. trick yet.

This will likely fail the next time it does a refresh (ie where the image cache is reset). Then you will have to go through this process again. 

I think that there is something to be found in the LDview Configuration.ini file. There has to be something there that can be used to force a larger image to be created. 

Share this post


Link to post
Share on other sites

Ok back again. 

I have found that the image size is being determined by the page size. (we knew this just reiterating for clarity)

The only workaround that doesn't involve a lot of BufExchange headache is to set your page size large enough to capture the whole model.

Once you have that, you will need to use finder on mac or windows explorer on PC to navigate to where your file is saved. There you will see that LPub3D has created a folder, In there you will find a folder called "assem". In the assem folder you will see a bunch of images that will follow the filename and step number and so forth.

Copy the step images that are needed to be larger into a different folder. Once you have them copied, change your page size back. You can then move the "wrong" image off the screen and used the image placement tool to place the step image that is full size and can be positioned how you want. 

Hope this makes sense!

Share this post


Link to post
Share on other sites

What about creating A3 size pages, with actual BI stuff in an A4 sized middle (using a background with proper size frame might help), generate images than crop them to A4 size? I think I used a similar trick to create EV3 instructions for LEGO app that required a weird image format.

Share this post


Link to post
Share on other sites

Thanks guys!!!! Really!!!, Thanks for all your kind attention to this problem.

You won't believe this. As I have been working through this BI. I came to another such page. My aforementioned solution didn't work.

I deleted all LPUB3D formating for that step. Redrew. Added rotate icon. Perfection! 

I don't understand it. But I'll work with it.

I will keep you informed as I go. Hopefully no more goofy things will happen. LPUB3D has been crazy to me many times in the past. Many times I have dumped all LPUB3D formatting to get around problems that arise. It's not fun.

Edited by 1963maniac

Share this post


Link to post
Share on other sites
10 hours ago, 1963maniac said:

Thanks guys!!!! Really!!!, Thanks for all your kind attention to this problem.

You won't believe this. As I have been working through this BI. I came to another such page. My aforementioned solution didn't work.

I deleted all LPUB3D formating for that step. Redrew. Added rotate icon. Perfection! 

I don't understand it. But I'll work with it.

I will keep you informed as I go. Hopefully no more goofy things will happen. LPUB3D has been crazy to me many times in the past. Many times I have dumped all LPUB3D formatting to get around problems that arise. It's not fun.

One thing you may consider is defining all of your formatting in the front of the file.  

 

This is a sample of my settings that I put before the first step that will tell everything about the file and then as I find more settings I need to change, I add them to appropriate section here. I have this saved as a text file so that I can paste it into new or updating my instructions. It also helps solve issues where formatting in the steps will cause issues in later steps. 

0 //---------------Main Assembly Params--------------
0 !LPUB RESOLUTION 300 DPI
0 !LPUB ASSEM MODEL_SCALE 1
0 !LPUB ASSEM MARGINS 0.05 0.05
0 !LPUB CONTINUOUS_STEP_NUMBERS GLOBAL FALSE
0 //---------------Callout Params--------------------
0 !LPUB CALLOUT BORDER ROUND 1 Black 0.03125 15 MARGINS 0.05 0.05
0 !LPUB CALLOUT STEP_NUMBER FONT "Arial,44,-1,5,50,0,0,0,0,0,BOLD"
0 !LPUB CALLOUT INSTANCE_COUNT MARGINS 0.0750 0.0750
0 !LPUB CALLOUT INSTANCE_COUNT FONT "Arial,60,-1,5,50,0,0,0,0,0,BOLD"
0 !LPUB CALLOUT STEP_NUMBER MARGINS 0.0750 0.0750
0 !LPUB CALLOUT SUBMODEL_BACKGROUND_COLOR "#FFFFFF" "#bead93" "#c8a19e" "#a99eb2"
0 !LPUB CALLOUT PLI PER_STEP FALSE
0 //---------------Multi Step Params-----------------
0 !LPUB MULTI_STEP PLI MARGINS GLOBAL 0.05 0.05
0 !LPUB MULTI_STEP ASSEM MARGINS GLOBAL 2.0 0.5
0 !LPUB MULTI_STEP STEP_NUMBER FONT "Arial,96,-1,5,75,0,0,0,0,0,BOLD"
0 !LPUB MULTI_STEP STEP_NUMBER MARGINS 0.05 0.125
0 !LPUB MULTI_STEP PLACEMENT TOP_LEFT PAGE INSIDE 0 0
0 !LPUB MULTI_STEP SEPARATOR 0.03125 black 0.125 0.05
0 //---------------Page Params-----------------------
0 !LPUB PAGE PAGE_FOOTER SIZE 11.0000 0.2500
0 !LPUB PAGE PAGE_HEADER SIZE 11.0000 0.2500
0 !LPUB PAGE MARGINS 0.25 0.25
0 !LPUB PAGE DISPLAY_PAGE_NUMBER FALSE
0 !LPUB PAGE SIZE 11 8.5
0 !LPUB PAGE SUBMODEL_BACKGROUND_COLOR "#cccccc" "#bead93" "#c8a19e" "#a99eb2"
0 //!LPUB PAGE BACKGROUND GLOBAL TRANSPARENT
0 //---------------Parts List Params-----------------
0 !LPUB PLI BORDER ROUND Black 0.03125 15 MARGINS 0.15 0.15
0 !LPUB PLI PLACEMENT RIGHT TOP STEP_NUMBER OUTSIDE
0 !LPUB PLI MARGINS 0.05 0.05
0 !LPUB PLI INSTANCE_COUNT FONT "Arial,36,-1,5,50,0,0,0,0,0"
0 !LPUB PLI BACKGROUND COLOR "#efefef"
0 !LPUB PLI MODEL_SCALE  0.65
0 !LPUB PLI SQUARE_STYLE BACKGROUND TRANSPARENT
0 !LPUB PLI SQUARE_STYLE FONT "Arial,26,-1,5,50,0,0,0,0,0,Regular"
0 !LPUB PLI SQUARE_STYLE BORDER SQUARE 3 #3a3938 0.015625 MARGINS 0 0
0 !LPUB PLI SQUARE_STYLE FONT_COLOR "#000000"
0 !LPUB PLI ANNOTATION DISPLAY TRUE
0 !LPUB PLI ANNOTATION USE_TITLE FALSE
0 //---------------Step Number Params--------------
0 !LPUB STEP_NUMBER PLACEMENT TOP_LEFT PAGE INSIDE
0 !LPUB STEP_NUMBER FONT "Arial,96,-1,5,75,0,0,0,0,0,BOLD"
0 //
0 // INSTRUCTION START
0 //

 

Share this post


Link to post
Share on other sites

I know what you are saying about keeping all formatting at the beginning of the file. I do get that. But there is usually some formatting at the end, BOM and cover page code. Should that be moved to the beginning as well?

I always wondered if you could save and copy code like that. It would definitely be quicker that doing all that configuring.

Share this post


Link to post
Share on other sites
2 hours ago, 1963maniac said:

I know what you are saying about keeping all formatting at the beginning of the file. I do get that. But there is usually some formatting at the end, BOM and cover page code. Should that be moved to the beginning as well?

I always wondered if you could save and copy code like that. It would definitely be quicker that doing all that configuring.

I dont use BOM's or cover pages so I am not sure about adding it all up front but you definitely could try. The txt file of all the settings was a life save. I even have a couple for doing personal instructions or commission instructions. The positioning of the formatting really helps for me. I was so frustrated every time with having to find where that one setting got added then not removed and is now causing issues 10 pages later. 

If you arent used to it, I would take sometime to understand the source window. It can tell you tons about what is happening in the file and if for some reason LPub doenst remove a line here or there of formatting then you can manually remove it. Heck I can, for the most part, move parts between steps if I need to for clarity or even add steps as needed. 

Share this post


Link to post
Share on other sites
3 hours ago, supertruper1988 said:

I dont use BOM's or cover pages so I am not sure about adding it all up front but you definitely could try. The txt file of all the settings was a life save. I even have a couple for doing personal instructions or commission instructions. The positioning of the formatting really helps for me. I was so frustrated every time with having to find where that one setting got added then not removed and is now causing issues 10 pages later. 

If you arent used to it, I would take sometime to understand the source window. It can tell you tons about what is happening in the file and if for some reason LPub doenst remove a line here or there of formatting then you can manually remove it. Heck I can, for the most part, move parts between steps if I need to for clarity or even add steps as needed. 

Thanks supertruper1988,

What's the source window? Where do I find it? That sounds like it would be quite helpful.

Yea, I'm doing direct coding more and more. Going back and forth between MLCAD and LPUB3D gets a little bothersome.

Share this post


Link to post
Share on other sites
On 9/9/2020 at 5:28 PM, supertruper1988 said:

If you arent used to it, I would take sometime to understand the source window.

I believe this window (which simply lists what LPub is going to do in what order) is core of the matter. There is also a "scope" type thing that I have missed regularly: Whenever things are meant to be applied for one step only (locally) - better check it. LPub will sometimes take these settings and apply them to coming steps when not "redefined". What I also did often was to forget the scope. Any "global" settings affect things - well globally - and may screw up the entire instruction. And you can do that very nicely manually. The commands are more or less "readable" - what helped me a lot is to let LPUB tell you the syntax. Which is not always working - but mostly. Maybe even always, but I just did not get it.

Cover page, BOM, global settings/definitions, page layout etc. all come up front. Then go with the flow. Global changes after a certain step (e.g., it becomes too large), affect all next steps. Settings for multiple steps/page have a "scope" - single step pages have their own "scope".  

To be honest, I do most of the adjustments and the fiddling using first the graphical interface commands etc, then check how the text file changed, then adjust things only in the text section.

I bet you @supertruper1988 and @1963maniac know all these things - I am sorry for sounding being smart. It is just the case that when I use LPub I seem to have to learn all this all over again.

Best
Thorsten

Share this post


Link to post
Share on other sites
On 9/9/2020 at 11:52 AM, 1963maniac said:

Thanks supertruper1988,

What's the source window? Where do I find it? That sounds like it would be quite helpful.

Yea, I'm doing direct coding more and more. Going back and forth between MLCAD and LPUB3D gets a little bothersome.

It is called the "LDraw Editor" in the view options. 

@Toastie thanks for the insight!

Share this post


Link to post
Share on other sites
On 9/10/2020 at 5:43 PM, Toastie said:

I believe this window (which simply lists what LPub is going to do in what order) is core of the matter. There is also a "scope" type thing that I have missed regularly: Whenever things are meant to be applied for one step only (locally) - better check it. LPub will sometimes take these settings and apply them to coming steps when not "redefined". I have noticed that. What I also did often was to forget the scope. Any "global" settings affect things - well globally - and may screw up the entire instruction. And you can do that very nicely manually. HOW? The commands are more or less "readable" - what helped me a lot is to let LPUB tell you the syntax. Which is not always working  please explain - but mostly. Maybe even always, but I just did not get it.

Cover page, BOM, global settings/definitions, page layout etc. all come up front. Then go with the flow. Global changes after a certain step (e.g., it becomes too large), affect all next steps. Settings for multiple steps/page have a "scope" - single step pages have their own "scope".  

To be honest, I do most of the adjustments and the fiddling using first the graphical interface commands etc, then check how the text file changed, then adjust things only in the text section. Explain further , please.

I bet you @supertruper1988 and @1963maniac know all these things - I am sorry for sounding being smart. It is just the case that when I use LPub I seem to have to learn all this all over again.

Best
Thorsten

Thanks for your reply, Toastie. No, you aren't "being smart", but definitely helpful. If you could elaborate on syntax and scope, I'd appreciate it.

On 9/10/2020 at 8:17 PM, supertruper1988 said:

It is called the "LDraw Editor" in the view options. 

@Toastie thanks for the insight!

Thanks Super.., I use the LDRAW editor always. I guess I didn't know that was called "the source window".

Share this post


Link to post
Share on other sites

I finally got my project done. However, a work-around was how I addressed the cropping problem. I fared better when I changed things in MLCAD and saved it there. Then LPUB3D worked better for me. What I ended up doing was rotated the view so the whole assembly image was not bleeding off the edge of the page. Another thing that worked was moving the PLI to a new location or if available the Callout being re-located worked too. Dragging the assembly image to a new location still did not work nor did using the placement menu. LPUB3D still will not redraw assembly images other than these work-arounds. LPUB3D 2.4 had problems on this project too.

Share this post


Link to post
Share on other sites
On 10/27/2020 at 5:26 PM, 1963maniac said:

What I ended up doing was rotated the view so the whole assembly image was not bleeding off the edge of the page.

My apologies for never getting back to you on this issue. Too many distractions, but it should not happen, as you asked ... sorry.

Well this sounds OK. Also making space by reshuffling the other things make entirely sense. Why it still crops the image without redrawing - I don't know.

What I do in these cases, I change the scale of the whole model. I believe TLG does not do that in their instructions - or do they? The changes are only "gradual" and one hardly notices that when getting smaller and smaller. I know, this only works to a certain degree but you can keep the look-at angle the same.

But I guess your solution is much more elegant. Glad that you could finish your project!

Best,
Thorsten     

P.S.: Are the questions you had still of interest to you, or have they all evaporated?

 

Edited by Toastie

Share this post


Link to post
Share on other sites

I too am sorry, I looked at this and even tried my hand at self compiling a solution to no avail. What I did find was the if the rendered assembly image is large enough, it will still be cropped on a multi-step page. I proposed a solution to Trevor, but he mentioned he had handled it in a different way in 2.4.0 Here is the relevant git ticket https://github.com/trevorsandy/lpub3d/issues/412

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.