• lenidcamper

    Hello Stu, can you tell please, what is wrong with my code?

    It only generates the standard name objects "pier_2_5", but does not trigger on the individual pier:width

    Cheers, Thomas


    Edited once, last by TomSimMuc (May 30, 2019 at 1:57 PM).

  • Hi Thomas

    A number of issues here

    At first I thought

    "Of course, you are not using the operator alias #GE# for >="

    The expression engine provides the alias/escape strings for operators to avoid special characters in XML. However >= will actually evaluate correctly.

    "<=" will give a syntax error. for consistency it is probably better to always use the alias strings

    The (...) construct is intended to define precedence in the expression. The ($pier:width) defeats my variable preload algorithm.

    I am parsing the expression into tokens on spaces to pick out variable names to preload before tag data is loaded. This avoids a "variable not defined" exception from the expression engine and allows the sparse tag negation functionality added in 0.7.1

    Use $pier:width #GE# '10' or ($pier:width #GE# '10')

    That lead me to the core problem. It appears there is a bug in the XSharper engine with comparison of left justified numeric values.

    ($height #LE# '90') will evaluate true for height tag value '100'

    but

    ($height #LE# ' 90') will evaluate to false

    I need to look under the hood of the XSharper engine to see if there is any way to fix this or find a workaround.

    /Stu

    PS

    what tag data are you comparing?

    zero padding will work.

    '090' will evaluate correctly compared with '100'

    where '90' will not.

    If you have added these tags using leading zero pad


    PPS

    turns out XSharper variables were defaulting to string type.

    need to detect tag datatype and force a cast to int or float as the variable is set.

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

    Edited 4 times, last by lenidcamper: pps (May 30, 2019 at 7:12 PM).

  • Thank you Stu for your commens.

    Yes silly from me, not to use #GE# ...

    But as this criteria triggers OK for me, the main problem in fact is, that it does not trigger the conditions:

    expression="($pier:width == '150')"

    etc.

    These are my OSM data:

    I now tried 0150, but that did not help either:

    together with

    expression="($pier:width == '0150')"

    The LOG looks OK so far, but finally, only the type

    <[string8][geometry][..\objects\Piers\Pier_Wood_1_6\pier_wood_1_6]>

    is exported.

    Cheers, Thomas


    Edited 3 times, last by TomSimMuc (May 31, 2019 at 12:20 PM).

  • As I mentioned in the postscript to a previous post, the expression engine did not internally resolve data types of

    variables and all variables defaulted to string. So it was doing a string compare for all numeric variables in expressions.

    I am testing a fix that loads int or float variables as required.

    In the pier example what is the expression in the model map?

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • sorry I did not scroll down in the include.

    Based on the log, the string compare (without leading zero) should have exported 2 different models.

    But it is actually exporting <[string8][geometry][..\objects\Piers\Pier_Wood_1_6\pier_wood_1_6]> ???

    I don't see where that could possibly come from based on the included config.

    "1_6" does not appear anywhere in the config!!!

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Yes, what looks like a valid expression is always returning false.

    I will have to see if I can reproduce the problem.

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • Published release 0.7.2 of ObjectGen

    Some bug fixes plus intersection exclusion functionality.

    Without exclusion collisions are unavoidable.


    With exclusion

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • I wish moving traffic was that easy!!!

    By "collision" I meant more than one vehicle occupying the same coordinates

    i7-6700K CPU @ 4.00GHz | ASUS Z170-A | 16Gb DDR4 | Samsung SSD 950 PRO NVME M.2 256GB | Samsung SSD 850 EVO 1TB | GeForce GTX 1080 Ti on GP102-A GPU | Oculus CV1 | Windows 10

  • I want wind turbine

    Hello Rakouth / Gasy24,

    The syntax part (taken and modified from the "test" example) you will need is:

    This keys also must be contained in the OSM file.

    You can check and edit your osm file with JOSM.

    It will need two keys/attributes:

    power= generator

    and

    generator:source=wind

    I found this example near Schoeppingen in Germany at location

    52.0970822, 7.2778395

    You may find different definitions, so you have to edit the OSM entry in that case or adapt the xml definitions to the keys found in the OSM file.

    Anyhow, they have to match to trigger a find by ObjectGen.

    Cheers, Thomas


    Edited 3 times, last by TomSimMuc (August 28, 2019 at 11:31 AM).

  • une dernière demande d'aide avant ... abandon à regret !

    j'ai créé la couverture générale de la Corse (en 2 maps) avec PylonGen ... génial, ok du premier coup.

    J'ai ensuite voulu tenter de placer un seul pylône de Communication/TV en utilisant un fichier .tsc modifié pour test ...

    Impossible d'obtenir un affichage après plusieurs jour d'essai divers ...

    Le pylonesTV est dans un répertoire "com_tower_models" situé dans le même répertoire que le fichiers pigno2_tv.tsc

    Quelqu'un peut-il me dire ce qui est faux dans mon fichier pigno2_tv.tsc joint. Je n'ai pas de fichier .toc puisque PylonGen n'en produisait pas et que cela marchait sans.

    Merci pour votre aide.

  • À la première vue, ce sont surtout les deux signes ">" qui déranges:

    Un autre point: le code ICAO doit être unique, sinon le fichier est ignoré. Comme il ne s’agit pas d’un aérodrome, il est préférable de laisser le code ICAO vide.

    De manière générale, il est préférable de mettre tous les objets dans un seul fichier * .tsc, dans la mesure où la distance le permet.

    Essayez le fichier modifié: pigno2_tv (1)_mod.txt

    Regards,

    Christophe