LPub3D 1.1.0 - A little enhancement and some corrections


Re: LPub3D 1.1.0 - A little enhancement and some corrections
#5
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
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: LPub3D 1.1.0 - A little enhancement and some corrections - by Trevor Sandy - 2015-07-15, 21:18

Forum Jump:


Users browsing this thread: 2 Guest(s)