window.extrajs = ` // SHOW IN 3D if (!this.group) // création du group { this.group = this._ez3D.createGroup(); this._ez3D.add(this.group); } this.group.clear(); // vide le group d'objet, on va le reconstruire if (!this.tech) this.tech = { profondeur: 6.3, epaisseur_cadre: 2.6, epaisseur_montants: 2.6, profondeur_montants: 3.7, ecart_mini: 30, marge: 5.2, // epaisseur cadre *2 design: [[], [[25, 50, 75]], [[75], [25], [50]], [], [[75]], [[80, -1]]], designm: [[[0, 100]], [[0, 25, 50, 75, 100]], [[0, 100]], [[0, 100]], [[0, 75, 100]], [[0, 80, 100]]], z: 0, factory_height: 90 } if (!this.data) this.data = { width: 200, height: 150, start: 100, // hauteur de sol baie: "1sideR", // closed / 1sideL, 1 sideR / full open design: 1, // classic / inclines inclines: 1, niches: 3, max_niches: 10, niches_ecart: 2, nichestype: "mix", // rectangle , carres , mix , mix2 , mix3 color_montants: 1024, // 3 couleurs disponbiles color_verre: 1022, // gris perle color_montants_texte: "Chêne Naturel", // 3 couleurs disponbiles color_verre_texte: "Verre Transparent", // gris perle perso: [] } if (this.data.design == 2) { this.tech.design[1] = [[50]]; // une traverse if (this.data.height > 115) this.tech.design[1] = [[33.33333, 66.66666]]; // 2 traverses if (this.data.height > 160) this.tech.design[1] = [[25, 50, 75]]; // 3 traversess this.tech.designm[1] = [[0, 50, 100]]; // une traverse if (this.data.height > 115) this.tech.designm[1] = [[0, 33.33333, 66.66666, 100]]; // 2 traverses if (this.data.height > 160) this.tech.designm[1] = [[0, 25, 50, 75, 100]]; // 3 traversess } // c'est parti ! // création du cadre principal var h = this.data.height + this.data.start; var center = this.data.start / 2; var floor = -h / 2; var bottom = floor + this.data.start; var top = bottom + this.data.height; var left = -this.data.width / 2; var right = this.data.width / 2; var depth = this.tech.profondeur_montants; var epaiss = this.tech.epaisseur_montants; var ecart = this.tech.ecart; var ecart_mini = this.tech.ecart_mini; var marge = this.tech.marge; var ecart_total = ecart + epaiss; var isMobile = /Mobi|Android/i.test(navigator.userAgent); var reverse = !(this.data.design == 1 || this.data.design == 3 || this.data.design == 4); var largeur_max = 120; if (this.data.height < 220) largeur_max = 160; if (this.data.height < 160) largeur_max = 220; if (this.data.height < 120) largeur_max = 275; this.data.partwidth = this.data.width; var visualmargin = 0.2; var decalagevertical = 0; /* // nombre de parties nécessaires var nb_espaces_mini = Math.floor((this.data.width - marge + this.tech.epaisseur_montants) / (ecart_mini + this.tech.epaisseur_montants)); var nb_part_mini = Math.ceil((this.data.partwidth) / largeur_max); var nb_montants = 10; var nbpart = 10; var dec = 1; if (this.data.design == 6) dec = 2; var dif = nb_part_mini > 1 ? dec % 2 : 0; var best = 10000; // console.log(nb_espaces_mini); for (var i = 10; i >= nb_part_mini; i--) { for (var j = dec; j < 10; j += dec) { if (i * j <= best + dif && i * j >= nb_espaces_mini) // le 1.2 est une tolérance, pour réduire le nombre de parties quand on en a beaucoup { best = i * j; nbpart = i; nb_montants = j; this.data.partwidth = (this.data.width / nbpart); decalagevertical = - this.data.partwidth * (nbpart - 1) / 2; } } } */ /* if (this.data.design == 6) { // calcul spécifique pour les arches, car par paire obligatoirement // calcul if(this.data.width<47) this.data.partwidth = this.data.width = 47; var nb_espaces = nb_montants *nbpart; // nombre minimum de "zones" decalagevertical = - this.data.partwidth * (nbpart - 1) / 2; console.log(nb_espaces); if(nb_espaces%2==1) nb_espaces++; // si impaire var newnbpart = 10; for(var i = nbpart; i<10; i++) { for(var j = dec; j<10; j+=dec) { if(i*j == nb_espaces && newnbpart>i) { nbpart= newnbpart=i; nb_montants = j; this.data.partwidth = (this.data.width / nbpart); decalagevertical = - this.data.partwidth * (nbpart - 1) / 2; } } } } */ // REMISE A UNE SEULE PARTIE var nbpart = 1; var nb_montants = Math.floor((this.data.width - marge + this.tech.epaisseur_montants) / (ecart_mini + this.tech.epaisseur_montants)); if(this.data.design == 6 && this.data.width>110 && nb_montants<=3) nb_montants = 4; if (this.data.design == 6 && nb_montants%2) nb_montants--; // par paire pour les verrieres if(nb_montants==0) nb_montants = 2; // une paire mini ! var espace_dipso = this.data.partwidth - this.tech.epaisseur_cadre * 2; var ecart = (espace_dipso + this.tech.epaisseur_montants) / nb_montants; ecart_total = ecart; nb_montants--; var largeur_montant_vert = ecart_total - this.tech.epaisseur_montants; var dto = []; // reinit DTO // this.data.inclines = 0; var niches = []; /* if (this.data.design == "classic") { // // calcul espace nécessaire pour afficher des X niches var max_niches = 0; var taille_niche = this.data.niches_ecart + nichestypes[this.data.nichestype][0]; if(this.data.perso[0] && this.data.perso[0].size) { taille_niche = this.data.niches_ecart + this.data.perso[max_niches].size; } var start = 0; var need = taille_niche + this.data.niches_ecart + 1; var next = start + need; var reste = nb_montants; var reste_real = []; while (next <= nb_montants ) { max_niches++; start += need; reste = nb_montants - next; // reste = nombres de design non utilsés, l'écart entre les niches est déja retiré reste_real[max_niches] = reste; taille_niche = nichestypes[this.data.nichestype][max_niches % nichestypes[this.data.nichestype].length]; if(this.data.perso[max_niches] && this.data.perso[max_niches].size) { taille_niche = this.data.perso[max_niches].size; } var need = taille_niche + this.data.niches_ecart + 1; next += need; } this.data.max_niches = max_niches; var nb_niches = max_niches < this.data.niches ? max_niches : this.data.niches; this.data.niches = nb_niches; var start = this.data.niches_ecart + 1 ; if (this.data.baie !== '1sideL') { start += reste_real[nb_niches]; // si baie a droite, on décalle a droite } this.data.niches = nb_niches; for (var i = 0; i < nb_niches; i++) { var hauteur = niches_hauteurs[ this.data.nichestype][i % niches_hauteurs[this.data.nichestype].length]; var taille_niche = nichestypes[this.data.nichestype][i % nichestypes[this.data.nichestype].length]; if(this.data.perso[i] && this.data.perso[i].size) taille_niche = this.data.perso[i].size; if(this.data.perso[i] && this.data.perso[i].fromh!==undefined) hauteur = this.data.perso[i].fromh; var limbasse = this.data.start + this.tech.epaisseur_cadre; var limhaute = this.data.start + this.data.height - this.tech.hauteur_niches - this.tech.epaisseur_cadre; if (hauteur < limbasse) hauteur = limbasse ; if (hauteur > limhaute) hauteur = limhaute ; this.data.limbasse = Math.floor(limbasse); this.data.limhaute = Math.ceil(limhaute); niches.push({ from: start, to: start + taille_niche, fromh: hauteur, h: this.tech.hauteur_niches, size: taille_niche }); start += taille_niche + this.data.niches_ecart + 1; } // } var nb_niches = 0; */ this.data.positions = niches; if (this.engine.project.title == "(sans titre)") this.engine.project.title = 'Verrière'; this.engine.project.title = this.engine.project.title.split(' # ')[0] + " # " + this.data.width + " x " + this.data.height; // on retire un écart car il sera ignoré, et une lame car on veux les centres des design var center_lame = -(this.data.partwidth) / 2 + this.tech.epaisseur_cadre + ecart_total - this.tech.epaisseur_montants / 2; // centre de la premiere lame // position du group pour s'aligner au mur this.group.position.set(0, 0, this.tech.z); if (this.data.baie == '1sideR') this.group.position.set(-50, 0, this.tech.z); if (this.data.baie == '1sideL') this.group.position.set(50, 0, this.tech.z); var color_montants = this.engine.dataRepo._uiEasyColours.find((e) => e.Id == this.data.color_montants); // replace e:any dans TS var color = this.engine.dataRepo._uiEasyColours.find((e) => e.Id == this.data.color_verre);// replace e:any dans TS if (!color) color = this.engine.dataRepo._uiEasyColours[1];// replace e:any dans TS if (!color_montants) color_montants = this.engine.dataRepo._uiEasyColours[0]; var decalageverticaldto = - this.data.partwidth; // ondécalle un coup a gauche pour respecter la boucle decalagevertical -= this.data.partwidth; // ondécalle un coup a gauche pour respecter la boucle var nb_montants_total = 0; var nb_traverses = 0; for (var ik = 0; ik < nbpart; ik++) { decalageverticaldto += this.data.partwidth; decalagevertical += this.data.partwidth; var material = this._ez3D.createPanelMat(color_montants); var material_verre = this._ez3D.createPanelMat(color); material.map && material.map.repeat.set(1, 1); var box = this._ez3D.create4Box(this.data.partwidth - visualmargin * (ik == nbpart - 1 ? 0 : 1), this.data.height, this.tech.profondeur, this.tech.epaisseur_cadre, this.tech.epaisseur_cadre, material, true, true); box.position.set(0 + decalagevertical, center, 0); this.group.add(box); // AJOUR FILLER ENTRE LES VERRIERES if (ik > 0) { var lame = this._ez3D.createBox(visualmargin, this.data.height, this.tech.profondeur - visualmargin * 2); var box = this._ez3D.createMesh(lame, material, true, true);// lame complete box.position.set(0 + decalagevertical - this.data.partwidth / 2, center, 0); this.group.add(box); } // FIN FILLER dto.push({ type: "Cadre", typecolor: "cadrey", w: this.data.partwidth, h: this.tech.epaisseur_cadre, x: 0 + decalageverticaldto, y: 0 }); // lame bas dto.push({ type: "Cadre", typecolor: "cadrey", w: this.data.partwidth, h: this.tech.epaisseur_cadre, x: 0 + decalageverticaldto, y: this.data.height - this.tech.epaisseur_cadre }); // lame haut dto.push({ type: "Cadre", typecolor: "cadre", w: this.tech.epaisseur_cadre, h: this.data.height - this.tech.epaisseur_cadre * 2, x: 0 + decalageverticaldto, y: this.tech.epaisseur_cadre }); // lame gauche dto.push({ type: "Cadre", typecolor: "cadre", w: this.tech.epaisseur_cadre, h: this.data.height - this.tech.epaisseur_cadre * 2, x: this.data.partwidth - this.tech.epaisseur_cadre + decalageverticaldto, y: this.tech.epaisseur_cadre }); // lame droite var hlameg = this.data.height - this.tech.epaisseur_cadre * 2; var decallage_montants = this.data.design == 4 ? this.tech.factory_height : 0; var pos = 1; var design_traverses = this.tech.design[this.data.design - 1]; var design_montant = this.tech.designm[this.data.design - 1][0]; for (var i = 0; i < nb_montants; i++) { for (var ik2 = 0; ik2 < design_montant.length - 1; ik2++) { var from = design_montant[ik2] * (this.data.height - this.tech.epaisseur_cadre * 2 + this.tech.epaisseur_montants) / 100 + decallage_montants; var to = design_montant[ik2 + 1] * (this.data.height - this.tech.epaisseur_cadre * 2 + this.tech.epaisseur_montants) / 100; var dim = to - from - this.tech.epaisseur_montants; var lame = this._ez3D.createBox(epaiss, dim, depth); var material = this._ez3D.createPanelMat(color_montants, true); //material.map && material.map.offset.set(i * 0.2, i * 0.2); // material.map && material.map.repeat.set(depth / 100, this.data.height / 100); if (material.map) material.map.offset.set(0.4 * i, 0.2 * i); if (material.map) material.map.rotation = Math.PI / 2; if (material.map) material.map.repeat.set(dim / 100, epaiss / 100); var pos_lame = center_lame + ecart_total * i; var box = this._ez3D.createMesh(lame, material, true, true);// lame complete box.position.set(pos_lame + decalagevertical, bottom + this.tech.epaisseur_cadre + dim / 2 + from, 0); var posi = [pos_lame + decalageverticaldto - epaiss / 2 + this.data.partwidth / 2, box.position.y - dim / 2 + this.data.height / 2 - center]; dto.push({ type: "Lame", typecolor: "lame", w: epaiss, h: dim, x: posi[0], y: posi[1] }); // lame bas this.group.add(box); /* */ } } var color_bas_factory = color_montants; if (decallage_montants > 0) { // ajout cadre bas var material = this._ez3D.createPanelMat(color_montants, true); var lame = this._ez3D.createBox(this.data.partwidth - this.tech.epaisseur_cadre * 2, this.tech.epaisseur_montants, depth); material.map && material.map.repeat.set(this.data.partwidth / 100, this.tech.epaisseur_montants / 100); var box = this._ez3D.createMesh(lame, material, true, true);// lame complete box.position.set(0 + decalagevertical, bottom + decallage_montants + this.tech.epaisseur_montants / 2, 0); var posi = [decalageverticaldto + this.tech.epaisseur_cadre, decallage_montants]; dto.push({ type: "Traverse Atelier", typecolor: "traverse_atelier", w: this.data.partwidth - this.tech.epaisseur_cadre * 2, h: this.tech.epaisseur_cadre, x: posi[0], y: posi[1] }); // lame bas*/ this.group.add(box); // ajout cadre bas var material = this._ez3D.createPanelMat(color_bas_factory, true); //material.map && material.map.offset.set(i * 0.2, i * 0.2); material.map && material.map.repeat.set(decallage_montants / 100, this.data.partwidth / 100); var lame = this._ez3D.createBox(decallage_montants, this.data.partwidth, 1); var box = this._ez3D.createMesh(lame, material, true, true);// lame complete box.rotation.set(0, 0, Math.PI / 2) box.position.set(0 + decalagevertical, bottom + decallage_montants / 2, 0); var posi = [decalageverticaldto + this.tech.epaisseur_cadre, this.tech.epaisseur_cadre]; dto.push({ type: "Filler Atelier", typecolor: "filler_atelier", w: this.data.partwidth - this.tech.epaisseur_cadre * 2, h: decallage_montants - this.tech.epaisseur_cadre, x: posi[0], y: posi[1] }); // lame bas*/ this.group.add(box); nb_traverses++; } var material = this._ez3D.createPanelMat(color_montants, true); var real_long_traverse = !reverse ? largeur_montant_vert : this.data.partwidth - this.tech.epaisseur_cadre * 2; var long_traverse = largeur_montant_vert; if (material.map) material.map.offset.set(real_long_traverse / 100 * i, 0); if (material.map) material.map.repeat.set(real_long_traverse / 100, this.tech.epaisseur_montants / 100); var traverse = this._ez3D.createBox(real_long_traverse, this.tech.epaisseur_montants, this.tech.profondeur_montants); var center_traverse = -(this.data.partwidth) / 2 + this.tech.epaisseur_cadre + largeur_montant_vert / 2; // centre de la premiere lame var prev = 0; for (var i = 0; i < nb_montants + 1; i++) { // affichage des traverses var traverses = design_traverses[nb_montants_total % design_traverses.length]; if (traverses) for (var j = 0; j < traverses.length; j++) { if (traverses[j] == -1) { // ARCHE var pos_traverse = (this.data.height - this.tech.epaisseur_cadre * 2) * prev / 100; //var bottom_taverse = bottom + this.tech.epaisseur_cadre + pos_traverse; var svg = []; var svg2 = []; var extray = 0; var precision = 100; var dim = largeur_montant_vert - 0.01; var dim2 = largeur_montant_vert + 2.5; var dimy = largeur_montant_vert - 0.01 + extray; var dimy2 = largeur_montant_vert + 2.5 + extray; bottom_taverse -= dim + this.tech.epaisseur_montants / 2 + extray; for (var ics = 0; ics <= precision; ics++) { var x = Math.sin(ics / precision * Math.PI / 2) * dim; var y = Math.cos(ics / precision * Math.PI / 2) * dimy; if (i % 2 == 0) { // on inverse l'arche une fois sur deux x = dim - x; } svg.push(Math.round(x * 1000) / 1000 + ',' + Math.round(y * 1000) / 1000); // interieur de l'arche var x = Math.sin(ics / precision * Math.PI / 2) * dim2; var y = Math.cos(ics / precision * Math.PI / 2) * dimy2; if (x > largeur_montant_vert) x = largeur_montant_vert; if (x < 0) x = 0; if (y > largeur_montant_vert + extray) y = largeur_montant_vert + extray; if (y < 0) y = 0; if (i % 2 == 0) { // on inverse l'arche une fois sur deux x = dim - x; } svg2.unshift(Math.round(x * 1000) / 1000 + ',' + Math.round(y * 1000) / 1000); // exterieur de l'arche } var d = "m " + svg.join(' L ') + " L " + svg2.join(' L ') + " z"; // console.log(d); // var d = "m 0,-30 L 0,-29 L 29,0 L 30,0 z"; var shape = this._ez3D.svgPathToShape(d); var g = this._ez3D.createExtrusion(shape); var angle = this._ez3D.createMesh(g, material, false, false);// lame complete angle.scale.set(1, 1, -1.28); angle.position.set(center_traverse + decalagevertical + (-0.5) * largeur_montant_vert, bottom_taverse, -0.32); this.group.add(angle); var angle2 = this._ez3D.createMesh(g, material, false, false);// lame complete angle2.scale.set(1, 1, 1.28); angle2.position.set(center_traverse + decalagevertical + (-0.5) * largeur_montant_vert, bottom_taverse, 0.32); this.group.add(angle2); var posi = [decalageverticaldto + this.tech.epaisseur_cadre + ecart_total * i, bottom_taverse + this.data.height / 2 - center]; dto.push({ typecolor: "arche", type: "Plat cintré collé", w: largeur_montant_vert, h: largeur_montant_vert, x: posi[0], y: posi[1], svg: d }); // lame bas continue; } prev = traverses[j]; //position taverse var pos_traverse = (this.data.height - this.tech.epaisseur_cadre * 2 + this.tech.epaisseur_montants) * traverses[j] / 100; var bottom_taverse = bottom + this.tech.epaisseur_cadre + pos_traverse - this.tech.epaisseur_montants / 2; if (!reverse || i == 0) // si on est en inversé , on fusionne les traverses { var box = this._ez3D.createMesh(traverse, material, true, true);// lame complete box.position.set(center_traverse + decalagevertical + real_long_traverse / 2 - long_traverse / 2, bottom_taverse, 0); var posi = [decalageverticaldto + this.tech.epaisseur_cadre + ecart_total * i, box.position.y - this.tech.epaisseur_montants / 2 + this.data.height / 2 - center]; dto.push({ type: "Traverse", typecolor: "traverse", w: real_long_traverse, h: this.tech.epaisseur_montants, x: posi[0], y: posi[1] }); // lame bas this.group.add(box); } nb_traverses++; } nb_montants_total++; center_traverse += ecart_total; } // affichage du verre } // fin bloucles verrieres en plusieurs parties var material = this._ez3D.createPanelMat(color_montants, true); var verre = this._ez3D.createBox(this.data.width - this.tech.epaisseur_cadre * 2, this.data.height - this.tech.epaisseur_cadre * 2 - decallage_montants, 0.68); var box = this._ez3D.createMesh(verre, material_verre, true, true);// lame complete box.position.set(0, center + decallage_montants / 2, 0); this.group.add(box); if (!this.group.sihouette) { var d = "m 28,55 -2.3,1.58 -1.6,2.93 -6.12,43.8 -1.2,2 0.13,1.73 V 108.24 l 5.99,40.07 1.33,-0.4 0.67,2.8 0.93,0.93 1.86,-0.53 1.6,5.33 2.66,3.33 -1.2,15.04 v 28.89 l 0.53,11.32 3.06,24.36 6.39,29.69 -2,3.2 0.67,7.19 1.73,-0.67 -0.4,1.2 -6.66,5.72 -7.06,3.33 -0.27,1.86 -0.53,0.93 5.86,1.07 11.32,-0.13 6.26,-3.06 4.66,0.67 6.12,-2.13 -0.4,-3.2 -0.8,-0.27 0.93,-1.07 -0.4,-3.59 -2.93,-3.59 1.07,-1.86 -0.27,-5.86 -2.13,-4.26 -1.46,-38.61 -2.93,-9.19 3.59,-14.25 -0.13,-5.72 6.92,-24.63 1.86,8.65 1.73,17.31 0.13,59.78 -3.86,15.84 -0.4,2.26 0.8,3.2 2.13,-0.8 -0.53,3.99 0.53,3.06 -0.27,2.8 -0.13,1.6 0.67,0.67 -0.93,1.6 2,0.93 12.78,0.13 4.26,-1.07 -0.27,-1.73 -1.33,-0.67 0.93,-0.27 -2.66,-4.26 -2.13,-4.53 0.13,-1.6 2.66,-3.99 1.2,-3.73 1.86,-3.46 0.13,-3.33 1.07,-2.53 1.33,-19.84 0.4,-22.63 4.39,-45.13 1.86,-16.11 1.6,-4.39 v -3.06 h 1.33 0.67 l 0.53,-3.99 3.59,-0.67 0.93,-39.14 1.6,-2.53 -1.33,-2.8 L 98.79,82.15 97.34,64.64 95.34,55.62 93.97,54.32 91.4,53.54 74.92,49.17 71.66,47.23 l -1.9,-2.23 0.04,-2.53 1.79,-3.98 1.4,-0.68 0.53,-1.26 2.86,-4.76 0.04,-1.17 2.38,-4.66 -0.44,-5.05 -2.29,-4.66 -3.26,-4.08 -5.4,-3.01 -5.3,-1.36 -4.62,-0.1 -3.55,1.07 -3.45,3.98 -1.71,3.11 -1.03,3.69 -0.05,7.97 -0.93,1.26 0.14,1.26 1.4,1.85 0.53,3.3 1.7,1.36 0.72,4.86 -0.64,4.08 -3.07,3.69 z"; var shape = this._ez3D.svgPathToShape(d); var g = this._ez3D.createExtrusion(shape); g.translate(-55, -294, 0); var gris = this._ez3D.createPanelMat({ Color: 'CCCCCC', basic: true, TextureId: 0, tex: false, texture: false, Reflectivity: 0.5 }); this.group.sihouette = this._ez3D.createMesh(g, gris, false, false);// lame complete this.group.sihouette.scale.y = -0.58; this.group.sihouette.scale.x = 0.58; this.group.sihouette.position.set(0, floor, -150); this.group.add(box); } this.group.sihouette.position.set(0, floor, -150); if (this.data.baie == '1sideR') this.group.sihouette.position.set(this.data.width / 2 - 5, floor, -50); //decalage du centre de 50 cm pour améliorer le visuel if (this.data.baie == '1sideL') this.group.sihouette.position.set(-this.data.width / 2 + 5, floor, -50); //decalage du centre de 50 cm pour améliorer le visuel this.group.add(this.group.sihouette); if (updatescene) { window.currentStore.s3d.update("ground", this.data.height + this.data.start, this.tech.profondeur, this.data.width, reposcamera, this.data); } // creation liste technique for (var idto = 0; idto < dto.length; idto++) { if (!dto[idto].ref) dto[idto].ref = this.data.color_montants_texte; dto[idto].x = Math.round(dto[idto].x * 10); // passage en mm dto[idto].y = Math.round(dto[idto].y * 10); dto[idto].w = Math.round(dto[idto].w * 10); dto[idto].h = Math.round(dto[idto].h * 10); } this.data.dto = dto; //console.log(dto); //console.log(this.data); // calcul du prix //console.log('DETAILS DU PRIX : '); if (this.data.color_verre == 1023) { prixTTC = 225; // console.log('Base dépoli : ', 225); prixTTC += 400 * this.data.height / 100 * this.data.width / 100; // console.log('Dimesnions dépoli : ', "400 * this.data.height / 100 * this.data.width / 100", 400 * this.data.height / 100 * this.data.width / 100); } else { var prixTTC = 216; //console.log('Base normal : ',216); prixTTC += 384 * this.data.height / 100 * this.data.width / 100; //console.log('Dimesnions normal : ', "384 * this.data.height / 100 * this.data.width / 100",384 * this.data.height / 100 * this.data.width / 100); } prixTTC += nb_traverses * 48; //console.log('Ajout traverses : ','nb_traverses ('+nb_traverses+') + * 48',nb_traverses * 48); if (this.data.design == 6) { prixTTC += nb_traverses * 105; // console.log('Ajout Arches : ','nb_traverses ('+nb_traverses+') + * 105',nb_traverses * 105); } /* if (this.data.design == 'classic') { prixTTC += 540 * this.data.height/100 * this.data.partwidth/100; for (var i =0; i< niches.length ; i++) { if (niches[i].size == 1) prixTTC += 156; if (niches[i].size == 2) prixTTC += 168; } } else { prixTTC += 600 * this.data.height/100 * this.data.partwidth/100; for (var i =0; i< niches.length ; i++) { if (niches[i].size == 1) prixTTC += 156; if (niches[i].size == 2) prixTTC += 168; } }*/ this._totalPriceExVAT = prixTTC / 1.2; this.source.updateFacadePrice(Math.round(this._totalPriceExVAT * 100) / 100, 0); `;