LPub: Making an assembly larger than the page


LPub: Making an assembly larger than the page
#1
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/blakbi.../truck.jpg
[Image: truck.jpg]
Reply
Re: LPub: Making an assembly larger than the page
#2
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.
Reply
Re: LPub: Making an assembly larger than the page
#3
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.
Reply
Re: LPub: Making an assembly larger than the page
#4
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.
Reply
Re: LPub: Making an assembly larger than the page
#5
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
Reply
Re: LPub: Making an assembly larger than the page
#6
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.
Reply
Re: LPub: Making an assembly larger than the page
#7
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
Reply
Re: LPub: Making an assembly larger than the page
#8
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.
Reply
Re: LPub: Making an assembly larger than the page
#9
In case anyone is interested in what I am working on:
[Image: mechanical.jpg]

More on Eurobricks.
Reply
Re: LPub: Making an assembly larger than the page
#10
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
Reply
Re: LPub: Making an assembly larger than the page
#11
LDView doesn't have any command line options for camera panning, but it does allow you to set the model center (-ModelCenter=x,y,z). This can be used to achieve panning, but requires more math. (Note: LDView uses the calculated model center as the camera's look-at point, so providing an alternative value moves the look-at point.)
Reply
Re: LPub: Making an assembly larger than the page
#12
There is one other thing you could at least investigate, although it might not work, and would require you to generate the cropped portion of the instructions as a separate file. LDView has a meta-command, !LDVIEW BBOX_IGNORE (search for BBOX_IGNORE in LDView's help). You could use this to have LDView ignore all of the model that you aren't interested in for the purposes of its bounding box calculations. The catch is that you of course only want to do this for the steps that you want to be zoomed in and cropped, so you have to do a separate run-through with BBOX_IGNORE commands in place. And it might not work at all (LPub might strip them out of the files it sends to LDView for rendering).
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 6 Guest(s)