LDraw.org Discussion Forums
LPub: Making an assembly larger than the page - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw File Processing and Conversion (https://forums.ldraw.org/forum-22.html)
+--- Thread: LPub: Making an assembly larger than the page (/thread-9309.html)

Pages: 1 2


LPub: Making an assembly larger than the page - Eric Albrecht - 2013-07-16

Sometimes when I am making instructions for a very large model in Lpub, I want to zoom in on only a portion of the assembly image to show where new parts go. I can use ASSEM MODEL_SCALE to make the assembly bigger, and I can use ASSEM PLACEMENT to shift the position on page, but LPub truncates the image at the edge of where the page would be if the model was centered (see linked image). Is there any way around this?

http://www.brickshelf.com/gallery/blakbird/Renders/small/truck.jpg
[Image: truck.jpg]


Re: LPub: Making an assembly larger than the page - Philippe Hurbain - 2013-07-16

Hi Eric,
I had this problem while creating BIs for EV3. You can embed BIs in EV3 projects, but their normal form factor is very wide screen, not very convenient for tall models... The trick I used was to enlarge the page more than 2 times, and use an image background with a thin frame to be able to do a proper layout. I then cropped the images with Photoshop.


Re: LPub: Making an assembly larger than the page - Eric Albrecht - 2013-07-17

Thanks for the tip. This is a usable workaround, but quite cumbersome for large models. Right now my model has 901 pages, so that's a lot of cropping! I can create an action in Photoshop to speed it up, but it is still a lot of work.


Re: LPub: Making an assembly larger than the page - Philippe Hurbain - 2013-07-17

THAT's a big model!
You can also crop pages directly in a PDF using Acrobat, it can be done in a single operation and is pretty fast.


Re: LPub: Making an assembly larger than the page - Gerald Lasser - 2013-07-18

I think we really need to look for an upgrade to LPub, I was/am browsing through the sourcecode but my programming skills are not up to that level... unfortunately.

I had put in some wishes as well waht a V2 shoudl be able to handle!

Gerald


Re: LPub: Making an assembly larger than the page - Eric Albrecht - 2013-07-22

I tried your idea and wanted to offer and few observations. Making the page size bigger and then repositioning the model works, but it has a few drawbacks. I doubled the size of the page, and then I also changed all the margins so that the PLI and step numbers would still appear near the corner of the real final page. It is difficult to know exactly how far to zoom the LPub window to approximate what the final page will look like, so it involves some iteration.

I got this all to work and then exported the pages and used Acrobat to crop. The first thing I noticed was that my 900 page, 180Mb was the same size after cropping as before cropping. I also noticed that Acrobat managed to crop 900 pages in less than a second. This made me realize that Acrobat does not really crop the images, it only reduces what is displayed. This means that the data in the margins is still there in the file, you just can't see it. So I went back and cropped them all with an action in Photoshop, and then the file got much smaller.

So in the end, this is a viable workaround but it adds a lot of extra labor to your instruction project.


Re: LPub: Making an assembly larger than the page - Gerald Lasser - 2013-07-23

Actually LDView would allow for those cropped views:

ldview maulwurf.mpd -Defaultzoom=3.0 -SaveSnapshot=d:\maulwurf.png

I played around with the Defaultzoom that gives me different sized crops. the source file is not a big model though, need to try this with a larger one. The problem here is that you cannot influence how LPUB sends the render instruction to LDVIEW.

If you manually assemble your instructions may be it is worth while thinking about a macro that will generate the relevant steps for you.

Gerald


Re: LPub: Making an assembly larger than the page - Eric Albrecht - 2013-07-23

I think the problem is not that LDView won't create the image, the problem is what LPub does with it. Lpub chops off the portions that extend beyond the edges of the page. This would be acceptable as long as you want the image centered. However if you want to zoom in on the edge of an image, it does not show up in LPub.


Re: LPub: Making an assembly larger than the page - Eric Albrecht - 2013-07-23

In case anyone is interested in what I am working on:
[Image: mechanical.jpg]

More on Eurobricks.


Re: LPub: Making an assembly larger than the page - Gerald Lasser - 2013-07-23

You are right, the zoom setting still centers the image, my approach was the wrong one. The problem is in the source. I'm stepping through some parts and in the render.cpp there the width/height of the page is calculated and the image is cropped accordingly...

To do better LPub would need to determine the location of the new parts in the image and center on this section of the image. So always render the image according to the scale and then crop it to the necessary section. An alternative would be that LPUB keeps the widht/height settings but LDView allows for a horizontal positioning. To do so I did not find a command-line parameter in LDView...

Gerald