1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Probable Bug - Wrong Footprint Data Exported?

Discussion in 'Library Creator XML' started by sonhospa, 30/4/08.

  1. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
    Hi everybody,

    I checked out LCXML only a few days ago, and yet want to hug Arno for that big-time utility :D - thank you man!

    One (little) thing I found confuses me a bit: When writing the library as txt for SBuilder, the object seems to get a wrong :confused: footprint width-wise... my building (I checked it twice that in gmax it's 13 * 11.4 m) is listed as 13m long and 34m wide, and that's what SBuilder sets as footprint then. Sure it's easy to edit the width manually since I know the measurements of my object. But what if I group other objects in a library which are not my own?

    Maybe someone knows more about that issue?
    Regards

    Mick
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,347
    Country:
    netherlands
    Hi Mick,

    The tool extracts the footprint from the MDL file, so it sounds like there might be a wrong value in there.

    Another option is that your object is not centered nicely in GMax. Because SBuilder does not support a box that is not centered on the origin, I then take the biggest distance and use that.
  3. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
    Hi Arno,

    thank you again for dealing with that minor issue of LC, which is a great and useful tool anyway!

    I checked for your hints and ran a test... still the same error. What's funny: the exported width parameter has different values depending on the z-value:duck:? Unfortunately I neither have the means nor the knowledge to examine the mdl file itself, so in case you would like to follow up you find the model and the mdl enclosed.

    Here's what I did:
    1. I took a simple object (house row) in gmax and used the "group all" command so that I'd not have any unwanted elements involved by accident. In the properties I see the correct values of l=104, w=11.4 and h=18. As far as I understood it, SB doesn't take the height-parameter from the text file anyway - and as said before, everything works fine and also fits as soon as I manually correct the width parameter to 11.4... After centering, I exported the group to mdl, added it to my library with LC and used the SB-Tool.
    2. Center (a): x and y = 0, z = h/2 = 9 --> Result (relevant line): GUID 1 104 34 1 NAME
    3. Center (b): as a cross-check of my own understanding of the term "center" I then tried to set z = 0 (the house doesn't stand on the grid anymore in gmax, the lower half is sunk into the ground which doesn't really make sense) --> Result (relevant line): GUID 1 104 18 1 NAME

    I can't imagine gmax exporting integer values into the mdl only, so wouldn't my objects width of 11.4 m have to show up somewhere? Or are width and hight somehow mingled into each other? If I export a similar object with 39.2 m length / 11.2 width, then the length parameter in the relevant line is straight 39 m and the width parameter 34 again.

    Thanks for another hint,
    Mick
  4. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,347
    Country:
    netherlands
    Hi Mick,

    If you attach the MDL file involved in this, I will take a look what ends up in there. Then I think we should be able to explain what is happening.
  5. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
  6. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,347
    Country:
    netherlands
    Hi Mick,

    This is what is stored in the bounding box:

    Minimum X -52 Y 0 Z -5.7
    Maximum X 52 Y 17 Z 5.7

    Because SBuilder draws the rectangular around the origin (as far as I know), I have to set the size to 104 meters and 34 meters to be sure it covers the entire object. If you would move the object around the Y axis, so that the values there would be -8.5 and 8.5 then it should work better.
  7. sonhospa

    sonhospa

    Joined:
    25/4/08
    Messages:
    12
    Country:
    germany
    Good Morning Arno,

    thank you for reviewing! So the source of all is still false centering in the gmax model...? :eek:

    OK - so I experimented again, changing the height of the whole group to straight 18 m and following your advice by setting all the centers to 0 each (the grid then cuts the house into an upper and a lower half) before exporting. The resulting line in the SBuilder Export is: GUID 1 104 18 1 NAME - so the length (104m) and the height (18 m) are exported with correct values.

    The most funny thing in the values you extracted (as well as in the resulting export line above) is that Y and Z are switched, so somehow the height of the building (17 m before, here changed to 18 m) seems to be stored in the Y variable and the width (11.4 = -5.7 to +5.7) in the Z variable, which is not used for SBuilder export. In gmax the object properties (whole group) again (or still) show Y = 11.4 m and Z = 18 m.

    Is there any known issues with gmax switching these values while exporting or :)scratchch sorry...don't mean to bother you :eek:) could there be any chance of an oversight in the LC tool that retrieves Z instead of Y from the mdl for the relevant line?

    I know it's a silly little thing... still thanks for confirmation.

    Have a nice day
    Mick
  8. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,347
    Country:
    netherlands
    Hi,

    No that is correct, in FS the Y and Z axes are switched. I guess I have to check in the SBuilder TXT writer to see if it does that correctly. That might be the reason of the bug.

Share This Page