LDraw.org Discussion Forums

Full Version: LPub3D 1.1.0 - A little enhancement and some corrections
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Greetings,

I wanted to test LPub3D's fast-fix framework so I fixed some issues reported by the community. I also included a little enhancement to the PLI annotation management; hence, the version change.

To implement these updates, just click Help=>Check for Updates. Alternatively, you can turn on automatic update check in the Configuration=>Preferences=>Updates tab.

Here are the changes:

LPub3D 1.1.0.370.2

Features and enhancements
------------
-Enable/disable PLI annotations (Preference Dialog) - see image below
-Edit part title annotations - see image below
-Fix: .dat subFiles not processed for 3D viewer - causes abnormal end (expected
dat files to be treated as part and placed in Official/unofficial parts).
Dat subfiles are now treated same as mpd/ldr subfiles.

-CHANGE: isSubmodel check no longer observes meta !LDRAW_ORG as Submodel=False

-KNOWN ISSUE: When an image (e.g. logo) is placed bottom left or bottom right
right of the page header, dragging the image produces unexpected placement - the same
may be true with regards to placement relative to the page footer.
WORKAROUND: If you want to reposition by dragging, set the image relative to the Page
(any relative position) or bottom center of the header/ top center of the footer.

Images:

Turn off PLI Annotation
[attachment=1659]


Edit PLI Part Title Annotation
[attachment=1660]
Finally had some time for a quick test... Wow!

My favorite feature so far is the configurable annotations! You even added some supports for my VEX parts... awesome Wink
BTW, is there a way to have several separated libraries (eg. LEGO and VEX)?
BTW(2): why the need for a regular LDraw library AND a zipped one? LeoCAD can be configured to use an unzipped library, and speed penalty is not that huge.

Quote:I agree, this is on my TODO list. My design requirements was only to be able to manipulate the ROTSTEP coordinates. However I too believe, the doc and 3d image views should match exactly.
Looks like we all agree Wink

Found a little glitch: if I add text to a page (thanks for fixing this too!) and want to change the font, the dialog always start on MS Shell Dlg 2 size 12, whichever font was previously used.

And another even smaller: I tried to use author string on front cover, and LPub3D choked on 'Philippe "Philo" Hurbain' because of double quote. Maybe some check?
Philippe Hurbain Wrote:LPub3D choked on 'Philippe "Philo" Hurbain' because of double quote.

No wonder! Everybody knows Philo, but who's that "Philippe Hurbain" guy you're talking about???

w.
Wink
Philippe Hurbain Wrote:BTW, is there a way to have several separated libraries (eg. LEGO and VEX)?

I don't think so but the current design allows for unlimited parts in the unofficial directory so it is possible to 'convert' this directory as a completely different library.

Philippe Hurbain Wrote:BTW(2): why the need for a regular LDraw library AND a zipped one? LeoCAD can be configured to use an unzipped library, and speed penalty is not that huge.

LeoCAD's use of the unzipped library is not as robust as the zipped one. I chose to take this approach because it's quite contained and; also, drives good convention as the official parts directory/Complete.zip should be static. The major reason for using the archive library with the viewer is, as it's stored in memory - unlike the unizipped directory - I gain a big performance improvement with the managing the fade parts generation. As you may know there are over 5K parts with some sort of colour so having the traverse directories to find them for fade is a bit heavy on the system. Of course I could have written classes to put the unzipped directories content in memory but this is precisely what LeoCAD is already doing using the archive - so to save time I just hooked into LeoCAD's native functionalities.

Some additional details...
1. As you know, the LPub3D viewer based on LeoCAD reads both the complete.zip and ldrawunf.zip files if they are placed in the same directory. if the user does not have these archives, my install script can download and setup in a directory of choice.

2. I have modified LeoCAD to allow dynamic additions to the in-memory part library (as you know,off-the-shelf LeoCAD reads the official (and unofficial if available) archive into memory upon startup only. This modification scans all official LDraw sub directories (so no custom directories) for official and unofficial parts and puts any delta into the the archive file(s) so they can be loaded into memory. Of course, only the unofficial directory/ldrawunf.zip should expect updates but it's up to the user. At present, this modification is only run to synchronize the envronment to load faded custom parts as LeoCAD will automatically load any 'new' unofficial parts on re/start. To allow custom parts fade, one must store these parts in the unofficial directory.

3. Finally, I've written a batch file to manually update ldrawunf.zip with any custom parts placed in the unofficial LDraw folder. The file can be tuned to point elsewhere. You can see the batch file at LPub3DViewer_LDraw_Unofficial_Library_Generator.bat.

FYI, for the batch file to work out-of-the-box, remove the extra 's' from the word 'files' on lines 33 and 34.

Philippe Hurbain Wrote:Found a little glitch: if I add text to a page (thanks for fixing this too!) and want to change the font, the dialog always start on MS Shell Dlg 2 size 12, whichever font was previously used.

I thought I fixed this. It looks like there is another function for adding text. I fixed, what I thought was the only 'modify font' function. As you can see with text items automatically generated (e.g. Title), the dialog works as expected.

Philippe Hurbain Wrote:And another even smaller: I tried to use author string on front cover, and LPub3D choked on 'Philippe "Philo" Hurbain' because of double quote. Maybe some check?

Ok, I didn't do anything with the 'add text' feature but I and see that the text meta in general does not like quotes - should be straight forward fix.

Cheers,
Trevor
Launching LPub3D I got two errors: missing libgcc_s_sjlj-1.dll and quazip.dll

I downloaded some versions of these DLL files but none of them seem to work, placing it in the folder where LPub3D_x32.exe is.

Any tips?
The errors I got were with the installer.
I downloaded the complete zip file with all DLL's and stuf and got things to work now.
Testing now!
Another small suggestion to enhance the ROTSTEP.

I am currently using a CALLOUT to display a rotation icon in the LEGO-instruction style.

To do so I have made two LDRAW arrows in a subfile:
Code:
0 FILE roticon.ldr
0 ROTICON
0 Icon to indicate a rotation step!
0 Name: roticon.ldr
0 Author: GL
0 Unofficial Model
0 !LPUB ASSEM MODEL_SCALE LOCAL  0.6000
0 ROTATION CENTER 0 0 0 1 "Custom"
0 ROTATION CONFIG 0 0
0 ROTSTEP 0 0 0 ABS
0 BUFEXCHG A STORE
0 MLCAD ARROW 0 -70.792 57.474 0 0.83147 0.55557 0 -0.55557 0.83147 0 0 0 1  10 3 15 40  1 35 2 0  1 1
0 MLCAD SKIP_BEGIN
3 1 -83.264 65.8075 0 -72.7384 52.7611 0 -71.1483 57.7121 0
...
4 1 -25.125 63.1245 0 -23.079 65.8833 0 -25.5734 67.55 0 -27.4441 65.0277 0
0 MLCAD SKIP_END
0 MLCAD ARROW 0 -35.208 88.526 0 -0.83147 -0.55557 0 0.55557 -0.83147 0 0 0 1  10 3 15 40  1 35 2 0  1 1
0 MLCAD SKIP_BEGIN
3 1 -22.7359 80.1924 0 -33.2616 93.2389 0 -34.8517 88.2879 0
...
4 1 -80.875 82.8755 0 -82.921 80.1167 0 -80.4266 78.45 0 -78.5559 80.9723 0
0 MLCAD SKIP_END
0 STEP
0 !LPUB NOSTEP
0 BUFEXCHG A RETRIEVE
0 NOFILE

When I need the CALLOUT I added the following code to the LDRAW file:
Code:
0 !LPUB PART BEGIN IGN
0 !LPUB CALLOUT BEGIN
1 0 80 0 0 1 0 0 0 1 0 0 0 1 roticon.ldr
0 !LPUB CALLOUT PLACEMENT TOP LEFT PLI OUTSIDE
0 !LPUB CALLOUT BORDER LOCAL ROUND #55ffff 0.0196849 40 MARGINS 0.0999974 0.149996
0 !LPUB CALLOUT BACKGROUND LOCAL COLOR "#ffffff"
0 !LPUB CALLOUT END

That's a nice workaround, with the only disadvantage that it clutters up the LDRAW file and it looks terrible in MLCAD as in big instructions you have them very often.
Would be great if something 'invisible' could be devised along with the ROTSTEP. i.e. have a custom ROTICON in the file as a subfile that can be used but is inserted not using a CALLOUT
A rotation icon graphic is on my TODO list so you are in luck.

Btw, did you know that you can simply add a rotation icon picture and drag it where ever you like? Each icon would add one line to your code. Perhaps this could be a solution for your clutter.

Cheers,
Trevor
Problem is that a picture is not vectorial (whatabout supporting some vectorial image format?). But if you start with a high resolution picure and use scaling (you have to use source code for that) it works fine.
Pages: 1 2