To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 12494
12493  |  12495
Subject: 
Some comments on LPub
Newsgroups: 
lugnet.cad
Date: 
Tue, 22 Mar 2005 15:09:13 GMT
Viewed: 
1066 times
  
I got this fabulous email from Andrew Maier:

Kevin,
as discussed, here are some comments on LPub. I wanted to post this on the
lugnet cad forum, but I signed up there only recently, and it seems to take a
while. So I'm writing to you, but feel free to post your answer to the cad
forum.

I'm a quite happy user of LPub, which I use to render MLCAD generated
assemblies. I am using the latest versions: LPub 2.2.0.2, L3P 1.3, the latest
LDRAW updates, POVRay 3.6, on WinXP SP1 (if that matters ...).

1. Just a nit: The 2.2.0.2 version displays 2.2.0.1 in the Help/About menu.

2. If an assembly has a STEP after the first part already, the construction
image for this step shows the part in the greyed color. If there are two or more
parts in the first step, the actual colors are shown. I did not track down
whether this is caused by LPub or L3P. The attached Comment2.zip file shows this
effect, it has a Comment2.mpd file with two subassemblies Comment2a (with one
part in the first step) and Comment2b (with two parts in the first step), along
with the relevant .dat, .pov and .bmp files for the subassemblies. The
config.lpb file that was used is also included. Let me know if you need more
config data. I am aware of the statement in the help file: "When rendering a DAT
with a single part, L3P can make a mistake on its color. You can force the
correct behavior using the Color check box, and the Color botton that is next to
it.". So if this ends up to be a L3P problem rather than a LPub problem, then it
should be fixed in L3P, since the workaround to have the Color checkbox in LPub
does not solve the problem for all those models that have more than one
subassembly starting with a single part step (And I'd maintain that this is the
majority of models, at least of mine). Let me know your thoughts on this one.

3. The setting for the creation of BOMs for subassemblies is not restored from
the config.lpb files properly, the checkmark is always off after loading a
config file, even when it was on when the config file was saved. This may be
caused by a typo in the config.lpb entry for that setting: "sumbodel_boms true".
If I change that manually to "submodel_boms true" then loading the config file
results in the checkmark being set. Saving the current config again recreates
the incorrect spelling in the config file.

4. When saving the config file, selecting "config.lpb" in some directory results
in "config.lpb.lpb" being written. This means one cannot just select an existing
config file from the file selection dialog, but one has to delete its extension
manually in that dialog. I suggest to append the file extension conditionally
(i.e. if not yet present).

5. It would be helpful to add the directory location of the config file to the
messages that report the restoring and saving of the local and global config
file. This would allow more easily to see which one is in effect currently.

6. There is some problem related to the rounding of some settings of the config
file.

    a) For instance, when "l3p_use_seam_width true 0.800000" is in the config
file, then after loading, the seam value appears in LPub as 0.800000011920929. I
think I had the situation that saving that config again, resulted in a value
different than 0.800000 in the config file, and that repeated loading and saving
moved the value further and further away from its original. However, I was not
able to reproduce that.

    b) Another setting for which the rounding is strange, is the Previous Step
color Scaling percentage. When that is set as "color_scaling 0.650000 ..." in
the config file, it is shown as 36/64% in L3Pub after loading that config, and
after saving it, it is "color_scaling 0.640000 ..." in the config file.
Subsequent load/save cycles keep changing it.

    c) The remaining three numbers in the color_scaling setting also behave
strangely, if I select white as color in LPub, it is saved as "0.996094 0.996094
0.996094". It seems to me it would be better to store that color as all the
other colors are stored, i.e. as 3 x 8-bit hex values.

7. I seem to be unable to use MLCAD rotation steps in a way that results in the
rendered images being rotated as I see it in MLCAD. I have the impression that
additive rotation steps are not supported by LPub (let me know if it should
work, then I investigate more). Also, when using relative rotation steps, the
rotation I see in MLCAD is different than the rendered images rotate. I have
attached Comment7.zip containing some files which show this effect. I'm not sure
to what extent any MLCAD settings influence this behaviour, so I included the
MLCAD.INI and the settings from the Registry in the zip, as well as a screen
shot of how I see it in MLCAD. The different rotation can be seen when comparing
the MLCAD screenshot (MLCAD-Screenshot-AfterRotation.png) with the image of the
fourth step (Comment7_0_03.bmp). While you may argue that the MLCAD viewing
angle is simply different, my point is that the direction of the x,y,z axis are
confusing between MLCAD and LPub. The perspective on the model is the same
before the rotation step (comparing MLCAD-Screenshot-BeforeRotation.png with
Comment7_0_01.bmp), and is different afterwards. This is a strong indication
that the axis are understood differently by the two programs. I did not dig into
whether LPub, L3P, POVRay or even MLCAD is the cuplrit. Any insight on what I
can do to get that consistent, is appreciated much.

8. Currently, the checkmark to cause generation of the BOM files is under the
BOM tab, while the checkmarks for all other generated files are under the Step
tab. I'd prefer to have that consistently, and ideally those settings that are
irrelevant if a particular kind of file is not generated, would be disabled. But
then this is a matter of taste to some extent, and I could understand if there
are more important things to do :-)

9. Related to that, and also to some other settings: I'd prefer if those
settings that are disabled would be shown greyed out and read-only, instead of
removing them from the dialog entirely. This seems to be what most programs do
these days in that case, and it gives some reassurance what settings would be
there, were the feature enabled.

10. I got confused by different sizes and background colors of the bricks in my
part images, until I found out about the parts image cache of LPub. I now use
the menu action Utilities/Erase Part Image Caches, and not very surprisingly,
that helped. I wish there was some more automatic way to erase that cache. Maybe
a checkbox that enables automatic erasure when loading a new model or loading a
new config file or when any seting affecting the parts images is changed online.
This ensures that the cache does not contain stale images, and still allows to
have some benefit from the cache, in the case settings that do not affect the
parts images, are changed and rendering is repeated. Another alternative would
be to make sure the cache contents is annotated with the right settings that
affected the images, and multiple versions would be kept. This is done already
for the resolution by means of an extra subdirectory level, but the point is
there are several more settings that affect the images (e.g. background colors,
minimum distance, and even the level at which a part was used). Given that
megabytes of bitmaps are generated in the target directory, the few parts in the
parts cache never really bothered me, so I now use to erase it before every
rendering of the construction images. So I could even live with a rather radical
erasure algorithm. That is better than hunting strange effects in the parts
images only to find out erasing the cache had been forgotten.

11. When using "Orthographic" lens, I get a parse error in POVRay, as shown in
the message log below. This can be reproduced by using the example from
Comment7.zip, and changing the Lens setting to Orthographic. Is Orthographic
supposed to work ?

    Persistence of Vision(tm) Ray Tracer Version 3.6.1.icl8
    ....
    Support libraries used by POV-Ray:
      ZLib 1.2.1, Copyright 1995-1998 Jean-loup Gailly and Mark Adler
      LibPNG 1.2.5, Copyright 1998-2002 Glenn Randers-Pehrson
      LibJPEG 6b, Copyright 1998 Thomas G. Lane
      LibTIFF 3.6.1, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
    ....
    Rendering started by GUI extension
    Preset INI file is 'D:\PROG\LEGO-SW\POV-RAY\renderer\quickres.ini', section
is '[512x384, No AA]'.
    Rendering using command line 'LPub +W800 +H600 +Q7 +AM1 +A '.
    Redirecting Options
      All Streams to console..........On
      Debug Stream to console.........On
      Fatal Stream to console.........On
      Render Stream to console........On
      Statistics Stream to console....On
      Warning Stream to console.......On
    Parsing Options
      Input file:
D:\u\am\privat\Lego\Test\LPub-Comments\2005-03-20\Comment7\Comment7_l.pov
(compatible
    to version 3.61)
      Remove bounds........On
      Split unions.........Off
      Library paths:
        D:\Prog\Lego-SW\POV-Ray\INCLUDE
        C:\WINDOWS\Fonts
        D:\Copy\LEGO-SW\LGEO-Fix
        D:\Copy\LEGO-SW\LGEO
    Output Options
      Image resolution 800 by 600 (rows 1 to 600, columns 1 to 800).
      Output file:
D:\u\am\privat\Lego\Test\LPub-Comments\2005-03-20\Comment7\Comment7.bmp, 24 bpp
    (system format)
      Graphic display......On  (gamma: 2.2)
      Mosaic preview.......Off
      CPU usage histogram..Off
      Continued trace......Off
    Tracing Options
      Quality:  7
      Bounding boxes.......On   Bounding threshold: 3
      Light Buffer.........On
      Vista Buffer.........On   Draw Vista Buffer....Off
      Antialiasing.........On  (Method 1, Threshold 0.300, Depth 3, Jitter 1.00)
      Clock value:    0.000  (Animation off)
    File:
D:\u\am\privat\Lego\Test\LPub-Comments\2005-03-20\Comment7\Comment7_l.pov  Line:
346
    File Context (5 lines):
        rotate   <0,1e-5,0> // Prevent gap between adjecent quads
        orthographic
    Parse Error: Expected 'perspective camera modifier', orthographic found
instead
    Total Scene Processing Times
      Parse Time:    0 hours  0 minutes  0 seconds (0 seconds)
      Photon Time:   0 hours  0 minutes  0 seconds (0 seconds)
      Render Time:   0 hours  0 minutes  0 seconds (0 seconds)
      Total Time:    0 hours  0 minutes  0 seconds (0 seconds)
    CPU time used: kernel 0.06 seconds, user 0.06 seconds, total 0.12 seconds
    POV-Ray finished


12. On single-assembly models, I get error messages from LPub:
"create_construction_images: Failed to open file D:\.....\Comment12\ for
reading", followed by two similar messages for create_part_lists and one for
submodel_bill_of_materials (if I create all of these). It seems to try to open a
directory instead of a file. I have a failing and a working model in the
attached Comment12.zip. The errors may be caused by the missing FILE statement
(the only difference between the two models), and it probably requires a fix by
MLCAD, which does not produce the FILE statement for single assembly files.
However, it would be nice if LPub came up with a more intuitive error message
than the one it uses currently.

If Michael is listening here: I somewhere read that it is good practice to have
the FILE statement in a mpd file. If that is generally accepted, then MLCAD
should produce it even for single assembly models.

13. It would be nice if LPub did remember the directory where the last model was
loaded from. Even better, a recently used file list in the File menu.

14. It would be nice if LPub accepted the LDRAW file as a command line
parameter. This would allow to register it on .mpd file types, or to work with
drag and drop.

15. With my configuration, the sizes of subassemblies and plain parts that show
up in the same parts list image, are quite different. The subassemblies are
about 50% of the size of plain parts. You can use any of the config files in the
attached zip files to reproduce that effect (If you want, I can create an
example). It would be nice if the sizes were the same.

16. On the layout of parts lists and BOMs:

    a) The layout of the parts lists is sometimes not optimal. Very long parts
could be drawn much closer together.

    b) I'd like to have more control over the number of rows and columns of
parts lists. For the BOMs, there is a maximum columns setting. I'd like to have
the same controls both for BOMs and parts lists. Initial thoughts on "more
controls": Maybe control both number of columns and number of rows, and define
preferences like horizontal or vertical.

    c) For larger BOMs, it would be useful to be able to split them over
multiple images.

    d) Some control over the ordering of parts in parts lists and BOMs would be
useful. Maybe based on color, part name, part number, with possibility to define
the order in which these criteria are to be applied.


17. I was playing around with the LPUB CALLOUT directives, but could not get
them to work. Can you point me to a working example ?


Kind Regards,
Andy



Message has 2 Replies:
  Re: Some comments on LPub
 
(...) Andy, I'm very impressed with this post on LPub. You are very thorough, and it is clear you've done your homework before asking questions. It is some of the best LPub feedback I've ever gotten. (...) Yes. Hopefully I won't make the same (...) (20 years ago, 22-Mar-05, to lugnet.cad)
  Re: Some comments on LPub
 
(...) <snip> (...) LPub renders the part images, and then walks through the image finding its bounding rectangle. All placement is based on packing rectangles. To better pack the long parts, I would need to find the bounding parallelogram, and pack (...) (20 years ago, 23-Mar-05, to lugnet.cad)

10 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR