IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques & Frameworks Discussion :

[Babylon.js] Erreur: undefined à la création d'un objet


Sujet :

Bibliothèques & Frameworks

  1. #1
    Membre confirmé

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2013
    Messages
    358
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Novembre 2013
    Messages : 358
    Points : 563
    Points
    563
    Billets dans le blog
    2
    Par défaut [Babylon.js] Erreur: undefined à la création d'un objet
    Bjr à vous,

    Je bute sur une erreur énervante de plus sur ce HTML, au droit de la création d'un objet MakeTCrossSection.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     /* Construit et retourne une section droite pour le Ribbon) */
      this.MakeTCrossSection = function (PosStation_x, PosStation_y, PosStation_z, PosPG_x, PosPG_y, PosPG_z, PosPD_x, PosPD_y, PosPD_z, HZ, HN) {
          const QPath = [];
          QPath.push(this.CalcCoordsFromXYZ(PosStation_x, PosStation_y, PosStation_z - HN));
          QPath.push(this.CalcCoordsFromXYZ(PosPD_x, PosPD_y, PosStation_z - 0.50 * HN));
          QPath.push(this.CalcCoordsFromXYZ(PosPD_x, PosPD_y, PosStation_z + 0.50 * HZ));
          QPath.push(this.CalcCoordsFromXYZ(PosStation_x, PosStation_y, PosStation_z + HZ));
          QPath.push(this.CalcCoordsFromXYZ(PosPG_x, PosPG_y, PosStation_z + 0.50 * HZ));
          QPath.push(this.CalcCoordsFromXYZ(PosPG_x, PosPG_y, PosStation_z - 0.50 * HN));
          return QPath;
      } // End method: MakeTCrossSection
    En effet, l'objet me revient 'indefined' et je ne comprends pas.

    Maintenant, si je mets:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
              /* Sous cette forme -> crash de l'onglet */
              QArrCrossSections.push(this.MakeTCrossSection(VV.PosST.x, VV.PosST.y, VV.PosST.z,  VV.PosPG.x, VV.PosPG.y, VV.PosPG.z,  VV.PosPD.x, VV.PosPD.y, VV.PosPD.z, VV.HZ, VV.HN));
              // Sous celle-ci: erreur CalcCoordsFromXYZ is not a function
              QArrCrossSections.push(new this.MakeTCrossSection(VV.PosST.x, VV.PosST.y, VV.PosST.z,  VV.PosPG.x, VV.PosPG.y, VV.PosPG.z,  VV.PosPD.x, VV.PosPD.y, VV.PosPD.z, VV.HZ, VV.HN));
    je me retouve avec une erreur TypeError: this.CalcCoordsFromXYZ is not a function (alors qu'elle est bien sûr déclarée dans la bonne classe)

    Incompréhensible +++

    Test003.htm
    Voir ligne 482 et suivantes
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    <!DOCTYPE html>
    <!-- Generated 2023-08-03 15:34:07.085 by GHTopoFPC version 3.14159265359 -->
    <!-- BoundingBox = (Coin bas gauche: : 403429.920, 3089500.143, 492.017 , Coin haut droit: : 403584.916, 3089670.312, 583.748) -->
    <HTML>
      <HEAD>
        <TITLE>Vue 3D</TITLE>
        <META charset="utf-8" />
    <!-- External Babylon JS Scripts -->
        <script src="https://cdn.babylonjs.com/babylon.js"></script>
    <!-- End -->
        <STYLE>
             html, body{
               overflow: hidden;  
               width: 100%; 
               height: 100%; 
               margin: 0; 
               padding: 0; 
             }
             #renderCanvas{
               width: 100%; 
               height: 100%; 
               touch-action: none; 
        </STYLE>
      </HEAD>
      <BODY>
    <canvas id="renderCanvas"></canvas>
        <SCRIPT type="text/javascript">
    // Variables globales
    console.log("DEBUG: MAIN:: Initialisation variables globales");
    var MyCanvas = document.getElementById("renderCanvas");
    var MyEngine = new BABYLON.Engine(MyCanvas, true, {preserveDrawingBuffer: true, stencil: true});
    // ==================================
    console.log("DEBUG: MAIN:: 000");
     
    /* --------------------------------- */
    /* TVisee */
    /* Visée */
    function TVisee(QName, QX1, QY1, QZ1, PosStation_x, PosStation_y, PosStation_z, PosPG_x, PosPG_y, PosPG_z, PosPD_x, PosPD_y, PosPD_z, HZ, HN) {
      this.Station = QName;
      this.PosP0 = new BABYLON.Vector3(QX1, QY1, QZ1); // 
      this.PosST = new BABYLON.Vector3(PosStation_x, PosStation_y, PosStation_z); // Station
      this.PosPG = new BABYLON.Vector3(PosPG_x, PosPG_y, PosPG_z); // Gauche
      this.PosPD = new BABYLON.Vector3(PosPD_x, PosPD_y, PosPD_z); // Droite
      this.HZ = HZ;
      this.HN = HN;
    } // End class: TVisee
    /* ----------------- */
     
    /* --------------------------------- */
    /* TSerie */
    /* Une série */
    function TSerie(QNomSerie) {
      this.NomSerie = QNomSerie;
      this.ListeVisees = []; /* Liste des visées */
      
      /* Nombre de visées */
      this.GetNbElements = function () {
        return this.ListeVisees.length;
      } // End method: GetNbElements
     
      
      /* Ajoute une visée */
      this.AddElement = function (S) {
        this.ListeVisees.push(S);
      } // End method: AddElement
     
      
      /* Attrape la visée Idx */
      this.GetElement = function (Idx) {
        return this.ListeVisees[Idx];
      } // End method: GetElement
     
      
      /* Ajoute une visée */
      this.AddVisee = function (QName, QX1, QY1, QZ1, QX2, QY2, QZ2, QCommentaire) {
        var V = new TVisee(QName, QX1, QY1, QZ1  , QX2, QY2, QZ2, QCommentaire);
        this.ListeVisees.push(V);
      } // End method: AddVisee
     
    } // End class: TSerie
    /* ----------------- */
     
    /* --------------------------------- */
    /* TCenterlines */
    /* Polygonales du réseau */
    function TCenterlines(QName, QR, QG, QB, QA) {
      this.Name = QName;
      this.Color = new BABYLON.Color4(QR, QG, QB); // QA
      this.ListeSeries = []; /* Liste des séries */
      
      /* Nombre de séries */
      this.GetNbElements = function () {
        return this.ListeSeries.length;
      } // End method: GetNbElements
     
      
      /* Ajoute une série */
      this.AddElement = function (S) {
        this.ListeSeries.push(S);
      } // End method: AddElement
     
      
      /* Attrape la série Idx */
      this.GetElement = function (Idx) {
        return this.ListeSeries[Idx];
      } // End method: GetElement
     
    } // End class: TCenterlines
    /* ----------------- */
     
    /* --------------------------------- */
    /* TSceneContainer */
    /* Conteneur de scène */
    function TSceneContainer(QX1, QY1, QZ1, QX2, QY2, QZ2) {
    console.log("DEBUG: TSceneContainer: 001");
      this.CoinBasGauche = new BABYLON.Vector3(QX1, QY1, QZ1); // Coin bas gauche
      this.CoinHautDroit = new BABYLON.Vector3(QX2, QY2, QZ2); // Coin haut droit
      this.Centerlines = new TCenterlines(0, 0, 255, 255); /* Conteneur de la centerline */
    console.log("DEBUG: MAIN:: 22 séries");
      // Série 0: 0 - La série 0 n'est pas modifiable
        var SS = new TSerie("0 - La série 0 n'est pas modifiable");
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 1: 1 - GALERIE PRINCIPALE
        var SS = new TSerie("1 - GALERIE PRINCIPALE");
              SS.AddElement(new TVisee("1.1", 403460.000, 3089600.000, 540.000, 403469.960, 3089600.174, 539.128,   403469.960, 3089602.174, 538.128,     403469.960, 3089599.174, 541.128,  2.000, 1.000));
              SS.AddElement(new TVisee("1.2", 403469.960, 3089600.174, 539.128, 403480.457, 3089599.991, 538.945,   403480.475, 3089600.990, 537.945,     403480.440, 3089598.991, 539.945,  1.000, 1.000));
              SS.AddElement(new TVisee("1.3", 403480.457, 3089599.992, 538.945, 403480.451, 3089590.127, 538.809,   403481.451, 3089590.126, 537.809,     403479.451, 3089590.128, 539.809,  1.000, 1.000));
              SS.AddElement(new TVisee("1.4", 403480.451, 3089590.128, 538.809, 403490.447, 3089590.376, 539.054,   403490.435, 3089591.376, 538.054,     403490.459, 3089589.376, 540.054,  1.000, 1.000));
              SS.AddElement(new TVisee("1.5", 403490.447, 3089590.376, 539.054, 403500.446, 3089590.363, 539.125,   403500.447, 3089591.363, 538.125,     403500.444, 3089589.363, 540.125,  1.000, 1.000));
              SS.AddElement(new TVisee("1.6", 403500.446, 3089590.364, 539.125, 403510.510, 3089590.419, 539.128,   403510.522, 3089591.419, 538.128,     403510.498, 3089589.419, 540.128,  1.000, 1.000));
              SS.AddElement(new TVisee("1.7", 403510.510, 3089590.419, 539.128, 403520.574, 3089590.125, 539.132,   403520.603, 3089591.124, 538.132,     403520.544, 3089589.125, 540.132,  1.000, 1.000));
              SS.AddElement(new TVisee("1.8", 403520.574, 3089590.126, 539.132, 403520.503, 3089600.068, 539.231,   403520.503, 3089600.068, 538.231,     403521.503, 3089600.075, 540.231,  1.000, 1.000));
              SS.AddElement(new TVisee("1.9", 403520.503, 3089600.069, 539.231, 403530.628, 3089599.885, 539.309,   403530.637, 3089600.385, 538.809,     403530.619, 3089599.385, 539.809,  0.500, 0.500));
              SS.AddElement(new TVisee("1.10", 403530.628, 3089599.886, 539.309, 403540.625, 3089599.712, 539.484,   403540.628, 3089599.912, 539.284,     403540.621, 3089599.512, 539.684,  0.200, 0.200));
              SS.AddElement(new TVisee("1.11", 403540.625, 3089599.713, 539.484, 403542.192, 3089614.628, 539.746,   403541.199, 3089614.742, 538.746,     403543.186, 3089614.515, 540.746,  1.000, 1.000));
              SS.AddElement(new TVisee("1.12", 403542.192, 3089614.628, 539.746, 403544.020, 3089629.514, 540.007,   403544.020, 3089629.514, 540.007,     403544.020, 3089629.514, 540.007,  0.000, 0.000));
              SS.AddElement(new TVisee("1.13", 403544.020, 3089629.514, 540.007, 403546.723, 3089642.228, 540.234,   403546.723, 3089642.228, 540.234,     403546.723, 3089642.228, 540.234,  0.000, 0.000));
              SS.AddElement(new TVisee("1.14", 403546.723, 3089642.228, 540.234, 403551.793, 3089653.102, 540.444,   403551.793, 3089653.102, 540.444,     403551.793, 3089653.102, 540.444,  0.000, 0.000));
              SS.AddElement(new TVisee("1.15", 403551.793, 3089653.102, 540.444, 403550.399, 3089669.041, 540.444,   403550.399, 3089669.041, 540.444,     403550.399, 3089669.041, 540.444,  0.000, 0.000));
              SS.AddElement(new TVisee("1.16", 403550.399, 3089669.041, 540.444, 403549.100, 3089669.791, 540.444,   403549.100, 3089669.791, 540.444,     403549.100, 3089669.791, 540.444,  0.000, 0.000));
              SS.AddElement(new TVisee("1.17", 403549.100, 3089669.791, 540.444, 403546.145, 3089670.312, 540.444,   403546.145, 3089670.312, 540.444,     403546.145, 3089670.312, 540.444,  0.000, 0.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 2: 2 - raccourci nord
        var SS = new TSerie("2 - raccourci nord");
              SS.AddElement(new TVisee("2.1", 403480.457, 3089599.992, 538.945, 403495.545, 3089600.055, 538.752,   403495.546, 3089600.555, 537.752,     403495.545, 3089599.855, 539.752,  1.000, 1.000));
              SS.AddElement(new TVisee("2.2", 403495.545, 3089600.055, 538.752, 403500.424, 3089600.017, 538.858,   403500.423, 3089600.217, 537.858,     403500.424, 3089599.817, 540.858,  2.000, 1.000));
              SS.AddElement(new TVisee("2.3", 403500.424, 3089600.017, 538.858, 403510.481, 3089600.146, 539.079,   403510.480, 3089600.246, 538.079,     403510.482, 3089600.046, 540.079,  1.000, 1.000));
              SS.AddElement(new TVisee("2.4", 403510.481, 3089600.147, 539.079, 403520.503, 3089600.068, 539.231,   403520.504, 3089600.268, 538.231,     403520.502, 3089599.968, 540.231,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 3: 3 - galerie sud en spirale
        var SS = new TSerie("3 - galerie sud en spirale");
              SS.AddElement(new TVisee("3.1", 403500.446, 3089590.364, 539.125, 403500.535, 3089585.545, 539.329,   403501.535, 3089585.539, 538.329,     403499.535, 3089585.551, 540.329,  1.000, 1.000));
              SS.AddElement(new TVisee("3.2", 403500.535, 3089585.545, 539.329, 403500.339, 3089579.129, 539.392,   403501.339, 3089579.099, 538.392,     403499.339, 3089579.160, 540.392,  1.000, 1.000));
              SS.AddElement(new TVisee("3.3", 403500.339, 3089579.130, 539.392, 403500.380, 3089569.249, 539.401,   403501.380, 3089569.253, 538.401,     403498.380, 3089569.241, 540.401,  1.000, 1.000));
              SS.AddElement(new TVisee("3.4", 403500.380, 3089569.250, 539.401, 403520.875, 3089569.010, 539.466,   403520.887, 3089570.010, 538.466,     403520.851, 3089567.010, 540.466,  1.000, 1.000));
              SS.AddElement(new TVisee("3.5", 403520.875, 3089569.011, 539.465, 403520.580, 3089579.109, 539.354,   403519.581, 3089579.080, 538.354,     403521.580, 3089579.138, 541.354,  2.000, 1.000));
              SS.AddElement(new TVisee("3.6", 403520.580, 3089579.110, 539.354, 403500.339, 3089579.129, 539.392,   403500.338, 3089578.129, 538.392,     403500.340, 3089580.129, 540.392,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 4: 4 - Galerie  vers 1/9
        var SS = new TSerie("4 - Galerie  vers 1/9");
              SS.AddElement(new TVisee("4.1", 403520.574, 3089590.126, 539.132, 403530.597, 3089589.685, 539.370,   403530.628, 3089590.385, 538.370,     403530.567, 3089588.986, 540.370,  1.000, 1.000));
              SS.AddElement(new TVisee("4.2", 403530.597, 3089589.687, 539.370, 403530.628, 3089599.885, 539.309,   403530.128, 3089599.887, 538.809,     403531.128, 3089599.884, 539.809,  0.500, 0.500));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 5: 5 - Nouvelle Jonction
        var SS = new TSerie("5 - Nouvelle Jonction");
              SS.AddElement(new TVisee("5.1", 403530.597, 3089589.686, 539.370, 403530.500, 3089579.487, 539.188,   403530.643, 3089579.347, 538.988,     403530.357, 3089579.626, 539.688,  0.500, 0.200));
              SS.AddElement(new TVisee("5.2", 403530.500, 3089579.487, 539.188, 403520.580, 3089579.109, 539.354,   403520.588, 3089578.909, 538.354,     403520.561, 3089579.609, 540.354,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 6: 6 - Traverse
        var SS = new TSerie("6 - Traverse");
              SS.AddElement(new TVisee("6.1", 403500.446, 3089590.364, 539.125, 403510.481, 3089600.146, 539.079,   403510.132, 3089600.504, 538.079,     403510.621, 3089600.003, 540.079,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 7: 7 - Galerie en venant du fond
        var SS = new TSerie("7 - Galerie en venant du fond");
              SS.AddElement(new TVisee("7.1", 403486.668, 3089561.028, 540.899, 403480.190, 3089570.204, 539.179,   403479.373, 3089569.627, 538.179,     403481.007, 3089570.781, 540.179,  1.000, 1.000));
              SS.AddElement(new TVisee("7.2", 403480.190, 3089570.205, 539.179, 403479.925, 3089580.156, 539.404,   403478.926, 3089580.130, 538.404,     403480.925, 3089580.183, 540.404,  1.000, 1.000));
              SS.AddElement(new TVisee("7.3", 403479.926, 3089580.157, 539.404, 403480.451, 3089590.127, 538.809,   403479.453, 3089590.180, 537.809,     403480.451, 3089590.127, 539.809,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 8: 8 - boucle 2
        var SS = new TSerie("8 - boucle 2");
              SS.AddElement(new TVisee("8.1", 403479.925, 3089580.157, 539.404, 403474.904, 3089580.222, 539.426,   403475.398, 3089579.727, 538.426,     403474.409, 3089580.718, 540.426,  1.000, 1.000));
              SS.AddElement(new TVisee("8.2", 403474.904, 3089580.222, 539.426, 403475.015, 3089570.177, 539.156,   403475.506, 3089570.676, 538.156,     403474.524, 3089569.678, 540.156,  1.000, 1.000));
              SS.AddElement(new TVisee("8.3", 403475.015, 3089570.177, 539.156, 403480.190, 3089570.204, 539.179,   403480.187, 3089570.704, 538.679,     403480.192, 3089569.704, 539.679,  0.500, 0.500));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 9: 9 - Galerie en venant du fond
        var SS = new TSerie("9 - Galerie en venant du fond");
              SS.AddElement(new TVisee("9.1", 403486.668, 3089561.028, 540.899, 403478.808, 3089552.889, 538.898,   403479.527, 3089552.194, 537.898,     403478.088, 3089553.583, 539.898,  1.000, 1.000));
              SS.AddElement(new TVisee("9.2", 403478.808, 3089552.889, 538.898, 403470.947, 3089544.749, 536.898,   403471.051, 3089543.755, 535.898,     403470.843, 3089545.744, 537.898,  1.000, 1.000));
              SS.AddElement(new TVisee("9.3", 403470.947, 3089544.749, 536.898, 403461.564, 3089551.090, 534.897,   403461.004, 3089550.261, 533.897,     403462.124, 3089551.918, 535.897,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 10: 10 - NOUVELLE SERIE
        var SS = new TSerie("10 - NOUVELLE SERIE");
              SS.AddElement(new TVisee("10.1", 403486.668, 3089561.028, 540.899, 403487.665, 3089563.028, 540.866,   403486.778, 3089563.490, 539.866,     403488.552, 3089562.567, 541.866,  1.000, 1.000));
              SS.AddElement(new TVisee("10.2", 403487.665, 3089563.028, 540.866, 403489.352, 3089566.134, 540.751,   403489.052, 3089566.535, 539.751,     403489.651, 3089565.734, 541.751,  1.000, 1.000));
              SS.AddElement(new TVisee("10.3", 403489.352, 3089566.134, 540.751, 403495.652, 3089567.476, 540.198,   403495.642, 3089567.525, 539.198,     403495.743, 3089566.984, 541.198,  1.000, 1.000));
              SS.AddElement(new TVisee("10.4", 403495.652, 3089567.476, 540.198, 403499.877, 3089568.144, 539.679,   403499.816, 3089568.223, 538.679,     403500.179, 3089567.746, 540.679,  1.000, 1.000));
              SS.AddElement(new TVisee("10.5", 403499.877, 3089568.144, 539.679, 403500.380, 3089569.249, 539.401,   403499.924, 3089569.456, 538.901,     403500.562, 3089569.166, 539.601,  0.200, 0.500));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 11: 100 - RESEAU 100
        var SS = new TSerie("100 - RESEAU 100");
              SS.AddElement(new TVisee("100.1", 403461.564, 3089551.091, 534.897, 403453.713, 3089542.963, 529.603,   403454.433, 3089542.269, 528.603,     403452.994, 3089543.658, 530.603,  1.000, 1.000));
              SS.AddElement(new TVisee("100.2", 403453.713, 3089542.964, 529.603, 403439.423, 3089536.301, 525.672,   403439.423, 3089536.301, 524.672,     403439.640, 3089537.277, 526.672,  1.000, 1.000));
              SS.AddElement(new TVisee("100.3", 403439.423, 3089536.301, 525.672, 403436.667, 3089539.586, 524.523,   403436.182, 3089538.712, 523.523,     403437.151, 3089540.461, 524.523,  0.000, 1.000));
              SS.AddElement(new TVisee("100.4", 403436.667, 3089539.586, 524.523, 403432.214, 3089540.212, 523.891,   403432.214, 3089540.212, 522.891,     403432.354, 3089541.202, 525.891,  2.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 12: 101 - RESEAU 100 (serie 10
        var SS = new TSerie("101 - RESEAU 100 (serie 10");
              SS.AddElement(new TVisee("101.1", 403453.713, 3089542.964, 529.603, 403463.118, 3089536.644, 524.313,   403463.601, 3089537.519, 523.313,     403462.634, 3089535.768, 525.313,  1.000, 1.000));
              SS.AddElement(new TVisee("101.2", 403463.118, 3089536.644, 524.313, 403468.939, 3089534.063, 522.722,   403468.939, 3089534.063, 521.722,     403468.534, 3089533.148, 523.722,  1.000, 1.000));
              SS.AddElement(new TVisee("101.3", 403468.939, 3089534.064, 522.722, 403476.423, 3089530.444, 520.640,   403476.423, 3089530.444, 519.640,     403475.988, 3089529.544, 521.640,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 13: 110 - Reseau 110
        var SS = new TSerie("110 - Reseau 110");
              SS.AddElement(new TVisee("110.1", 403540.058, 3089549.818, 540.213, 403537.896, 3089549.279, 539.900,   403537.963, 3089549.091, 538.900,     403537.562, 3089550.222, 540.900,  1.000, 1.000));
              SS.AddElement(new TVisee("110.2", 403537.896, 3089549.279, 539.900, 403534.596, 3089547.740, 539.645,   403534.596, 3089547.740, 538.645,     403534.181, 3089548.650, 540.645,  1.000, 1.000));
              SS.AddElement(new TVisee("110.3", 403534.596, 3089547.740, 539.645, 403530.986, 3089546.133, 539.090,   403530.864, 3089545.141, 538.090,     403531.108, 3089547.126, 539.090,  0.000, 1.000));
              SS.AddElement(new TVisee("110.4", 403530.986, 3089546.133, 539.090, 403527.414, 3089548.924, 538.694,   403526.752, 3089548.175, 537.694,     403528.077, 3089549.673, 539.694,  1.000, 1.000));
              SS.AddElement(new TVisee("110.5", 403527.414, 3089548.924, 538.694, 403524.526, 3089551.812, 538.336,   403524.526, 3089551.812, 538.336,     403525.233, 3089552.519, 539.336,  1.000, 0.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 14: 200 - R괥au 200 vers les Cacatombes
        var SS = new TSerie("200 - R괥au 200 vers les Cacatombes");
              SS.AddElement(new TVisee("200.1", 403468.939, 3089534.064, 522.722, 403461.943, 3089544.056, 522.509,   403461.943, 3089544.056, 521.509,     403462.795, 3089544.578, 523.509,  1.000, 1.000));
              SS.AddElement(new TVisee("200.2", 403461.943, 3089544.056, 522.509, 403457.949, 3089551.567, 521.765,   403457.058, 3089551.113, 520.765,     403457.949, 3089551.567, 521.765,  0.000, 1.000));
              SS.AddElement(new TVisee("200.3", 403457.949, 3089551.567, 521.765, 403455.960, 3089555.644, 521.127,   403455.366, 3089554.840, 520.127,     403455.960, 3089555.644, 521.127,  0.000, 1.000));
              SS.AddElement(new TVisee("200.4", 403455.960, 3089555.644, 521.127, 403452.810, 3089556.143, 519.547,   403452.607, 3089555.164, 519.547,     403453.013, 3089557.122, 520.547,  1.000, 0.000));
              SS.AddElement(new TVisee("200.5", 403452.810, 3089556.143, 519.547, 403450.960, 3089556.618, 517.807,   403450.548, 3089555.706, 517.307,     403451.371, 3089557.529, 518.807,  1.000, 0.500));
              SS.AddElement(new TVisee("200.6", 403450.960, 3089556.618, 517.807, 403447.130, 3089559.220, 517.127,   403447.130, 3089559.220, 516.627,     403447.749, 3089560.005, 518.627,  1.500, 0.500));
              SS.AddElement(new TVisee("200.7", 403447.130, 3089559.220, 517.127, 403446.539, 3089559.759, 516.367,   403446.171, 3089558.829, 515.367,     403446.539, 3089559.759, 517.467,  1.100, 1.000));
              SS.AddElement(new TVisee("200.8", 403446.539, 3089559.759, 516.367, 403436.540, 3089559.916, 506.367,   403436.634, 3089558.920, 505.367,     403436.446, 3089560.911, 506.367,  0.000, 1.000));
              SS.AddElement(new TVisee("200.9", 403436.540, 3089559.916, 506.367, 403436.442, 3089559.895, 492.367,   403436.645, 3089558.916, 491.367,     403436.239, 3089560.875, 507.367,  15.000, 1.000));
              SS.AddElement(new TVisee("200.10", 403436.442, 3089559.895, 492.367, 403429.920, 3089558.545, 492.017,   403430.529, 3089555.607, 491.017,     403429.920, 3089558.545, 506.017,  14.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 15: 300 - Reseau 300
        var SS = new TSerie("300 - Reseau 300");
              SS.AddElement(new TVisee("300.1", 403520.875, 3089569.011, 539.466, 403532.879, 3089560.896, 539.977,   403532.879, 3089560.896, 538.977,     403532.165, 3089560.196, 540.977,  1.000, 1.000));
              SS.AddElement(new TVisee("300.2", 403532.879, 3089560.896, 539.977, 403540.058, 3089549.817, 540.213,   403540.897, 3089550.361, 539.213,     403539.218, 3089549.273, 541.213,  1.000, 1.000));
              SS.AddElement(new TVisee("300.3", 403540.058, 3089549.818, 540.213, 403545.276, 3089547.680, 540.323,   403545.655, 3089548.605, 539.323,     403544.518, 3089545.829, 541.323,  1.000, 1.000));
              SS.AddElement(new TVisee("300.4", 403545.276, 3089547.681, 540.323, 403542.976, 3089544.271, 540.252,   403543.753, 3089543.642, 539.252,     403542.199, 3089544.901, 541.252,  1.000, 1.000));
              SS.AddElement(new TVisee("300.5", 403542.976, 3089544.271, 540.252, 403540.106, 3089541.299, 539.673,   403540.106, 3089541.299, 538.673,     403539.504, 3089542.097, 540.673,  1.000, 1.000));
              SS.AddElement(new TVisee("300.6", 403540.106, 3089541.299, 539.673, 403534.002, 3089538.051, 537.953,   403535.465, 3089536.687, 537.953,     403533.637, 3089538.392, 538.953,  1.000, 0.000));
              SS.AddElement(new TVisee("300.7", 403534.002, 3089538.051, 537.953, 403532.227, 3089534.066, 537.878,   403533.138, 3089533.654, 536.878,     403531.772, 3089534.273, 538.878,  1.000, 1.000));
              SS.AddElement(new TVisee("300.8", 403532.227, 3089534.066, 537.878, 403532.193, 3089533.992, 533.380,   403533.104, 3089533.580, 533.380,     403531.282, 3089534.404, 536.380,  3.000, 0.000));
              SS.AddElement(new TVisee("300.9", 403532.193, 3089533.992, 533.380, 403531.684, 3089532.849, 533.380,   403532.597, 3089532.443, 533.380,     403530.771, 3089533.256, 536.380,  3.000, 0.000));
              SS.AddElement(new TVisee("300.10", 403531.684, 3089532.849, 533.380, 403531.582, 3089532.621, 533.380,   403532.444, 3089532.113, 533.380,     403530.721, 3089533.129, 533.880,  0.500, 0.000));
              SS.AddElement(new TVisee("300.11", 403531.582, 3089532.621, 533.380, 403528.842, 3089528.986, 533.064,   403529.458, 3089528.198, 532.564,     403528.227, 3089529.773, 533.064,  0.000, 0.500));
              SS.AddElement(new TVisee("300.12", 403528.842, 3089528.986, 533.064, 403520.950, 3089525.632, 533.066,   403521.732, 3089523.791, 532.066,     403520.558, 3089526.553, 534.066,  1.000, 1.000));
              SS.AddElement(new TVisee("300.13", 403520.950, 3089525.633, 533.066, 403517.423, 3089526.127, 533.005,   403517.066, 3089525.193, 532.005,     403517.423, 3089526.127, 535.005,  2.000, 1.000));
              SS.AddElement(new TVisee("300.14", 403517.423, 3089526.127, 533.005, 403513.506, 3089528.766, 532.342,   403513.506, 3089528.766, 531.342,     403514.042, 3089529.610, 533.342,  1.000, 1.000));
              SS.AddElement(new TVisee("300.15", 403513.506, 3089528.766, 532.342, 403509.613, 3089531.103, 531.126,   403509.326, 3089530.693, 530.126,     403510.186, 3089531.922, 532.126,  1.000, 1.000));
              SS.AddElement(new TVisee("300.16", 403509.613, 3089531.103, 531.126, 403504.392, 3089535.325, 530.184,   403504.392, 3089535.325, 529.184,     403504.625, 3089536.297, 531.184,  1.000, 1.000));
              SS.AddElement(new TVisee("300.17", 403504.392, 3089535.325, 530.184, 403496.840, 3089533.717, 528.545,   403496.840, 3089533.717, 527.545,     403496.615, 3089534.691, 529.545,  1.000, 1.000));
              SS.AddElement(new TVisee("300.18", 403496.840, 3089533.717, 528.545, 403492.267, 3089532.575, 527.800,   403492.320, 3089531.577, 527.800,     403492.215, 3089533.574, 529.800,  2.000, 0.000));
              SS.AddElement(new TVisee("300.19", 403492.267, 3089532.575, 527.800, 403484.039, 3089533.728, 525.731,   403484.039, 3089533.728, 524.731,     403483.909, 3089534.719, 526.731,  1.000, 1.000));
              SS.AddElement(new TVisee("300.20", 403484.039, 3089533.728, 525.731, 403477.172, 3089530.811, 524.552,   403477.172, 3089530.811, 520.552,     403476.757, 3089531.720, 525.552,  1.000, 4.000));
              SS.AddElement(new TVisee("300.21", 403477.172, 3089530.811, 524.552, 403476.423, 3089530.444, 520.640,   403476.863, 3089529.546, 519.640,     403475.984, 3089531.343, 521.640,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 16: 301 - Branche Ouest
        var SS = new TSerie("301 - Branche Ouest");
              SS.AddElement(new TVisee("301.1", 403545.276, 3089547.681, 540.323, 403550.918, 3089547.976, 540.224,   403551.332, 3089548.886, 539.224,     403550.503, 3089547.066, 544.224,  4.000, 1.000));
              SS.AddElement(new TVisee("301.2", 403550.918, 3089547.976, 540.224, 403557.210, 3089539.923, 538.788,   403557.519, 3089540.874, 537.788,     403556.901, 3089538.972, 542.788,  4.000, 1.000));
              SS.AddElement(new TVisee("301.3", 403557.210, 3089539.923, 538.788, 403565.283, 3089542.238, 538.642,   403565.007, 3089543.200, 534.642,     403565.283, 3089542.238, 539.142,  0.500, 4.000));
              SS.AddElement(new TVisee("301.4", 403565.283, 3089542.239, 538.642, 403568.266, 3089538.421, 534.279,   403568.882, 3089539.209, 533.279,     403567.650, 3089537.633, 538.279,  4.000, 1.000));
              SS.AddElement(new TVisee("301.5", 403568.266, 3089538.421, 534.279, 403572.148, 3089536.693, 534.205,   403572.351, 3089537.149, 533.205,     403571.945, 3089536.236, 536.405,  2.200, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 17: 501 - Nouvelle des ZOBS
        var SS = new TSerie("501 - Nouvelle des ZOBS");
              SS.AddElement(new TVisee("501.1", 403565.283, 3089542.239, 538.642, 403565.846, 3089544.340, 539.477,   403565.653, 3089544.392, 539.477,     403565.943, 3089544.315, 540.477,  1.000, 0.000));
              SS.AddElement(new TVisee("501.2", 403565.846, 3089544.340, 539.477, 403566.484, 3089546.723, 540.473,   403565.521, 3089546.990, 539.473,     403567.448, 3089546.455, 542.473,  2.000, 1.000));
              SS.AddElement(new TVisee("501.3", 403566.484, 3089546.723, 540.473, 403567.463, 3089550.136, 541.358,   403566.493, 3089550.378, 540.358,     403568.433, 3089549.894, 543.358,  2.000, 1.000));
              SS.AddElement(new TVisee("501.4", 403567.463, 3089550.136, 541.358, 403568.248, 3089553.828, 542.299,   403567.248, 3089553.793, 541.299,     403569.247, 3089553.863, 545.299,  3.000, 1.000));
              SS.AddElement(new TVisee("501.5", 403568.248, 3089553.828, 542.299, 403566.481, 3089559.991, 544.507,   403565.520, 3089559.715, 543.507,     403567.442, 3089560.266, 550.507,  6.000, 1.000));
              SS.AddElement(new TVisee("501.6", 403566.481, 3089559.992, 544.507, 403561.221, 3089567.789, 547.563,   403560.351, 3089567.297, 546.563,     403562.091, 3089568.282, 550.563,  3.000, 1.000));
              SS.AddElement(new TVisee("501.7", 403561.221, 3089567.789, 547.563, 403558.560, 3089573.497, 549.731,   403557.653, 3089573.074, 548.731,     403559.466, 3089573.919, 552.731,  3.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 18: 502 - Le Colimacon
        var SS = new TSerie("502 - Le Colimacon");
              SS.AddElement(new TVisee("502.1", 403566.481, 3089559.992, 544.507, 403568.387, 3089561.898, 545.822,   403567.779, 3089562.692, 544.822,     403568.996, 3089561.105, 546.822,  1.000, 1.000));
              SS.AddElement(new TVisee("502.2", 403568.387, 3089561.898, 545.822, 403570.723, 3089563.246, 547.137,   403570.340, 3089564.170, 546.137,     403571.105, 3089562.323, 548.137,  1.000, 1.000));
              SS.AddElement(new TVisee("502.3", 403570.723, 3089563.246, 547.137, 403573.327, 3089563.944, 548.452,   403573.197, 3089564.936, 547.452,     403573.458, 3089562.953, 549.452,  1.000, 1.000));
              SS.AddElement(new TVisee("502.4", 403573.327, 3089563.944, 548.452, 403576.023, 3089563.944, 549.767,   403576.154, 3089564.936, 548.767,     403575.893, 3089562.953, 550.767,  1.000, 1.000));
              SS.AddElement(new TVisee("502.5", 403576.023, 3089563.944, 549.767, 403578.628, 3089563.246, 551.082,   403579.011, 3089564.170, 550.082,     403578.245, 3089562.323, 552.082,  1.000, 1.000));
              SS.AddElement(new TVisee("502.6", 403578.628, 3089563.246, 551.082, 403580.963, 3089561.898, 552.397,   403581.572, 3089562.692, 551.397,     403580.354, 3089561.105, 553.397,  1.000, 1.000));
              SS.AddElement(new TVisee("502.7", 403580.963, 3089561.898, 552.397, 403582.870, 3089559.992, 553.713,   403583.663, 3089560.600, 552.713,     403582.076, 3089559.383, 554.713,  1.000, 1.000));
              SS.AddElement(new TVisee("502.8", 403582.870, 3089559.992, 553.713, 403584.218, 3089557.656, 555.028,   403585.142, 3089558.039, 554.028,     403583.294, 3089557.274, 556.028,  1.000, 1.000));
              SS.AddElement(new TVisee("502.9", 403584.218, 3089557.656, 555.028, 403584.916, 3089555.052, 556.343,   403585.907, 3089555.183, 555.343,     403583.924, 3089554.921, 557.343,  1.000, 1.000));
              SS.AddElement(new TVisee("502.10", 403584.916, 3089555.052, 556.343, 403584.916, 3089552.356, 557.658,   403585.907, 3089552.225, 556.658,     403583.924, 3089552.486, 558.658,  1.000, 1.000));
              SS.AddElement(new TVisee("502.11", 403584.916, 3089552.356, 557.658, 403583.985, 3089548.883, 559.411,   403584.909, 3089548.500, 558.411,     403583.061, 3089549.266, 560.411,  1.000, 1.000));
              SS.AddElement(new TVisee("502.12", 403583.985, 3089548.883, 559.411, 403582.188, 3089545.769, 561.165,   403582.981, 3089545.161, 560.165,     403581.394, 3089546.378, 562.165,  1.000, 1.000));
              SS.AddElement(new TVisee("502.13", 403582.188, 3089545.769, 561.165, 403579.646, 3089543.227, 562.918,   403580.254, 3089542.434, 561.918,     403579.037, 3089544.021, 563.918,  1.000, 1.000));
              SS.AddElement(new TVisee("502.14", 403579.646, 3089543.227, 562.918, 403576.532, 3089541.430, 564.672,   403576.915, 3089540.506, 563.672,     403576.149, 3089542.354, 565.672,  1.000, 1.000));
              SS.AddElement(new TVisee("502.15", 403576.532, 3089541.430, 564.672, 403573.059, 3089540.499, 566.425,   403573.190, 3089539.508, 565.425,     403572.929, 3089541.491, 567.425,  1.000, 1.000));
              SS.AddElement(new TVisee("502.16", 403573.059, 3089540.499, 566.425, 403569.464, 3089540.499, 568.179,   403569.334, 3089539.508, 567.179,     403569.595, 3089541.491, 569.179,  1.000, 1.000));
              SS.AddElement(new TVisee("502.17", 403569.464, 3089540.499, 568.179, 403565.992, 3089541.430, 569.932,   403565.609, 3089540.506, 568.932,     403566.374, 3089542.354, 570.932,  1.000, 1.000));
              SS.AddElement(new TVisee("502.18", 403565.992, 3089541.430, 569.932, 403562.878, 3089543.227, 571.686,   403562.269, 3089542.434, 570.686,     403563.487, 3089544.021, 572.686,  1.000, 1.000));
              SS.AddElement(new TVisee("502.19", 403562.878, 3089543.227, 571.686, 403560.336, 3089545.769, 573.439,   403559.813, 3089544.917, 572.439,     403560.858, 3089546.622, 574.439,  1.000, 1.000));
              SS.AddElement(new TVisee("502.20", 403560.336, 3089545.769, 573.439, 403558.527, 3089546.357, 574.057,   403558.181, 3089545.419, 573.057,     403558.873, 3089547.295, 575.057,  1.000, 1.000));
              SS.AddElement(new TVisee("502.21", 403558.527, 3089546.357, 574.057, 403556.769, 3089547.085, 574.675,   403556.351, 3089546.177, 573.675,     403557.188, 3089547.993, 575.675,  1.000, 1.000));
              SS.AddElement(new TVisee("502.22", 403556.769, 3089547.085, 574.675, 403555.075, 3089547.949, 575.293,   403554.586, 3089547.076, 574.293,     403555.563, 3089548.821, 576.293,  1.000, 1.000));
              SS.AddElement(new TVisee("502.23", 403555.075, 3089547.949, 575.293, 403553.453, 3089548.942, 575.911,   403552.897, 3089548.111, 574.911,     403554.008, 3089549.774, 576.911,  1.000, 1.000));
              SS.AddElement(new TVisee("502.24", 403553.453, 3089548.942, 575.911, 403551.914, 3089550.061, 576.529,   403551.295, 3089549.275, 575.529,     403552.533, 3089550.846, 577.529,  1.000, 1.000));
              SS.AddElement(new TVisee("502.25", 403551.914, 3089550.061, 576.529, 403550.468, 3089551.296, 577.147,   403549.789, 3089550.562, 576.147,     403551.146, 3089552.030, 578.147,  1.000, 1.000));
              SS.AddElement(new TVisee("502.26", 403550.468, 3089551.296, 577.147, 403549.123, 3089552.641, 577.766,   403548.388, 3089551.962, 576.766,     403549.857, 3089553.320, 578.766,  1.000, 1.000));
              SS.AddElement(new TVisee("502.27", 403549.123, 3089552.641, 577.766, 403547.887, 3089554.087, 578.384,   403547.102, 3089553.468, 577.384,     403548.673, 3089554.706, 579.384,  1.000, 1.000));
              SS.AddElement(new TVisee("502.28", 403547.887, 3089554.087, 578.384, 403546.769, 3089555.626, 579.002,   403545.938, 3089555.071, 578.002,     403547.601, 3089556.182, 580.002,  1.000, 1.000));
              SS.AddElement(new TVisee("502.29", 403546.769, 3089555.626, 579.002, 403545.775, 3089557.248, 579.620,   403544.903, 3089556.759, 578.620,     403546.648, 3089557.737, 580.620,  1.000, 1.000));
              SS.AddElement(new TVisee("502.30", 403545.775, 3089557.248, 579.620, 403544.480, 3089559.790, 580.547,   403543.589, 3089559.336, 579.547,     403545.371, 3089560.244, 581.547,  1.000, 1.000));
              SS.AddElement(new TVisee("502.31", 403544.480, 3089559.791, 580.547, 403542.714, 3089563.257, 579.613,   403541.862, 3089562.734, 578.613,     403543.567, 3089563.779, 580.613,  1.000, 1.000));
              SS.AddElement(new TVisee("502.32", 403542.714, 3089563.257, 579.613, 403540.428, 3089566.403, 578.679,   403539.643, 3089565.784, 577.679,     403541.213, 3089567.022, 579.679,  1.000, 1.000));
              SS.AddElement(new TVisee("502.33", 403540.428, 3089566.403, 578.679, 403537.902, 3089569.361, 577.745,   403537.168, 3089568.682, 576.745,     403538.636, 3089570.040, 578.745,  1.000, 1.000));
              SS.AddElement(new TVisee("502.34", 403537.902, 3089569.361, 577.745, 403535.152, 3089572.111, 576.812,   403534.473, 3089571.377, 575.812,     403535.831, 3089572.845, 577.812,  1.000, 1.000));
              SS.AddElement(new TVisee("502.35", 403535.152, 3089572.111, 576.812, 403532.194, 3089574.637, 575.878,   403531.575, 3089573.852, 574.878,     403532.813, 3089575.422, 576.878,  1.000, 1.000));
              SS.AddElement(new TVisee("502.36", 403532.194, 3089574.637, 575.878, 403529.048, 3089576.923, 574.944,   403528.492, 3089576.092, 573.944,     403529.603, 3089577.755, 575.944,  1.000, 1.000));
              SS.AddElement(new TVisee("502.37", 403529.048, 3089576.923, 574.944, 403525.731, 3089578.956, 574.010,   403525.243, 3089578.083, 573.010,     403526.220, 3089579.828, 575.010,  1.000, 1.000));
              SS.AddElement(new TVisee("502.38", 403525.731, 3089578.956, 574.010, 403522.266, 3089580.721, 573.076,   403521.847, 3089579.813, 572.076,     403522.684, 3089581.630, 574.076,  1.000, 1.000));
              SS.AddElement(new TVisee("502.39", 403522.266, 3089580.721, 573.076, 403518.672, 3089582.210, 572.143,   403518.326, 3089581.272, 571.143,     403519.018, 3089583.148, 573.143,  1.000, 1.000));
              SS.AddElement(new TVisee("502.40", 403518.672, 3089582.210, 572.143, 403514.973, 3089583.412, 571.209,   403514.702, 3089582.449, 570.209,     403515.245, 3089584.374, 572.209,  1.000, 1.000));
              SS.AddElement(new TVisee("502.41", 403514.973, 3089583.412, 571.209, 403511.191, 3089584.320, 570.275,   403510.996, 3089583.339, 569.275,     403511.386, 3089585.301, 571.275,  1.000, 1.000));
              SS.AddElement(new TVisee("502.42", 403511.191, 3089584.320, 570.275, 403507.350, 3089584.928, 569.341,   403507.232, 3089583.935, 568.341,     403507.467, 3089585.921, 570.341,  1.000, 1.000));
              SS.AddElement(new TVisee("502.43", 403507.350, 3089584.928, 569.341, 403503.472, 3089585.233, 568.408,   403503.433, 3089584.234, 567.408,     403503.511, 3089586.233, 569.408,  1.000, 1.000));
              SS.AddElement(new TVisee("502.44", 403503.472, 3089585.233, 568.408, 403499.583, 3089585.233, 567.474,   403499.622, 3089584.234, 566.474,     403499.543, 3089586.233, 568.474,  1.000, 1.000));
              SS.AddElement(new TVisee("502.45", 403499.583, 3089585.233, 567.474, 403496.675, 3089585.004, 566.773,   403496.792, 3089584.011, 565.773,     403496.557, 3089585.998, 567.773,  1.000, 1.000));
              SS.AddElement(new TVisee("502.46", 403496.675, 3089585.004, 566.773, 403493.793, 3089584.548, 566.073,   403493.988, 3089583.567, 565.073,     403493.598, 3089585.529, 567.073,  1.000, 1.000));
              SS.AddElement(new TVisee("502.47", 403493.793, 3089584.548, 566.073, 403490.957, 3089583.867, 565.373,   403491.228, 3089582.905, 564.373,     403490.685, 3089584.830, 566.373,  1.000, 1.000));
              SS.AddElement(new TVisee("502.48", 403490.957, 3089583.867, 565.373, 403488.183, 3089582.966, 564.672,   403488.529, 3089582.028, 563.672,     403487.836, 3089583.904, 565.672,  1.000, 1.000));
              SS.AddElement(new TVisee("502.49", 403488.183, 3089582.966, 564.672, 403485.487, 3089581.849, 563.972,   403485.906, 3089580.941, 562.972,     403485.069, 3089582.758, 564.972,  1.000, 1.000));
              SS.AddElement(new TVisee("502.50", 403485.487, 3089581.849, 563.972, 403482.888, 3089580.525, 563.272,   403483.377, 3089579.653, 562.272,     403482.400, 3089581.398, 564.272,  1.000, 1.000));
              SS.AddElement(new TVisee("502.51", 403482.888, 3089580.525, 563.272, 403480.401, 3089579.001, 562.571,   403480.957, 3089578.169, 561.571,     403479.845, 3089579.832, 563.571,  1.000, 1.000));
              SS.AddElement(new TVisee("502.52", 403480.401, 3089579.001, 562.571, 403478.041, 3089577.286, 561.871,   403478.660, 3089576.501, 560.871,     403477.422, 3089578.072, 562.871,  1.000, 1.000));
              SS.AddElement(new TVisee("502.53", 403478.041, 3089577.286, 561.871, 403475.823, 3089575.392, 561.171,   403476.502, 3089574.657, 560.171,     403475.144, 3089576.126, 562.171,  1.000, 1.000));
              SS.AddElement(new TVisee("502.54", 403475.823, 3089575.392, 561.171, 403473.760, 3089573.329, 560.470,   403474.494, 3089572.650, 559.470,     403473.026, 3089574.008, 561.470,  1.000, 1.000));
              SS.AddElement(new TVisee("502.55", 403473.760, 3089573.329, 560.470, 403471.866, 3089571.111, 559.770,   403472.651, 3089570.492, 558.770,     403471.080, 3089571.730, 560.770,  1.000, 1.000));
              SS.AddElement(new TVisee("502.56", 403471.866, 3089571.111, 559.770, 403470.151, 3089568.751, 559.070,   403470.982, 3089568.195, 558.070,     403469.320, 3089569.306, 560.070,  1.000, 1.000));
              SS.AddElement(new TVisee("502.57", 403470.151, 3089568.751, 559.070, 403468.627, 3089566.264, 558.369,   403469.499, 3089565.775, 557.369,     403467.754, 3089566.752, 559.369,  1.000, 1.000));
              SS.AddElement(new TVisee("502.58", 403468.627, 3089566.264, 558.369, 403467.302, 3089563.664, 557.669,   403468.211, 3089563.246, 556.669,     403466.394, 3089564.083, 558.669,  1.000, 1.000));
              SS.AddElement(new TVisee("502.59", 403467.302, 3089563.664, 557.669, 403466.186, 3089560.969, 556.969,   403467.124, 3089560.623, 555.969,     403465.248, 3089561.316, 557.969,  1.000, 1.000));
              SS.AddElement(new TVisee("502.60", 403466.186, 3089560.969, 556.969, 403465.285, 3089558.195, 556.268,   403466.247, 3089557.924, 555.268,     403464.322, 3089558.466, 557.268,  1.000, 1.000));
              SS.AddElement(new TVisee("502.61", 403465.285, 3089558.195, 556.268, 403464.604, 3089555.359, 555.568,   403465.585, 3089555.163, 554.568,     403463.623, 3089555.554, 556.568,  1.000, 1.000));
              SS.AddElement(new TVisee("502.62", 403464.604, 3089555.359, 555.568, 403464.147, 3089552.477, 554.868,   403465.140, 3089552.360, 553.868,     403463.154, 3089552.595, 555.868,  1.000, 1.000));
              SS.AddElement(new TVisee("502.63", 403464.147, 3089552.477, 554.868, 403463.919, 3089549.569, 554.167,   403464.918, 3089549.530, 553.167,     403462.919, 3089549.608, 555.167,  1.000, 1.000));
              SS.AddElement(new TVisee("502.64", 403463.919, 3089549.569, 554.167, 403463.919, 3089546.652, 553.467,   403464.918, 3089546.691, 552.467,     403462.919, 3089546.613, 554.467,  1.000, 1.000));
              SS.AddElement(new TVisee("502.65", 403463.919, 3089546.652, 553.467, 403464.147, 3089543.744, 552.767,   403465.140, 3089543.862, 551.767,     403463.154, 3089543.626, 553.767,  1.000, 1.000));
              SS.AddElement(new TVisee("502.66", 403464.147, 3089543.744, 552.767, 403464.604, 3089540.863, 552.066,   403465.585, 3089541.058, 551.066,     403463.623, 3089540.668, 553.066,  1.000, 1.000));
              SS.AddElement(new TVisee("502.67", 403464.604, 3089540.863, 552.066, 403465.285, 3089538.026, 551.366,   403466.247, 3089538.298, 550.366,     403464.322, 3089537.755, 552.366,  1.000, 1.000));
              SS.AddElement(new TVisee("502.68", 403465.285, 3089538.026, 551.366, 403466.186, 3089535.252, 550.666,   403467.137, 3089535.561, 549.666,     403465.235, 3089534.943, 551.666,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 19: 503 - Le Hache Max 2
        var SS = new TSerie("503 - Le Hache Max 2");
              SS.AddElement(new TVisee("503.1", 403544.480, 3089559.791, 580.547, 403543.849, 3089559.052, 580.780,   403544.229, 3089558.727, 579.780,     403543.468, 3089559.376, 581.780,  1.000, 1.000));
              SS.AddElement(new TVisee("503.2", 403543.849, 3089559.052, 580.780, 403541.954, 3089556.833, 581.480,   403542.390, 3089556.589, 580.480,     403541.518, 3089557.078, 582.480,  1.000, 1.000));
              SS.AddElement(new TVisee("503.3", 403541.954, 3089556.833, 581.480, 403541.209, 3089554.540, 582.140,   403541.661, 3089554.327, 581.140,     403540.304, 3089554.966, 582.150,  0.010, 1.000));
              SS.AddElement(new TVisee("503.4", 403541.209, 3089554.540, 582.140, 403539.357, 3089551.621, 583.144,   403539.717, 3089551.448, 582.944,     403539.266, 3089551.665, 584.144,  1.000, 0.200));
              SS.AddElement(new TVisee("503.5", 403539.357, 3089551.621, 583.144, 403538.332, 3089548.629, 583.748,   403538.521, 3089548.564, 583.248,     403538.143, 3089548.694, 583.848,  0.100, 0.500));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 20: 302 - S�rie avec mesures en pourcentages
        var SS = new TSerie("302 - S�rie avec mesures en pourcentages");
              SS.AddElement(new TVisee("302.1", 403520.950, 3089525.633, 533.066, 403530.948, 3089515.635, 533.066,   403531.655, 3089516.342, 532.066,     403530.241, 3089514.928, 534.066,  1.000, 1.000));
              SS.AddElement(new TVisee("302.2", 403530.948, 3089515.635, 533.066, 403538.019, 3089508.564, 533.066,   403538.628, 3089509.357, 532.066,     403537.410, 3089507.770, 534.066,  1.000, 1.000));
              SS.AddElement(new TVisee("302.3", 403538.019, 3089508.564, 533.066, 403546.679, 3089503.564, 533.066,   403547.102, 3089504.470, 532.066,     403545.834, 3089501.751, 534.066,  1.000, 1.000));
              SS.AddElement(new TVisee("302.4", 403546.679, 3089503.564, 533.066, 403556.076, 3089500.143, 533.066,   403556.418, 3089501.083, 532.066,     403555.734, 3089499.204, 534.066,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      // Série 21: 20 - Autoloop en 1.10
        var SS = new TSerie("20 - Autoloop en 1.10");
              SS.AddElement(new TVisee("20.1", 403540.625, 3089599.713, 539.484, 403540.800, 3089589.664, 539.484,   403541.717, 3089590.063, 538.484,     403539.883, 3089589.266, 540.484,  1.000, 1.000));
              SS.AddElement(new TVisee("20.2", 403540.800, 3089589.664, 539.484, 403545.886, 3089584.753, 539.484,   403546.268, 3089585.677, 538.484,     403545.503, 3089583.829, 540.484,  1.000, 1.000));
              SS.AddElement(new TVisee("20.3", 403545.886, 3089584.753, 539.484, 403555.874, 3089584.579, 539.484,   403555.492, 3089585.503, 538.484,     403556.257, 3089583.655, 540.484,  1.000, 1.000));
              SS.AddElement(new TVisee("20.4", 403555.874, 3089584.579, 539.484, 403560.792, 3089589.672, 539.484,   403559.869, 3089590.054, 538.484,     403561.716, 3089589.289, 540.484,  1.000, 1.000));
              SS.AddElement(new TVisee("20.5", 403560.792, 3089589.672, 539.484, 403560.967, 3089599.660, 539.484,   403560.036, 3089599.294, 538.484,     403561.897, 3089600.027, 540.484,  1.000, 1.000));
              SS.AddElement(new TVisee("20.6", 403560.967, 3089599.660, 539.484, 403556.069, 3089604.731, 539.484,   403555.687, 3089603.808, 538.484,     403556.452, 3089605.655, 540.484,  1.000, 1.000));
              SS.AddElement(new TVisee("20.7", 403556.069, 3089604.731, 539.484, 403546.061, 3089604.557, 539.484,   403546.444, 3089603.633, 538.484,     403545.678, 3089605.481, 540.484,  1.000, 1.000));
              SS.AddElement(new TVisee("20.8", 403546.061, 3089604.557, 539.484, 403540.982, 3089599.652, 539.484,   403541.677, 3089598.933, 538.484,     403540.288, 3089600.372, 540.484,  1.000, 1.000));
        this.Centerlines.AddElement(SS); /* et on ajoute */
      //***************************************************
      
      /* Retourne la longueur de la diagonale du cube */
      this.CalcDiagonaleBoundingBox = function () {
         return Math.hypot(this.CoinHautDroit.x - this.CoinBasGauche.x,
                           this.CoinHautDroit.y - this.CoinBasGauche.y,
                           this.CoinHautDroit.z - this.CoinBasGauche.z);
      } // End method: CalcDiagonaleBoundingBox
     
      this.DimensionsBox = new BABYLON.Vector3(this.CoinHautDroit.x - this.CoinBasGauche.x, this.CoinHautDroit.y - this.CoinBasGauche.y, this.CoinHautDroit.z - this.CoinBasGauche.z); // Dimensions de la boite englobante
      this.Offset = new BABYLON.Vector3(0.50 * this.DimensionsBox.x, 0.50 * this.DimensionsBox.y, 0.50 * this.DimensionsBox.z); // Offset pour centrage
     // Normalisation sur [-1; 1]
     var QFact = 2.000 / this.CalcDiagonaleBoundingBox();; /*  */
    this.DimensionsBox.x *= QFact;
    this.DimensionsBox.y *= QFact;
    this.DimensionsBox.z *= QFact;
      
      /* Fonction retournant un BABYLON.Vector3 */
      this.CalcCoordsFromXYZ = function (QX1, QY1, QZ1) {
        var EWE =  new BABYLON.Vector3(QFact * (QX1 - this.CoinBasGauche.x - this.Offset.x),
                         QFact * (QY1 - this.CoinBasGauche.y - this.Offset.y),
                       this.DimensionsBox.z - QFact * (QZ1 - this.CoinBasGauche.z + this.Offset.z));
        return EWE;
      } // End method: CalcCoordsFromXYZ
     
      
      /* Lignes verticales du cube */
      this.DrawVerticalLinesBoundingBox = function (QScene, QX1, QY1, QColor) {
          var QArrayPoints = [ /*  */
                    this.CalcCoordsFromXYZ(QX1, QY1, this.CoinBasGauche.z),
                    this.CalcCoordsFromXYZ(QX1, QY1, this.CoinHautDroit.z)
                   ]; //QArrayPoints */
                    var QPath = new BABYLON.MeshBuilder.CreateLines("BoundingBox", {points: QArrayPoints}, QScene);
                    QPath.color = QColor;
                    return QPath;
      } // End method: DrawVerticalLinesBoundingBox
     
      
      /* Trace la bounding box */
      this.DrawCube = function (QScene, QR, QG, QB, QA) {
          var QArrayPoints = [ /*  */
                    this.CalcCoordsFromXYZ(this.CoinBasGauche.x, this.CoinBasGauche.y, this.CoinBasGauche.z),
                    this.CalcCoordsFromXYZ(this.CoinHautDroit.x, this.CoinBasGauche.y, this.CoinBasGauche.z),
                    this.CalcCoordsFromXYZ(this.CoinHautDroit.x, this.CoinHautDroit.y, this.CoinBasGauche.z),
                    this.CalcCoordsFromXYZ(this.CoinBasGauche.x, this.CoinHautDroit.y, this.CoinBasGauche.z),
                    this.CalcCoordsFromXYZ(this.CoinBasGauche.x, this.CoinBasGauche.y, this.CoinBasGauche.z),
                    this.CalcCoordsFromXYZ(this.CoinBasGauche.x, this.CoinBasGauche.y, this.CoinHautDroit.z),
                    this.CalcCoordsFromXYZ(this.CoinHautDroit.x, this.CoinBasGauche.y, this.CoinHautDroit.z),
                    this.CalcCoordsFromXYZ(this.CoinHautDroit.x, this.CoinHautDroit.y, this.CoinHautDroit.z),
                    this.CalcCoordsFromXYZ(this.CoinBasGauche.x, this.CoinHautDroit.y, this.CoinHautDroit.z),
                    this.CalcCoordsFromXYZ(this.CoinBasGauche.x, this.CoinBasGauche.y, this.CoinHautDroit.z),
                    this.CalcCoordsFromXYZ(this.CoinBasGauche.x, this.CoinBasGauche.y, this.CoinHautDroit.z)
                   ]; //QArrayPoints */
                    var QPath = new BABYLON.MeshBuilder.CreateLines("Cube", {points: QArrayPoints}, QScene);
                    QPath.color = new BABYLON.Color4(QR, QG, QB, QA);
    // Les lignes verticales
                    var L1 = this.DrawVerticalLinesBoundingBox(QScene, this.CoinHautDroit.x, this.CoinBasGauche.y, QPath.color);
                    var L2 = this.DrawVerticalLinesBoundingBox(QScene, this.CoinHautDroit.x, this.CoinHautDroit.y, QPath.color);
                    var L3 = this.DrawVerticalLinesBoundingBox(QScene, this.CoinBasGauche.x, this.CoinHautDroit.y, QPath.color);
      } // End method: DrawCube
     
      
      /* Trace la centerline */
      this.DrawCenterline = function (QScene) {
       var Nb = this.Centerlines.GetNbElements(); /* Parcours des séries */
          for (var i = 1; i < Nb; i++) // -- FOR 
          {
          var SS = this.Centerlines.GetElement(i);
          var QArrVisees = []; /*  */
            for (var v = 0; v < SS.GetNbElements(); v++) // -- FOR 
            {
            var VV = SS.GetElement(v);
              if (v == 0) // Démarrer le path avec l'extrémité arrière de la visée
              {
                QArrVisees.push(this.CalcCoordsFromXYZ(VV.PosP0.x, VV.PosP0.y, VV.PosP0.z));
              } // 
              QArrVisees.push(this.CalcCoordsFromXYZ(VV.PosST.x, VV.PosST.y, VV.PosST.z));
            } // -- NEXT v ... 
                    var QPathSerie = new BABYLON.MeshBuilder.CreateLines("", {points: QArrVisees}, QScene);
                    QPathSerie.color = this.Centerlines.Color
          } // -- NEXT i ... 
      } // End method: DrawCenterline
     
      
      /* Construit et retourne une section droite pour le Ribbon) */
      this.MakeTCrossSection = function (PosStation_x, PosStation_y, PosStation_z, PosPG_x, PosPG_y, PosPG_z, PosPD_x, PosPD_y, PosPD_z, HZ, HN) {
          var QPath = [];
          QPath.push(this.CalcCoordsFromXYZ(PosStation_x, PosStation_y, PosStation_z - HN));
          QPath.push(this.CalcCoordsFromXYZ(PosPD_x, PosPD_y, PosStation_z - 0.50 * HN));
          QPath.push(this.CalcCoordsFromXYZ(PosPD_x, PosPD_y, PosStation_z + 0.50 * HZ));
          QPath.push(this.CalcCoordsFromXYZ(PosStation_x, PosStation_y, PosStation_z + HZ));
          QPath.push(this.CalcCoordsFromXYZ(PosPG_x, PosPG_y, PosStation_z + 0.50 * HZ));
          QPath.push(this.CalcCoordsFromXYZ(PosPG_x, PosPG_y, PosStation_z - 0.50 * HN));
          return QPath;
      } // End method: MakeTCrossSection
     
      
      /* Trace ls volumes */
      this.DrawVolumes = function (QScene) {
       var Nb = this.Centerlines.GetNbElements(); /* Parcours des séries */
          for (var i = 0; i < Nb; i++) // -- FOR 
          {
          var SS = this.Centerlines.GetElement(i);
          var QArrCrossSections = []; /* Tableau des sections transversales */
            for (var v = 1; v < SS.GetNbElements(); v++) // -- FOR 
            {
            var VV = SS.GetElement(v);
              if (v == 0) // Démarrer le path avec l'extrémité arrière de la visée
              {
              } // 
              console.log(VV.PosST.x); // OK jusqu'ici
            /* Erreur incompréhensible ici: MakeTCrossSection retourne un objet vide.
           Si je mets push(this.MakeTCrossSection(new this.MakeTCrossSection ... , je tombe sur d'autres erreurs  
           // *//
              QArrCrossSections.push(this.MakeTCrossSection(VV.PosST.x, VV.PosST.y, VV.PosST.z,  VV.PosPG.x, VV.PosPG.y, VV.PosPG.z,  VV.PosPD.x, VV.PosPD.y, VV.PosPD.z, VV.HZ, VV.HN));
            } // -- NEXT v ... 
           console.log(QArrCrossSections.length); 
           for (var v = 0; i< QArrCrossSections.length;v++) console.log(v + ":" + QArrCrossSections[v]);
           var ribbon = BABYLON.MeshBuilder.CreateRibbon("SS.NomSerie", {pathArray: QArrCrossSections, closePath: true, sideOrientation: BABYLON.Mesh.DOUBLESIDE});
      // ****** End serie 
          } // -- NEXT i ... 
      } // End method: DrawVolumes
     
    } // End class: TSceneContainer
    /* ----------------- */
     
    /* Construction de la scène */
    function createScene() {
      var SceneContainer = new TSceneContainer(403429.920, 3089500.143, 492.017,  403584.916, 3089670.312, 583.748);
    console.log("DEBUG:   createScene: 001");
      var QScene = new BABYLON.Scene(MyEngine); /*  <--- WTF: Erreur ici  */
    console.log("DEBUG: createScene: 002");
      var QCameraDir = new BABYLON.Vector3(0.000, 0.000, 0.000); // Direction de la caméra
      var Light1 = new BABYLON.HemisphericLight("QScene", new BABYLON.Vector3(0.00, 1.00, 0.00), Light1); Light1.intensity = 0.80; /*  */ 
    console.log("DEBUG: createScene: 003");
      var QCamera = new BABYLON.ArcRotateCamera("Camera01", 0.000, 0.000, 0.000, QCameraDir, QScene);
      QCamera.setPosition(new BABYLON.Vector3(0.000, 0.000, -3.000));
      console.log("Diagonale = " +  SceneContainer.CalcDiagonaleBoundingBox());
      QCamera.attachControl(MyCanvas, true); // This attaches the camera to the canvas
      // Les objets ici
      SceneContainer.DrawCube(QScene, 0, 0, 255, 128);
      SceneContainer.DrawCenterline(QScene);
      SceneContainer.DrawVolumes(QScene);
      return QScene;
    } // End function: createScene
    /* --------------------------------- */
    console.log("DEBUG: MAIN: 001");
    var MyScene = createScene();
    console.log("DEBUG: MAIN: 002");
    MyEngine.runRenderLoop(function () {
      if (MyScene) // 
      {
        MyScene.render();
        } // 
    }); /* L'accolade ferme la fonction anonyme, la parenthèse ferme l'appel runRenderLoop */
        </SCRIPT>
      <noscript>JavaScript is required</noscript>
      </BODY>
    </HTML>

  2. #2
    Modérateur

    Avatar de NoSmoking
    Homme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    17 075
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Isère (Rhône Alpes)

    Informations forums :
    Inscription : Janvier 2011
    Messages : 17 075
    Points : 44 656
    Points
    44 656
    Par défaut
    Bonjour,
    manque un peu de rigueur et de clarté dans l'écriture et sinon aucune raison de mettre un new this.méthode !

    En reprenant ta méthode this.DrawVolumes il semble que j’obtienne le résultat souhaité.

    Je te laisse la découvrir :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
      /* Trace les volumes */
      this.DrawVolumes = function(QScene) {
        var nbSeries = this.Centerlines.GetNbElements();
        // déclaration tableau hors de la boucle
        // Tableau des sections transversales
        var QArrCrossSections = [];
     
        //   !!! on pourrait sauter la 1st "série non modifiable"
        for (var numSerie = 0; numSerie < nbSeries; numSerie += 1) {
          var serie = this.Centerlines.GetElement(numSerie);
          var nbListes = serie.GetNbElements();
     
          for (var numListe = 1; numListe < nbListes; numListe += 1) {
            var VV = serie.GetElement(numListe);
            var qPath = this.MakeTCrossSection(VV.PosST.x, VV.PosST.y, VV.PosST.z, VV.PosPG.x, VV.PosPG.y, VV.PosPG.z, VV.PosPD.x, VV.PosPD.y, VV.PosPD.z, VV.HZ, VV.HN);
            QArrCrossSections.push(qPath);
          }
        }
        // on ne le fait qu'une seule fois hors de la boucle !
        var ribbon = BABYLON.MeshBuilder.CreateRibbon("SS.NomSerie", {
          pathArray: QArrCrossSections,
          closePath: true,
          sideOrientation: BABYLON.Mesh.DOUBLESIDE
        });
      }

  3. #3
    Membre confirmé

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2013
    Messages
    358
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Novembre 2013
    Messages : 358
    Points : 563
    Points
    563
    Billets dans le blog
    2
    Par défaut
    Merci pour cette réponse mais j'obtiens un unique 'ribbon', alors qu'il doit y en avoir un par série. Je dois obtenir quelque chose comme suit (le pb des couleurs est traité plus tard)
    Nom : exemple_3D.jpg
Affichages : 51
Taille : 62,6 Ko

  4. #4
    Membre confirmé

    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2013
    Messages
    358
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Novembre 2013
    Messages : 358
    Points : 563
    Points
    563
    Billets dans le blog
    2
    Par défaut
    @NoSmoking: Merci de votre réponse

    Problème résolu. Voici le code

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
     /* Trace les volumes */
      this.DrawVolumes = function(QScene) {
        var nbSeries = this.Centerlines.GetNbElements();
        // Tableau des tubes des séries
        var TableTubes = []; 
        //   !!! on pourrait sauter la 1st "série non modifiable"
        for (var numSerie = 0; numSerie < nbSeries; numSerie += 1) {
          // Tableau des sections transversales
          var QArrCrossSections = [];
          var serie = this.Centerlines.GetElement(numSerie);
          var nbListes = serie.GetNbElements();
     
          for (var numListe = 1; numListe < nbListes; numListe += 1) {
            var VV = serie.GetElement(numListe);
            var qPath = this.MakeTCrossSection(VV.PosST.x, VV.PosST.y, VV.PosST.z, VV.PosPG.x, VV.PosPG.y, VV.PosPG.z, VV.PosPD.x, VV.PosPD.y, VV.PosPD.z, VV.HZ, VV.HN);
            QArrCrossSections.push(qPath);
          }
          TableTubes.push(QArrCrossSections);
        }    
        nbSeries = TableTubes.length;
        console.log("TableTubes: " , nbSeries);
        // Parcours de la table des tubes
        for (var numSerie = 0; numSerie < nbSeries; numSerie += 1) 
        {
          //var serie = this.Centerlines.GetElement(numSerie);
          var EWE = TableTubes[numSerie]; // Récupère la liste des sections d'une série -- OK 
          console.log('Nb de sections: ', EWE.length); // OK
          if (EWE.length > 0) // Protection contre les séries vides
          {
            var ribbon = BABYLON.MeshBuilder.CreateRibbon("00", {
                pathArray: EWE,
                closePath: true,
                sideOrientation: BABYLON.Mesh.DOUBLESIDE
              });  //*/     
          }     
        }  
      } // End method: DrawVolumes
    et le résultat:

    Nom : sakany.jpg
Affichages : 48
Taille : 57,0 Ko

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 0
    Dernier message: 13/07/2011, 13h57
  2. [XL-2003] Erreur Runtime 1004 lors de la création d'une validation en liste pour une cellule
    Par Louhike dans le forum Macros et VBA Excel
    Réponses: 1
    Dernier message: 07/07/2010, 15h27
  3. [JDOM] Erreur de DTD lors de la création d'un objet JDOM
    Par Kerod dans le forum Format d'échange (XML, JSON...)
    Réponses: 3
    Dernier message: 24/05/2007, 13h14
  4. Erreur ora 30574 lors de la création d'1 rollback_segment
    Par leng dans le forum Administration
    Réponses: 15
    Dernier message: 08/12/2006, 17h02
  5. Réponses: 4
    Dernier message: 23/05/2006, 17h04

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo