Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYProjet.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
16 #include "Tympan/core/logging.h"
22 
23 #include "TYProjet.h"
24 
25 #if TY_USE_IHM
28 #endif
29 
32 
33 #define TR(id) OLocalizator::getString("OMessageManager", (id))
34 
35 bool TYProjet::gSaveValues = true;
36 
38  : _auteur(""), _dateCreation("2001-10-01"), _dateModif("2001-10-01"), _comment(""),
39  _pSite(new TYSiteNode()), _pCurrentCalcul(new TYCalcul()), _delaunayTolerance(0.0001),
40  _maxDistBetweenPoints(200.0), _useDefaultGeomVal(true), _bStatusSolver(true)
41 {
43 
44  _pSite->setParent(this);
45  _pSite->setRoot(true);
47  _pSite->setProjet(this); // Definit le projet courant
48 
50  _listCalcul.push_back(_pCurrentCalcul);
51 
52  // Ajout du site au calcul courant
54 
55  // first step, force spectre form to Octave Form
57 
58  // first step, force spectre pond to dB(Z) Pond
59  _spectrePond = "dB(Z)";
60 
62 }
63 
65 {
66  *this = other;
67 }
68 
70 {
71  remAllCalcul();
72 }
73 
75 {
76  if (this != &other)
77  {
78  TYElement::operator=(other);
79  _auteur = other._auteur;
81  _dateModif = other._dateModif;
82  _comment = other._comment;
83  _pSite = other._pSite;
86  _listCalcul = other._listCalcul;
90  _spectreForm = other._spectreForm;
91  _spectrePond = other._spectrePond;
92  }
93 
95 
96  return *this;
97 }
98 
99 bool TYProjet::operator==(const TYProjet& other) const
100 {
101  if (this != &other)
102  {
103  if (TYElement::operator!=(other))
104  {
105  return false;
106  }
107  if (_auteur != other._auteur)
108  {
109  return false;
110  }
111  if (_dateCreation != other._dateCreation)
112  {
113  return false;
114  }
115  if (_dateModif != other._dateModif)
116  {
117  return false;
118  }
119  if (_comment != other._comment)
120  {
121  return false;
122  }
123  if (_pSite != other._pSite)
124  {
125  return false;
126  }
127  if (_pointsControl != other._pointsControl)
128  {
129  return false;
130  }
131  if (_pCurrentCalcul != other._pCurrentCalcul)
132  {
133  return false;
134  }
135  if (!(_listCalcul == other._listCalcul))
136  {
137  return false;
138  }
140  {
141  return false;
142  }
144  {
145  return false;
146  }
148  {
149  return false;
150  }
151  if (_spectreForm != other._spectreForm)
152  {
153  return false;
154  }
155  if (_spectrePond != other._spectrePond)
156  {
157  return false;
158  }
159  }
160  return true;
161 }
162 
163 bool TYProjet::operator!=(const TYProjet& other) const
164 {
165  return !operator==(other);
166 }
167 
168 std::string TYProjet::toString() const
169 {
170  return "TYProjet";
171 }
172 
174 {
175  DOM_Element domNewElem = TYElement::toXML(domElement);
176 
177  TYXMLTools::addElementStringValue(domNewElem, "auteur", _auteur);
178  TYXMLTools::addElementStringValue(domNewElem, "dateCreation", _dateCreation);
179  TYXMLTools::addElementStringValue(domNewElem, "dateModif", _dateModif);
180  TYXMLTools::addElementStringValue(domNewElem, "comment", _comment);
181  TYXMLTools::addElementDoubleValue(domNewElem, "delaunayTolerence", _delaunayTolerance);
182  TYXMLTools::addElementDoubleValue(domNewElem, "distMaxBetweenPoints", _maxDistBetweenPoints);
183  TYXMLTools::addElementBoolValue(domNewElem, "useDefGeomVal", _useDefaultGeomVal);
184  // Sauvegarde de la forme et de la pondération d'affichage du spectre
185  TYXMLTools::addElementIntValue(domNewElem, "spectreForm", static_cast<int>(_spectreForm));
186  TYXMLTools::addElementStringValue(domNewElem, "spectrePond", _spectrePond);
187  TYXMLTools::addElementBoolValue(domNewElem, "levelCurvesCanBeUnselected", true);
188 
189  if (_pCurrentCalcul)
190  {
191  TYXMLTools::addElementStringValue(domNewElem, "currentCalculID", _pCurrentCalcul->getID().toString());
192  }
193 
194  // Ajout du site node sur lequel s'effectue le calcul
195  DOM_Document domDoc = domElement.ownerDocument();
196 
197  // Site
198  _pSite->toXML(domNewElem);
199 
200  // Points de controle
201  DOM_Element pointsControlNode = domDoc.createElement("PointsControl");
202  domNewElem.appendChild(pointsControlNode);
203  for (unsigned int i = 0; i < _pointsControl.size(); i++)
204  {
205  _pointsControl[i]->toXML(pointsControlNode);
206  }
207 
208  // Noise Maps
209  DOM_Element noiseMapsNode = domDoc.createElement("NoiseMaps");
210  domNewElem.appendChild(noiseMapsNode);
211  for (unsigned int i = 0; i < _maillages.size(); i++)
212  {
213  _maillages[i]->toXML(noiseMapsNode);
214  }
215 
216  // Calculs
217  for (unsigned int i = 0; i < _listCalcul.size(); i++)
218  {
219  _listCalcul.at(i)->toXML(domNewElem);
220  }
221 
222  return domNewElem;
223 }
224 
226 {
227  TYElement::fromXML(domElement);
228 
229  _pCurrentCalcul = nullptr;
230 
231  remAllCalcul();
232 
233  bool auteurOk = false;
234  bool dateCreationOk = false;
235  bool dateModifOk = false;
236  bool commentOk = false;
237  bool currentCalculIDOk = false;
238  bool delaunayOk = false;
239  bool dMaxOk = false;
240  bool useDefaultOk = false;
241  bool keepAltiUpTodate = false;
242  bool spectreFormOk = false;
243  int spectreFormInt = static_cast<int>(_spectreForm); // default current
244  bool spectrePondOk = false;
245  bool levelCurvesCanBeUnselectedOk = false;
246  bool bLevelCurvesCanBeUnselectedTmp = false;
247 
248  QString currentCalculID;
249  LPTYCalcul pCalcul = new TYCalcul();
250  int readOk = 0; // Indicateur de bonne relecture du calcul
251  int i = 0;
252 
253  DOM_Element elemCur;
254 
255  QDomNodeList childs = domElement.childNodes();
256  int childcount = childs.length();
257  for (i = 0; i < childcount; i++)
258  {
259  elemCur = childs.item(i).toElement();
260  OMessageManager::get()->info("Charge element du projet %d/%d.", i + 1, childcount);
261 
262  TYXMLTools::getElementStringValue(elemCur, "auteur", _auteur, auteurOk);
263  TYXMLTools::getElementStringValue(elemCur, "dateCreation", _dateCreation, dateCreationOk);
264  TYXMLTools::getElementStringValue(elemCur, "dateModif", _dateModif, dateModifOk);
265  TYXMLTools::getElementStringValue(elemCur, "comment", _comment, commentOk);
266  TYXMLTools::getElementStringValue(elemCur, "currentCalculID", currentCalculID, currentCalculIDOk);
267 
268  TYXMLTools::getElementDoubleValue(elemCur, "delaunayTolerence", _delaunayTolerance, delaunayOk);
269  TYXMLTools::getElementDoubleValue(elemCur, "distMaxBetweenPoints", _maxDistBetweenPoints, dMaxOk);
270  TYXMLTools::getElementBoolValue(elemCur, "useDefGeomVal", _useDefaultGeomVal, useDefaultOk);
271  TYXMLTools::getElementIntValue(elemCur, "spectreForm", spectreFormInt, spectreFormOk);
272  TYXMLTools::getElementStringValue(elemCur, "spectrePond", _spectrePond, spectrePondOk);
273  TYXMLTools::getElementBoolValue(elemCur, "levelCurvesCanBeUnselected", bLevelCurvesCanBeUnselectedTmp,
274  levelCurvesCanBeUnselectedOk);
275 
276  if (_pSite->callFromXMLIfEqual(elemCur))
277  {
279  }
280  // On sauvegarde l'information de mise à jour de l'altimétrie
281  keepAltiUpTodate = _pSite->getAltimetry()->isUpToDate();
282 
283  // Points de controle
284  LPTYPointControl pPointControl = new TYPointControl();
285  if (elemCur.nodeName() == "PointsControl")
286  {
287  DOM_Element elemCur2;
288  QDomNodeList childs2 = elemCur.childNodes();
289 
290  for (unsigned int j = 0; j < childs2.length(); j++)
291  {
292  elemCur2 = childs2.item(j).toElement();
293  if (pPointControl->callFromXMLIfEqual(elemCur2))
294  {
295  addPointControl(pPointControl);
296  pPointControl = new TYPointControl();
297  }
298  }
299  }
300 
301  // Noise maps
302  LPTYGeometryNode pGeoNode = new TYGeometryNode();
303  if (elemCur.nodeName() == "NoiseMaps")
304  {
305  DOM_Element elemCur2;
306  QDomNodeList childs2 = elemCur.childNodes();
307 
308  for (unsigned int j = 0; j < childs2.length(); j++)
309  {
310  elemCur2 = childs2.item(j).toElement();
311  if (pGeoNode->callFromXMLIfEqual(elemCur2))
312  {
313  addMaillage(pGeoNode);
314  pGeoNode = new TYGeometryNode();
315  }
316  }
317  }
318 
319  // Calculs
320  pCalcul->setParent(this);
321  if (pCalcul->callFromXMLIfEqual(elemCur, &readOk))
322  {
323  // Insure compatibility when loading Code_TYMPAN T310 projects
324  // Enforce pCalcul->_mapPointCtrlSpectre consistency
325  if (pCalcul->getMapPointCtrlSpectre().empty() && !pCalcul->hasResuCtrlPoints())
326  {
327  OMessageManager::get()->info("T310 project migration : enforce receptors configuration "
328  "consistency in calculation settings");
329  for (unsigned int i = 0; i < _pointsControl.size(); i++)
330  {
331  pCalcul->addPtCtrlToResult(_pointsControl[i]);
332  }
333  }
334  addCalcul(pCalcul);
335  pCalcul = new TYCalcul();
336  }
337  }
338 
339  // Mise a jour des parametre pour la triangulation du site
341 
342  // Update TYCalcul control point spectrum if needed
343  // --> compatibility with previous TYPointControl management paradigm (see CS 0a6aab520874@EDF_RD)
344  for (unsigned int i = 0; i < _pointsControl.size(); i++)
345  {
346  if (_pointsControl[i].getRealPointer()->getAllUses() != nullptr)
347  {
348  std::map<TYUUID, LPTYSpectre>* compatibilityVector =
349  static_cast<std::map<TYUUID, LPTYSpectre>*>(_pointsControl[i].getRealPointer()->getAllUses());
350  std::map<TYUUID, LPTYSpectre>::iterator it;
351  for (it = compatibilityVector->begin(); it != compatibilityVector->end(); it++)
352  {
353  TYCalcul* pCalc = dynamic_cast<TYCalcul*>(getInstance((*it).first));
354  if (pCalc == nullptr)
355  {
356  continue;
357  }
358 
359  TYSpectre* pSpectre = (*it).second;
361  pCalc->setSpectre(_pointsControl[i].getRealPointer(), pSpectre);
362  }
363 
364  // Cleaning map after use
365  compatibilityVector->clear();
366  _pointsControl[i].getRealPointer()->cleanAllUses();
367  compatibilityVector = nullptr;
368  }
369  }
370 
371  // update TYCalcul noise map spectrums if needed
372  // --> compatibility with previous TYMaillage management paradigm
373  for (unsigned int i = 0; i < _maillages.size(); i++)
374  {
375  TYMaillage* pMaillage = dynamic_cast<TYMaillage*>(_maillages[i]->getElement());
376  if (pMaillage->getAllUses() != nullptr)
377  {
378  TYTabLPSpectre* compatibilityVector = static_cast<TYTabLPSpectre*>(pMaillage->getAllUses());
379 
380  // Balayage de tous les calculs
381  for (unsigned j = 0; j < _listCalcul.size(); j++)
382  {
383  if (pMaillage->etat(_listCalcul[j]) == true)
384  {
385  _listCalcul[j]->setNoiseMapSpectrums(pMaillage, *compatibilityVector);
386  }
387  }
388 
389  // Cleaning map after use
390  compatibilityVector->clear();
391  pMaillage->cleanAllUses();
392  compatibilityVector = nullptr;
393  }
394  }
395 
396  // Identification du calcul courant
397  bool bCurrentCalculFound = false;
398  for (i = 0; i < (int)_listCalcul.size(); i++)
399  {
400  if (_listCalcul[i]->getID().toString() == currentCalculID)
401  {
403  bCurrentCalculFound = true;
404  break;
405  }
406  }
407 
408  if (!bCurrentCalculFound && (_listCalcul.size() > 0))
409  {
411  }
412 
413  if (spectreFormOk)
414  {
415  switch (static_cast<TYSpectreForm>(spectreFormInt))
416  {
417  case SPECTRE_FORM_TIERS:
418  case SPECTRE_FORM_OCT:
419  case SPECTRE_FORM_CST_DF:
421  _spectreForm = static_cast<TYSpectreForm>(spectreFormInt);
422  break;
423  default:
424  // Rétro-compat / valeur invalide -> garder le défaut (_spectreForm inchangé)
425  break;
426  }
427  }
428 
429  if (!levelCurvesCanBeUnselectedOk)
430  {
432  }
433 
434  if (readOk == -1)
435  {
436  return readOk;
437  }
438 
439  // A REVOIR _pElement ne devrait pas renvoyer le projet dans showsources/TYModelerFrame...
440  if (_pSite)
441  {
442  _pSite->update(_pSite);
443  _pSite->getAltimetry()->setIsUpToDate(keepAltiUpTodate);
444  }
445  return 1;
446 }
447 
449 {
450  assert(pPointControl);
451 
452  pPointControl->setParent(this);
453  _pointsControl.push_back(pPointControl);
454 
455  if (getCurrentCalcul()) // Uniquement pour la creation depuis un modeleur
456  {
458  pPointControl); // Le point de controle est actif dans le calcul courant
459  }
460 
461  setIsGeometryModified(true);
462 
463  return true;
464 }
465 
467 {
468  bool ret = false;
469  assert(pPointControl);
470  TYTabLPPointControl::iterator ite;
471 
472  for (ite = _pointsControl.begin(); ite != _pointsControl.end(); ite++)
473  {
474  if ((*ite) == pPointControl)
475  {
476  // Nettoyage des calculs concernes
477  for (unsigned int i = 0; i < this->_listCalcul.size(); i++)
478  {
479  if ((*ite)->etat(_listCalcul[i]) == true)
480  {
481  _listCalcul[i]->remPtCtrlFromResult((*ite));
482  }
483  }
484  _pointsControl.erase(ite);
485  ret = true;
486  setIsGeometryModified(true);
487  break;
488  }
489  }
490 
491  return ret;
492 }
493 
495 {
496  assert(pPoint);
497 
498  // Duplication du point
499  LPTYPointControl pPointCopy = new TYPointControl(*pPoint);
500 
501  // Ajout a la liste des points du projet
502  addPointControl(pPointCopy);
503 
504  return pPointCopy;
505 }
506 
508 {
509  _pointsControl.clear();
510  setIsGeometryModified(true);
511 
512  return true;
513 }
514 
516 {
517  assert(pCalcul);
518 
519  pCalcul->setParent(this);
520  _listCalcul.push_back(pCalcul);
521 
522  return true;
523 }
524 
525 bool TYProjet::remCalcul(const LPTYCalcul pCalcul)
526 {
527  assert(pCalcul);
528  bool ret = false;
529 
530  // On ne peut detruire le calcul courant
531  if (pCalcul == getCurrentCalcul())
532  {
533  return false;
534  }
535 
536  TYTabLPCalcul::iterator ite;
537 
538  for (ite = _listCalcul.begin(); ite != _listCalcul.end(); ite++)
539  {
540  if ((*ite) == pCalcul)
541  {
542  // remove calcul from noise map and control point status list
543  cleanReceptorsStatus((*ite));
544 
545  // Remove calcul from list
546  _listCalcul.erase(ite);
547  ret = true;
548  break;
549  }
550  }
551 
552  return ret;
553 }
554 
555 bool TYProjet::remCalcul(QString idCalcul)
556 {
557  bool ret = false;
558  TYTabLPCalcul::iterator ite;
559 
560  for (ite = _listCalcul.begin(); ite != _listCalcul.end(); ite++)
561  {
562  if ((*ite)->getID().toString() == idCalcul)
563  {
564  return remCalcul((*ite));
565  }
566  }
567 
568  return ret;
569 }
570 
572 {
573  _listCalcul.clear();
574 }
575 
577 {
578  _pSite = NULL;
579 }
580 
582 {
583  assert(pCurCalcul);
584 
585  // On test si le calcul est present dans la liste
586 
587  // Statut solveur ok par defaut
588  _bStatusSolver = true;
589 
590  // Calcul courant
591  _pCurrentCalcul = pCurCalcul;
592 
593  // Test si le solveur du calcul est bien disponible
595  {
596  _bStatusSolver = false;
597  }
598 
599  if (_pSite)
600  {
601  // Le site root associe au projet est obligatoirement actif dans le calcul courant
603  _pSite->setInCurrentCalcul(true, false);
605  _pSite->updateCurrentCalcul(aTYListID, true);
606  }
607 
608  // Mise jour des maillages
609  for (unsigned int i = 0; i < _maillages.size(); i++)
610  {
611  dynamic_cast<TYMaillage*>(_maillages.at(i)->getElement())->updateFromCalcul(_pCurrentCalcul);
612  }
613 
614 #if TY_USE_IHM
615  updateGraphic();
616 #endif
617  setIsGeometryModified(true);
618  setIsAcousticModified(true);
619 }
620 
622 {
623  assert(pPtControl);
624  assert(pAlti);
625 
626  bool modified = true;
627 
628  // On va modifier le point de contrele (l'altitude seulement)
629  // (Utile pour l'update du GraphicObject du maillage)
630  pPtControl->setIsGeometryModified(true);
631 
632  // Init
633  OPoint3D pt;
634 
635  pt._x = pPtControl->_x;
636  pt._y = pPtControl->_y;
637  pt._z = 0.0;
638 
639  // Recherche de l'altitude
640  modified = pAlti->updateAltitude(pt);
641 
642  // Ajout de l'offset en Z
643  pt._z += pPtControl->getHauteur();
644 
645  pPtControl->_z = pt._z;
646 
647  // Le point est maintenant up to date
648  pPtControl->setIsGeometryModified(false);
649 
650  return modified;
651 }
652 
654 {
655  TYAltimetrie* pAlti = getSite()->getAltimetry()._pObj;
656  return updateAltiRecepteurs(pAlti);
657 }
658 
660 {
661  assert(pAlti);
662  bool bNoPbAlti = true;
663  bool modified = false;
664 
665  // Mise a jour de l'altitude pour les points de controle
666  unsigned int i = 0;
667  for (i = 0; i < _pointsControl.size(); i++)
668  {
669  // XXX See ticket https://extranet.logilab.fr/ticket/1484180
670  // The coordinates of the problematic point need to be properly reported
671  // or idealy an exception should be thrown.
672  modified |= updateAltiPointControle(getPointControl(i), pAlti);
673  bNoPbAlti &= modified;
674  }
675 
676  // XXX See ticket https://extranet.logilab.fr/ticket/1484180:
677  // Why handling of PointControle and Recepteur are so different ?
678 
679  // Mise a jour de l'altitude pour les recepteurs du calcul
680  for (unsigned int i = 0; i < _maillages.size(); i++)
681  {
682  updateAltiMaillage(_maillages.at(i), pAlti);
683  }
684 
685  // Done
686  if (!bNoPbAlti)
687  {
688  OMessageManager::get()->info(TR("msg_pbalti"));
689  }
690 
691  setIsGeometryModified(modified);
692  return bNoPbAlti;
693 }
694 
696 {
697  assert(pCalcul);
698 
699  LPTYCalcul pCalculCopy = new TYCalcul();
700 
701  // Duplication
702  // On dit qu'on copie aussi l'ID pour que les ID des elements
703  // composant le calcul soit copiees
704  pCalculCopy->deepCopy(pCalcul, false);
705 
706  // On incremente aussi le numero du calcul
707  pCalculCopy->setNumero(pCalculCopy->getNumero() + 1);
708 
709  // Duplication de l'etat des points de controle
710  duplicatePtCalcState(pCalcul, pCalculCopy);
711 
712  // Duplication de l'tat des cartographies
713  duplicateNoiseMapState(pCalcul, pCalculCopy);
714 
715  // Ajout
716  addCalcul(pCalculCopy);
717 
718  return pCalculCopy;
719 }
720 
721 void TYProjet::duplicatePtCalcState(const TYCalcul* pCalculRef, TYCalcul* pCalculNew)
722 {
723  QString idCalculRef = pCalculRef->getID().toString();
724  QString idCalculNew = pCalculNew->getID().toString();
725 
726  for (unsigned int i = 0; i < _pointsControl.size(); i++)
727  {
728  _pointsControl[i]->duplicateEtat(idCalculRef, idCalculNew);
729  }
730 }
731 
732 void TYProjet::duplicateNoiseMapState(const TYCalcul* pCalculRef, TYCalcul* pCalculNew)
733 {
734  QString idCalculRef = pCalculRef->getID().toString();
735  QString idCalculNew = pCalculNew->getID().toString();
736 
737  for (unsigned int i = 0; i < _maillages.size(); i++)
738  {
739  dynamic_cast<TYMaillage*>(_maillages[i]->getElement())->duplicateEtat(idCalculRef, idCalculNew);
740  }
741 }
742 
744 {
745  for (unsigned int i = 0; i < _listCalcul.size(); i++)
746  {
747  _listCalcul[i]->remToSelection(pElement);
748  }
749 }
750 
751 void TYProjet::remTabElmtFromCalculs(std::vector<LPTYGeometryNode> tabGeoNode)
752 {
753  for (unsigned int i = 0; i < tabGeoNode.size(); i++)
754  {
755  remElmtFromCalculs(tabGeoNode[i]->getElement());
756  }
757 }
758 
760 {
761 
765 
767 }
768 
770 {
774 }
775 
777 {
778  double delaunay = 0.0001;
779 
780 #if TY_USE_IHM
781  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "DelaunayTolerance"))
782  {
783  delaunay = TYPreferenceManager::getDouble(TYDIRPREFERENCEMANAGER, "DelaunayTolerance");
784  }
785  else
786  {
787  TYPreferenceManager::setDouble(TYDIRPREFERENCEMANAGER, "DelaunayTolerance", delaunay);
788  }
789 #endif
790 
791  return delaunay;
792 }
793 
794 const double TYProjet::getDefaultDMax() const
795 {
796  double DMax = 100.0;
797 
798 #if TY_USE_IHM
799  if (TYPreferenceManager::exists(TYDIRPREFERENCEMANAGER, "DistMinPtCrbNiv"))
800  {
801  DMax = TYPreferenceManager::getDouble(TYDIRPREFERENCEMANAGER, "DistMinPtCrbNiv");
802  }
803  else
804  {
805  TYPreferenceManager::setDouble(TYDIRPREFERENCEMANAGER, "DistMinPtCrbNiv", DMax);
806  }
807 #endif
808 
809  return DMax;
810 }
811 
812 void TYProjet::setDMax(const double& val)
813 {
814  _maxDistBetweenPoints = val;
816 }
817 
819 {
820  assert(pSite);
821  _pSite = pSite;
822  _pSite->setParent(this);
823  _pSite->setProjet(this);
824  _pSite->setRoot(true); // Ce site est forcemment le site racine
825  _pSite->addToCalcul();
826  setIsGeometryModified(true);
827 }
828 
830 {
831  for (unsigned int i = 0; i < _listCalcul.size(); i++)
832  {
833  _listCalcul[i]->updateMaillage(pMaillage);
834  }
835 }
836 
838 {
839  assert(pMaillageGeoNode);
840  assert(pMaillageGeoNode->getElement());
841 
842  pMaillageGeoNode->setParent(this);
843  pMaillageGeoNode->getElement()->setParent(this);
844 
845  _maillages.push_back(pMaillageGeoNode);
846 
847  // Set in current calcul
848  if (getCurrentCalcul() != nullptr)
849  {
850  getCurrentCalcul()->addMaillage(dynamic_cast<TYMaillage*>(pMaillageGeoNode->getElement()));
851  }
852 
853  setIsGeometryModified(true);
854 
855  return true;
856 }
857 
859 {
860  return addMaillage(new TYMaillageGeoNode((LPTYElement)pMaillage));
861 }
862 
863 bool TYProjet::remMaillage(const LPTYMaillage pMaillage)
864 {
865  assert(pMaillage);
866 
867  TYGeometryNode* pNode = TYGeometryNode::GetGeoNode(dynamic_cast<TYElement*>(pMaillage._pObj));
868 
869  return remMaillage(pNode);
870 }
871 
872 bool TYProjet::remMaillage(const LPTYMaillageGeoNode pMaillageGeoNode)
873 {
874  assert(pMaillageGeoNode);
875  bool ret = false;
876 
877  // Suppression dans tous les calculs
878  for (unsigned int i = 0; i < _listCalcul.size(); i++)
879  {
880  _listCalcul.at(i)->remMaillage(dynamic_cast<TYMaillage*>(pMaillageGeoNode->getElement()));
881  }
882 
883  // Suppression de la liste des maillages du projet
884  TYTabMaillageGeoNode::iterator ite;
885 
886  for (ite = _maillages.begin(); ite != _maillages.end(); ite++)
887  {
888  if ((*ite) == pMaillageGeoNode)
889  {
890  _maillages.erase(ite);
891  ret = true;
892  setIsGeometryModified(true);
893  break;
894  }
895  }
896 
897  return ret;
898 }
899 
900 bool TYProjet::remMaillage(QString idMaillage)
901 {
902  bool ret = false;
903  TYTabMaillageGeoNode::iterator ite;
904 
905  for (ite = _maillages.begin(); ite != _maillages.end(); ite++)
906  {
907  if ((*ite)->getElement()->getID().toString() == idMaillage)
908  {
909  _maillages.erase(ite);
910  ret = true;
911  setIsGeometryModified(true);
912  break;
913  }
914  }
915 
916  return ret;
917 }
918 
920 {
921  _maillages.clear();
922  setIsGeometryModified(true);
923 
924  return true;
925 }
926 
928 {
929  assert(pMaillage);
930  TYTabMaillageGeoNode::iterator ite;
931 
932  for (ite = _maillages.begin(); ite != _maillages.end(); ite++)
933  {
934  if (TYMaillage::safeDownCast((*ite)->getElement()) == pMaillage)
935  {
936  return (*ite);
937  }
938  }
939 
940  return NULL;
941 }
942 
944 {
945 #if TY_USE_IHM
946  for (unsigned int i = 0; i < getMaillages().size(); i++)
947  {
948  TYMaillage* pMaillage = getMaillage(i);
949  pMaillage->getGraphicObject()->update();
950  }
951 #endif
952 }
953 
955 {
956  TYAltimetrie* pAlti = getSite()->getAltimetry()._pObj;
957  return updateAltiMaillage(pMaillageGeoNode, pAlti);
958 }
959 
960 bool TYProjet::updateAltiMaillage(TYMaillageGeoNode* pMaillageGeoNode, const TYAltimetrie* pAlti)
961 {
962  assert(pMaillageGeoNode);
963  assert(pAlti);
964 
965  bool modified = true;
966 
967  if (pMaillageGeoNode == NULL)
968  {
969  return false;
970  }
971 
972  TYPoint pt;
973  TYMaillage* pMaillage = TYMaillage::safeDownCast(pMaillageGeoNode->getElement());
974 
975  if (pMaillage == NULL)
976  {
977  return false;
978  }
979 
980  OMatrix matrix = pMaillageGeoNode->getMatrix();
981  OMatrix matrixinv = matrix.getInvert();
982  TYTabLPPointCalcul& tabpoint = pMaillage->getPtsCalcul();
983 
984  bool bNoPbAlti = true; // Permet de tester si tous les points sont altimtriss correctement.
985 
986  if (pMaillage->getComputeAlti()) // Cas des maillages rectangulaires et lineaires horizontaux
987  {
988 
989 #if TY_USE_IHM
990  TYProgressManager::setMessage("Calcul des altitudes des points de maillage");
991  TYProgressManager::set(static_cast<uint32>(tabpoint.size()));
992 #endif // TY_USE_IHM
993 
994  for (unsigned int i = 0; i < tabpoint.size(); i++)
995  {
996 
997 #if TY_USE_IHM
998  bool cancel = false;
999  TYProgressManager::step(cancel);
1000  if (cancel)
1001  {
1002  break;
1003  }
1004 #endif // TY_USE_IHM
1005 
1006  pt = *tabpoint[i];
1007  // Passage au repere du site
1008  pt = matrix * pt;
1009  pt._z = 0;
1010 
1011  // Recherche de l'altitude
1012  bNoPbAlti &= pAlti->updateAltitude(pt);
1013 
1014  // Retour au repere d'origine
1015  pt = matrixinv * pt;
1016 
1017  // Ajout de l'offset en Z
1018  pt._z += pMaillage->getHauteur();
1019 
1020  // Application du calcul
1021  tabpoint[i]->_x = pt._x;
1022  tabpoint[i]->_y = pt._y;
1023  tabpoint[i]->_z = pt._z;
1024  }
1025 
1026 #if TY_USE_IHM
1028 #endif // TY_USE_IHM
1029  }
1030  else // Cas des maillages verticaux
1031  {
1032  // Init
1033  pt = pMaillageGeoNode->getORepere3D()._origin;
1034  pt._z = 0.0;
1035 
1036  // Recherche de l'altitude
1037  bNoPbAlti &= pAlti->updateAltitude(pt);
1038 
1039  // Ajout de l'offset en Z
1040  pt._z += pMaillage->getHauteur();
1041 
1042  if (pMaillage->isA("TYRectangularMaillage"))
1043  {
1044  // Ajout d'un offset de la demi-hauteur (maillages verticaux)
1045  pt._z += ((TYRectangularMaillage*)pMaillage)->getRectangle()->getSizeY() / 2.0;
1046  }
1047 
1048  pMaillageGeoNode->getORepere3D()._origin._z = pt._z;
1049 
1050  modified = true;
1051  }
1052 
1053  if (!bNoPbAlti) // Certains point pas altimetrises
1054  {
1055  OMessageManager::get()->info(TR("msg_pbalti"));
1056  }
1057 
1058  // Done
1059  if (modified)
1060  {
1061 #if TY_USE_IHM
1062  pMaillage->updateGraphicTree();
1063 #endif
1064  setIsGeometryModified(true);
1065  }
1066 
1067  return modified;
1068 }
1069 
1071 {
1072  int i = 0, j = 0;
1073 
1074  // Recuperation des volumes
1075  TYInfrastructure* pInfra = pSite->getInfrastructure();
1076  TYTabAcousticVolumeNodeGeoNode tabVolNodeGeoNode;
1077 
1078  // On commence par recuperer la liste des machines et des btiments
1079  // Batiments
1080  for (j = 0; j < static_cast<int>(pInfra->getListBatiment().size()); j++)
1081  {
1082  // Si ce batiment est actif pour le calcul
1083  if (TYBatiment::safeDownCast(pInfra->getBatiment(j)->getElement())->isInCurrentCalcul())
1084  {
1085  tabVolNodeGeoNode.push_back((LPTYAcousticVolumeNodeGeoNode&)pInfra->getListBatiment()[j]);
1086  }
1087  }
1088 
1089  // Machines
1090  for (j = 0; j < static_cast<int>(pInfra->getListMachine().size()); j++)
1091  {
1092  // Si cette machine est active pour le calcul
1093  if (TYMachine::safeDownCast(pInfra->getMachine(j)->getElement())->isInCurrentCalcul())
1094  {
1095  tabVolNodeGeoNode.push_back((LPTYAcousticVolumeNodeGeoNode&)pInfra->getListMachine()[j]);
1096  }
1097  }
1098 
1099  // Ensuite, on verifie si des points du maillage ne sont pas a l'interieur
1100  std::vector<OPoint3D> tabPts;
1101 
1102  for (i = 0; i < static_cast<int>(getMaillages().size()); i++)
1103  {
1104  TYMaillage* pMaillage = getMaillage(i);
1105  TYMaillageGeoNode* pMaillageGeoNode = getMaillages()[i];
1106 
1107  // Matrice pour la position de ce maillage
1108  OMatrix matrixMaillage = pMaillageGeoNode->getMatrix();
1109  // Nb de points de calcul dans ce maillage
1110  size_t nbPtsCalcul = pMaillage->getPtsCalcul().size();
1111 
1112  tabPts.reserve(nbPtsCalcul); // Reservation du nombre de points pour eviter les mouvements memoire
1113 
1114  for (j = 0; (int)j < nbPtsCalcul; j++)
1115  {
1116  pMaillage->getPtsCalcul()[j]->setEtat(true);
1117  tabPts.push_back(matrixMaillage * (*(pMaillage->getPtsCalcul()[j])));
1118  }
1119 
1120  // Detection des points a l'interieur de volumes
1121  OPoint3D pt;
1122  for (j = 0; j < tabVolNodeGeoNode.size(); j++)
1123  {
1124  OMatrix matrixVolNode = tabVolNodeGeoNode[j]->getMatrix();
1125  matrixVolNode.invert();
1126 
1127  LPTYAcousticVolumeNode pVolumeNode =
1128  TYAcousticVolumeNode::safeDownCast(tabVolNodeGeoNode[j]->getElement());
1129  for (int k = 0; k < nbPtsCalcul; k++)
1130  {
1131  // Passage au repere du volume
1132  pt = matrixVolNode * tabPts[k];
1133 
1134  // Si le point se trouve a l'interieur de ce volume
1135  if (pVolumeNode->isInside(pt))
1136  {
1137  // Desactivation de ce point de calcul
1138  pMaillage->getPtsCalcul()[k]->setEtat(false);
1139  }
1140  }
1141  }
1142 
1143  // Le maillage et son GeoNode sont maintenant up to date
1144  pMaillage->setIsGeometryModified(false);
1145  pMaillageGeoNode->setIsGeometryModified(false);
1146 
1147  // Vidage du tableau de points
1148  tabPts.clear();
1149  }
1150 
1151  tabVolNodeGeoNode.clear();
1152 }
1153 
1155 {
1156  for (unsigned int i = 0; i < _pointsControl.size(); i++)
1157  {
1158  _pointsControl[i]->remEtat(pCalcul);
1159  }
1160 
1161  for (unsigned int i = 0; i < _maillages.size(); i++)
1162  {
1163  dynamic_cast<TYMaillage*>(_maillages[i]->getElement())->remEtat(pCalcul);
1164  }
1165 }
1166 
1168 {
1169  return _spectreForm == SPECTRE_FORM_OCT;
1170 }
1171 
1173 {
1175  TYElement::updateGraphic();
1176 }
QDomDocument DOM_Document
Definition: QT2DOM.h:33
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< LPTYAcousticVolumeNodeGeoNode > TYTabAcousticVolumeNodeGeoNode
Collection de noeuds geometriques de type TYAcousticVolumeNode.
std::vector< LPTYPointCalcul > TYTabLPPointCalcul
Collection de pointeurs de TYPointCalcul.
Definition: TYDefines.h:358
std::vector< LPTYSpectre > TYTabLPSpectre
Collection de TYSpectre.
Definition: TYDefines.h:337
std::list< TYUUID > TYListID
Collection d'identifiants.
Definition: TYDefines.h:331
#define TYDIRPREFERENCEMANAGER
Definition: TYElement.h:51
TYGeometryNode TYMaillageGeoNode
Noeud geometrique de type TYMaillage.
Definition: TYMaillage.h:434
Representation graphique d'un projet (fichier header)
outil IHM pour un projet (fichier header)
TY_EXTENSION_INST(TYProjet)
TY_EXT_GRAPHIC_INST(TYProjet)
#define TR(id)
Definition: TYProjet.cpp:33
double _y
y coordinate of OCoord3D
Definition: 3d.h:283
double _z
z coordinate of OCoord3D
Definition: 3d.h:284
double _x
x coordinate of OCoord3D
Definition: 3d.h:282
The 4x4 matrix class.
Definition: 3d.h:625
int invert()
Matrix inversion.
Definition: 3d.cpp:792
OMatrix getInvert(int *ok=0) const
Return the inverse matrix of this matrix.
Definition: 3d.cpp:813
static OMessageManager * get()
Definition: logging.cpp:108
virtual void info(const char *message,...)
Definition: logging.cpp:143
The 3D point class.
Definition: 3d.h:487
virtual const char * getClassName() const
Definition: TYElement.h:248
static OPrototype * safeDownCast(OPrototype *pObject)
Definition: TYElement.cpp:71
bool isA(const char *className) const
Definition: TYElement.cpp:65
OPoint3D _origin
The origin point.
Definition: 3d.h:1331
T * _pObj
The real pointer, must derived IRefCount.
Definition: smartptr.h:307
virtual int isInside(const TYPoint &pt) const
Assigne une altitude a chaque point de l'espace.
Definition: TYAltimetrie.h:35
bool isUpToDate() const
Definition: TYAltimetrie.h:176
bool updateAltitude(OPoint3D &pt) const
Modifie l'altitude d'un point donn�. Si le point est hors de la zone dans laquelle l'altim�trie e...
void setIsUpToDate(bool isUpToDate)
Calculation program.
Definition: TYCalcul.h:50
void setSite(LPTYSiteNode pSite)
Definition of the site on which the calculation will be done.
Definition: TYCalcul.cpp:868
bool addPtCtrlToResult(LPTYPointControl pPoint)
Add a checkpoint to the results array.
Definition: TYCalcul.cpp:1141
TYListID getElementSelection() const
Get the selection of active elements in this Calculation.
Definition: TYCalcul.h:256
bool hasResuCtrlPoints()
Method used for migrating T310 project \ returns true if ResuCtrlPnts exists in xml project else retu...
Definition: TYCalcul.h:549
void setSpectre(const TYUUID &id_pt, TYSpectre *pSpectre)
Definition: TYCalcul.cpp:1257
int getNumero() const
Get the number.
Definition: TYCalcul.h:146
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYCalcul.cpp:177
const OGenID getSolverId() const
Get solver ID.
Definition: TYCalcul.h:465
bool addMaillage(TYMaillage *pMaillage)
Add this maillage to calcul.
Definition: TYCalcul.cpp:1318
void setNumero(int num)
Set the number.
Definition: TYCalcul.h:155
TYMapIdSpectre getMapPointCtrlSpectre()
Returns map of control points with spectrum.
Definition: TYCalcul.cpp:1392
bool addToSelection(TYUUID id)
Adds the item to the selection of this Calculation.
Definition: TYCalcul.cpp:873
static double setDefaultDistMax()
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYElement.cpp:366
QString _name
Nom courant de l'element.
Definition: TYElement.h:965
void cleanAllUses()
Definition: TYElement.h:939
void * getAllUses()
Definition: TYElement.h:931
TYElement & operator=(const TYElement &other)
Definition: TYElement.cpp:263
bool callFromXMLIfEqual(DOM_Element &domElement, int *pRetVal=NULL)
Definition: TYElement.cpp:542
const TYUUID & getID() const
Definition: TYElement.cpp:176
virtual void setInCurrentCalcul(bool state, bool recurschild=true, bool recursparent=true)
Definition: TYElement.cpp:408
void setParent(TYElement *pParent)
Definition: TYElement.h:699
virtual int fromXML(DOM_Element domElement)
Definition: TYElement.cpp:379
virtual void setIsAcousticModified(bool isModified)
Definition: TYElement.cpp:248
static TYElement * getInstance(TYUUID uuid)
Definition: TYElement.cpp:158
virtual void setIsGeometryModified(bool isModified)
Definition: TYElement.cpp:253
const ORepere3D & getORepere3D() const
TYElement * getElement() const
OMatrix getMatrix() const
static TYGeometryNode * GetGeoNode(TYElement *pElement)
TYTabBatimentGeoNode & getListBatiment()
LPTYMachineGeoNode getMachine(int index)
LPTYBatimentGeoNode getBatiment(int index)
TYTabMachineGeoNode & getListMachine()
Classe de definition d'un maillage.
Definition: TYMaillage.h:51
TYTabLPPointCalcul & getPtsCalcul()
Set/Get de la liste des points de calcul.
Definition: TYMaillage.h:123
double getHauteur() const
Definition: TYMaillage.h:187
virtual bool etat()
Definition: TYMaillage.cpp:616
bool getComputeAlti() const
Get de l'indicateur de calcul de l'altitude des points de ce maillage.
Definition: TYMaillage.h:207
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
static TYNameManager * get()
Retourne l'instance singleton.
static LPTYPluginManager get()
Classe de definition d'un point de controle.Le point de controle est un point de calcul avec une haut...
double getHauteur() const
Get de la hauteur de ce point par rapport au sol (a l'altimetrie en fait).
static void set(int totalSteps, int stepSize=1)
static void stepToEnd()
classe de definition d'un projet.
Definition: TYProjet.h:45
virtual std::string toString() const
Definition: TYProjet.cpp:168
bool _bStatusSolver
Definition: TYProjet.h:658
TYProjet & operator=(const TYProjet &other)
Operateur =.
Definition: TYProjet.cpp:74
TYSpectreForm _spectreForm
Definition: TYProjet.h:661
QString _dateCreation
Date de creation.
Definition: TYProjet.h:631
QString _dateModif
Date de modification.
Definition: TYProjet.h:633
void forceUseDefault()
Force l'utilisation des parametres par defaut.
Definition: TYProjet.cpp:769
QString _comment
Commentaires.
Definition: TYProjet.h:635
bool addMaillage(LPTYMaillageGeoNode pMaillageGeoNode)
Ajout d'un maillage.
Definition: TYProjet.cpp:837
TYTabMaillageGeoNode & getMaillages()
Get de la collection de maillages.
Definition: TYProjet.h:261
TYTabLPPointControl _pointsControl
Liste des points de controles.
Definition: TYProjet.h:644
bool operator==(const TYProjet &other) const
Operateur ==.
Definition: TYProjet.cpp:99
TYTabLPCalcul _listCalcul
Liste des Calcul.
Definition: TYProjet.h:641
const double getDefaultDMax() const
Relecture de la distance minimale entre deux points par defaut.
Definition: TYProjet.cpp:794
void remTabElmtFromCalculs(std::vector< LPTYGeometryNode > tabGeoNode)
Supprime un ensemble d'elements des calculs.
Definition: TYProjet.cpp:751
bool addPointControl(LPTYPointControl pPointControl)
Definition: TYProjet.cpp:448
LPTYCalcul _pCurrentCalcul
Un pointeur sur le Calcul courant.
Definition: TYProjet.h:650
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYProjet.cpp:173
void remElmtFromCalculs(TYElement *pElement)
Supprime un element de tous les calculs.
Definition: TYProjet.cpp:743
bool updateAltiMaillage(TYMaillageGeoNode *pMaillageGeoNode, const TYAltimetrie *pAlti)
Met a niveau l'altimetrie d'un maillage.
Definition: TYProjet.cpp:960
LPTYMaillageGeoNode findMaillage(const LPTYMaillage pMaillage)
Retrouve le GeoNode associe a un maillage.
Definition: TYProjet.cpp:927
bool remAllPointControl()
Definition: TYProjet.cpp:507
void setCurrentCalcul(LPTYCalcul pCurCalcul)
Set/Get du pointeur du Calcul courant.
Definition: TYProjet.cpp:581
void duplicateNoiseMapState(const TYCalcul *pCalculRef, TYCalcul *pCalculNew)
copie l'etat des points de controle pour un calcul pour un autre calcul
Definition: TYProjet.cpp:732
void cleanReceptorsStatus(TYCalcul *pCalcul)
clean status of control points and noise maps
Definition: TYProjet.cpp:1154
QString _auteur
Nom de l'auteur.
Definition: TYProjet.h:629
void selectActivePoint(const LPTYSiteNode pSite)
Selectionne les points actifs du maillage.
Definition: TYProjet.cpp:1070
bool updateAltiRecepteurs()
Definition: TYProjet.cpp:653
void verifGeometricParam()
verification des parametres de geometrisation (si necessaire)
Definition: TYProjet.cpp:759
TYProjet()
Constructeur. Le constructeur de la classe TYProjet.
Definition: TYProjet.cpp:37
TYTabMaillageGeoNode _maillages
Collections de Maillages.
Definition: TYProjet.h:647
bool remPointControl(LPTYPointControl pPointControl)
Definition: TYProjet.cpp:466
const double getDefaultDelaunayTolerence() const
Relecture de la valeur de tolerence de Delaunay par defaut.
Definition: TYProjet.cpp:776
const bool displaySpectrumInOctaveForm()
Definition: TYProjet.cpp:1167
bool remMaillage(const LPTYMaillageGeoNode pMaillageGeoNode)
Suppression d'un maillage.
Definition: TYProjet.cpp:872
bool remAllMaillage()
Suppression de tous les maillages.
Definition: TYProjet.cpp:919
virtual ~TYProjet()
Destructeur Le destructeur de la classe TYProjet .
Definition: TYProjet.cpp:69
double _delaunayTolerance
Parametres de geometrisation.
Definition: TYProjet.h:653
LPTYSiteNode getSite()
Get du site.
Definition: TYProjet.h:169
LPTYPointControl getPointControl(int index)
Definition: TYProjet.h:232
void setSite(const LPTYSiteNode pSite)
Set du site.
Definition: TYProjet.cpp:818
bool updateAltiPointControle(TYPointControl *pPtControl, const TYAltimetrie *pAlti)
Definition: TYProjet.cpp:621
LPTYSiteNode _pSite
Site.
Definition: TYProjet.h:638
void updateCalculsWithMaillage(TYMaillage *pMaillage)
Definition: TYProjet.cpp:829
bool _useDefaultGeomVal
Definition: TYProjet.h:655
void unsetSite()
Supprime la liaison avec le site.
Definition: TYProjet.cpp:576
double _maxDistBetweenPoints
Definition: TYProjet.h:654
void setDMax(const double &val)
Get/set de la distance max entre les points.
Definition: TYProjet.cpp:812
void duplicatePtCalcState(const TYCalcul *pCalculRef, TYCalcul *pCalculNew)
copie l'etat des points de controle pour un calcul pour un autre calcul
Definition: TYProjet.cpp:721
LPTYMaillage getMaillage(int index)
Retourne un maillage a partir de son index.
Definition: TYProjet.h:318
bool addCalcul(LPTYCalcul pCalcul)
Ajout d'un Calcul a la liste des Calcul.
Definition: TYProjet.cpp:515
LPTYCalcul duplicateCalcul(const LPTYCalcul pCalcul)
Duplique pCalcul.
Definition: TYProjet.cpp:695
virtual void updateGraphic()
Definition: TYProjet.cpp:1172
QString _spectrePond
Definition: TYProjet.h:663
bool operator!=(const TYProjet &other) const
Operateur !=.
Definition: TYProjet.cpp:163
virtual int fromXML(DOM_Element domElement)
Definition: TYProjet.cpp:225
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.
Definition: TYProjet.h:426
static bool gSaveValues
Definition: TYProjet.h:624
LPTYPointControl duplicatePointControl(const LPTYPointControl &pPoint)
Duplique pPoint.
Definition: TYProjet.cpp:494
bool remCalcul(const LPTYCalcul pCalcul)
Suppression d'un Calcul a la liste des Calcul.
Definition: TYProjet.cpp:525
void remAllCalcul()
Suppression de tous les elements.
Definition: TYProjet.cpp:571
void updateGraphicMaillage()
Mets a jour l'objet graphique des maillage apres calcul.
Definition: TYProjet.cpp:943
Classe de definition d'un maillage rectangulaire.
void selectCourbeNiveauAndPlanEau()
Definition: TYSiteNode.cpp:781
void setProjet(const LPTYProjet pProjet)
Definition: TYSiteNode.cpp:560
LPTYAltimetrie getAltimetry() const
virtual void updateCurrentCalcul(TYListID &listID, bool recursif=true)
Definition: TYSiteNode.cpp:544
virtual void setChildsNotInCurrentCalcul()
void setUseEmpriseAsCrbNiv(bool b)
Definition: TYSiteNode.h:130
LPTYInfrastructure getInfrastructure()
Definition: TYSiteNode.h:174
void update(const bool &force=false)
void setRoot(bool b)
Definition: TYSiteNode.h:329
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYSiteNode.cpp:271
virtual bool addToCalcul()
Definition: TYSiteNode.cpp:511
static void addElementDoubleValue(DOM_Element &parentElem, DOMString nodeName, double nodeValue)
Definition: TYXMLTools.cpp:87
static bool getElementBoolValue(DOM_Element parentElem, DOMString nodeName, bool &nodeValue)
Definition: TYXMLTools.cpp:179
static bool getElementStringValue(DOM_Element parentElem, DOMString nodeName, QString &nodeValue)
Definition: TYXMLTools.cpp:93
static void addElementIntValue(DOM_Element &parentElem, DOMString nodeName, int nodeValue)
Definition: TYXMLTools.cpp:72
static bool getElementIntValue(DOM_Element parentElem, DOMString nodeName, int &nodeValue)
Definition: TYXMLTools.cpp:129
static bool getElementDoubleValue(DOM_Element parentElem, DOMString nodeName, double &nodeValue)
Definition: TYXMLTools.cpp:243
static void addElementBoolValue(DOM_Element &parentElem, DOMString nodeName, bool nodeValue)
Definition: TYXMLTools.cpp:77
static void addElementStringValue(DOM_Element &parentElem, DOMString nodeName, DOMString nodeValue)
Definition: TYXMLTools.cpp:24
unsigned int uint32
Definition: defines.h:75
TYSpectreForm
Spectrum representation.
Definition: spectre.h:36
@ SPECTRE_FORM_TIERS
Definition: spectre.h:37
@ SPECTRE_FORM_OCT
Definition: spectre.h:38
@ SPECTRE_FORM_UNSHAPED
Definition: spectre.h:40
@ SPECTRE_FORM_CST_DF
Definition: spectre.h:39