33 #define TR(id) OLocalizator::getString("OMessageManager", (id))
38 : _auteur(
""), _dateCreation(
"2001-10-01"), _dateModif(
"2001-10-01"), _comment(
""),
40 _maxDistBetweenPoints(200.0), _useDefaultGeomVal(true), _bStatusSolver(true)
103 if (TYElement::operator!=(other))
200 DOM_Element pointsControlNode = domDoc.createElement(
"PointsControl");
201 domNewElem.appendChild(pointsControlNode);
208 DOM_Element noiseMapsNode = domDoc.createElement(
"NoiseMaps");
209 domNewElem.appendChild(noiseMapsNode);
210 for (
unsigned int i = 0; i <
_maillages.size(); i++)
216 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
232 bool auteurOk =
false;
233 bool dateCreationOk =
false;
234 bool dateModifOk =
false;
235 bool commentOk =
false;
236 bool currentCalculIDOk =
false;
237 bool delaunayOk =
false;
239 bool useDefaultOk =
false;
240 bool keepAltiUpTodate =
false;
241 bool spectreFormOk =
false;
243 bool spectrePondOk =
false;
245 QString currentCalculID;
252 QDomNodeList childs = domElement.childNodes();
253 int childcount = childs.length();
254 for (i = 0; i < childcount; i++)
256 elemCur = childs.item(i).toElement();
280 if (elemCur.nodeName() ==
"PointsControl")
283 QDomNodeList childs2 = elemCur.childNodes();
285 for (
unsigned int j = 0; j < childs2.length(); j++)
287 elemCur2 = childs2.item(j).toElement();
298 if (elemCur.nodeName() ==
"NoiseMaps")
301 QDomNodeList childs2 = elemCur.childNodes();
303 for (
unsigned int j = 0; j < childs2.length(); j++)
305 elemCur2 = childs2.item(j).toElement();
323 "consistency in calculation settings");
343 std::map<TYUUID, LPTYSpectre>* compatibilityVector =
344 static_cast<std::map<TYUUID, LPTYSpectre>*
>(
_pointsControl[i].getRealPointer()->getAllUses());
345 std::map<TYUUID, LPTYSpectre>::iterator it;
346 for (it = compatibilityVector->begin(); it != compatibilityVector->end(); it++)
349 if (pCalc ==
nullptr)
360 compatibilityVector->clear();
362 compatibilityVector =
nullptr;
368 for (
unsigned int i = 0; i <
_maillages.size(); i++)
380 _listCalcul[j]->setNoiseMapSpectrums(pMaillage, *compatibilityVector);
385 compatibilityVector->clear();
387 compatibilityVector =
nullptr;
392 bool bCurrentCalculFound =
false;
398 bCurrentCalculFound =
true;
403 if (!bCurrentCalculFound && (
_listCalcul.size() > 0))
440 assert(pPointControl);
459 assert(pPointControl);
460 TYTabLPPointControl::iterator ite;
464 if ((*ite) == pPointControl)
467 for (
unsigned int i = 0; i < this->
_listCalcul.size(); i++)
526 TYTabLPCalcul::iterator ite;
530 if ((*ite) == pCalcul)
548 TYTabLPCalcul::iterator ite;
552 if ((*ite)->getID().toString() == idCalcul)
599 for (
unsigned int i = 0; i <
_maillages.size(); i++)
616 bool modified =
true;
625 pt.
_x = pPtControl->
_x;
626 pt.
_y = pPtControl->
_y;
635 pPtControl->
_z = pt.
_z;
652 bool bNoPbAlti =
true;
653 bool modified =
false;
663 bNoPbAlti &= modified;
670 for (
unsigned int i = 0; i <
_maillages.size(); i++)
694 pCalculCopy->
deepCopy(pCalcul,
false);
713 QString idCalculRef = pCalculRef->
getID().toString();
714 QString idCalculNew = pCalculNew->
getID().toString();
724 QString idCalculRef = pCalculRef->
getID().toString();
725 QString idCalculNew = pCalculNew->
getID().toString();
727 for (
unsigned int i = 0; i <
_maillages.size(); i++)
729 dynamic_cast<TYMaillage*
>(
_maillages[i]->getElement())->duplicateEtat(idCalculRef, idCalculNew);
735 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
743 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
768 double delaunay = 0.0001;
821 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
829 assert(pMaillageGeoNode);
864 assert(pMaillageGeoNode);
868 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
874 TYTabMaillageGeoNode::iterator ite;
878 if ((*ite) == pMaillageGeoNode)
893 TYTabMaillageGeoNode::iterator ite;
897 if ((*ite)->getElement()->getID().toString() == idMaillage)
920 TYTabMaillageGeoNode::iterator ite;
936 for (
unsigned int i = 0; i <
getMaillages().size(); i++)
939 pMaillage->getGraphicObject()->update();
952 assert(pMaillageGeoNode);
955 bool modified =
true;
957 if (pMaillageGeoNode == NULL)
965 if (pMaillage == NULL)
974 bool bNoPbAlti =
true;
980 TYProgressManager::setMessage(
"Calcul des altitudes des points de maillage");
984 for (
unsigned int i = 0; i < tabpoint.size(); i++)
1005 pt = matrixinv * pt;
1011 tabpoint[i]->_x = pt._x;
1012 tabpoint[i]->_y = pt._y;
1013 tabpoint[i]->_z = pt._z;
1032 if (pMaillage->
isA(
"TYRectangularMaillage"))
1052 pMaillage->updateGraphicTree();
1070 for (j = 0; j < static_cast<int>(pInfra->
getListBatiment().size()); j++)
1080 for (j = 0; j < static_cast<int>(pInfra->
getListMachine().size()); j++)
1090 std::vector<OPoint3D> tabPts;
1092 for (i = 0; i < static_cast<int>(
getMaillages().size()); i++)
1102 tabPts.reserve(nbPtsCalcul);
1104 for (j = 0; (int)j < nbPtsCalcul; j++)
1107 tabPts.push_back(matrixMaillage * (*(pMaillage->
getPtsCalcul()[j])));
1112 for (j = 0; j < tabVolNodeGeoNode.size(); j++)
1114 OMatrix matrixVolNode = tabVolNodeGeoNode[j]->getMatrix();
1119 for (
int k = 0; k < nbPtsCalcul; k++)
1122 pt = matrixVolNode * tabPts[k];
1141 tabVolNodeGeoNode.clear();
1151 for (
unsigned int i = 0; i <
_maillages.size(); i++)
1165 TYElement::updateGraphic();
QDomDocument DOM_Document
std::vector< LPTYAcousticVolumeNodeGeoNode > TYTabAcousticVolumeNodeGeoNode
Collection de noeuds geometriques de type TYAcousticVolumeNode.
std::vector< LPTYPointCalcul > TYTabLPPointCalcul
Collection de pointeurs de TYPointCalcul.
std::vector< LPTYSpectre > TYTabLPSpectre
Collection de TYSpectre.
std::list< TYUUID > TYListID
Collection d'identifiants.
#define TYDIRPREFERENCEMANAGER
TYGeometryNode TYMaillageGeoNode
Noeud geometrique de type TYMaillage.
Representation graphique d'un projet (fichier header)
TY_EXTENSION_INST(TYProjet)
TY_EXT_GRAPHIC_INST(TYProjet)
double _y
y coordinate of OCoord3D
double _z
z coordinate of OCoord3D
double _x
x coordinate of OCoord3D
int invert()
Matrix inversion.
OMatrix getInvert(int *ok=0) const
Return the inverse matrix of this matrix.
static OMessageManager * get()
virtual void info(const char *message,...)
virtual const char * getClassName() const
static OPrototype * safeDownCast(OPrototype *pObject)
bool isA(const char *className) const
OPoint3D _origin
The origin point.
T * _pObj
The real pointer, must derived IRefCount.
virtual int isInside(const TYPoint &pt) const
Assigne une altitude a chaque point de l'espace.
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)
void setSite(LPTYSiteNode pSite)
Definition of the site on which the calculation will be done.
bool addPtCtrlToResult(LPTYPointControl pPoint)
Add a checkpoint to the results array.
TYListID getElementSelection() const
Get the selection of active elements in this Calculation.
bool hasResuCtrlPoints()
Method used for migrating T310 project \ returns true if ResuCtrlPnts exists in xml project else retu...
void setSpectre(const TYUUID &id_pt, TYSpectre *pSpectre)
int getNumero() const
Get the number.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
const OGenID getSolverId() const
Get solver ID.
bool addMaillage(TYMaillage *pMaillage)
Add this maillage to calcul.
void setNumero(int num)
Set the number.
TYMapIdSpectre getMapPointCtrlSpectre()
Returns map of control points with spectrum.
bool addToSelection(TYUUID id)
Adds the item to the selection of this Calculation.
static double setDefaultDistMax()
virtual DOM_Element toXML(DOM_Element &domElement)
QString _name
Nom courant de l'element.
TYElement & operator=(const TYElement &other)
bool callFromXMLIfEqual(DOM_Element &domElement, int *pRetVal=NULL)
const TYUUID & getID() const
virtual void setInCurrentCalcul(bool state, bool recurschild=true, bool recursparent=true)
void setParent(TYElement *pParent)
virtual int fromXML(DOM_Element domElement)
virtual void setIsAcousticModified(bool isModified)
static TYElement * getInstance(TYUUID uuid)
virtual void setIsGeometryModified(bool isModified)
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.
TYTabLPPointCalcul & getPtsCalcul()
Set/Get de la liste des points de calcul.
double getHauteur() const
bool getComputeAlti() const
Get de l'indicateur de calcul de l'altitude des points de ce maillage.
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)
classe de definition d'un projet.
virtual std::string toString() const
TYProjet & operator=(const TYProjet &other)
Operateur =.
TYSpectreForm _spectreForm
QString _dateCreation
Date de creation.
QString _dateModif
Date de modification.
void forceUseDefault()
Force l'utilisation des parametres par defaut.
QString _comment
Commentaires.
bool addMaillage(LPTYMaillageGeoNode pMaillageGeoNode)
Ajout d'un maillage.
TYTabMaillageGeoNode & getMaillages()
Get de la collection de maillages.
TYTabLPPointControl _pointsControl
Liste des points de controles.
bool operator==(const TYProjet &other) const
Operateur ==.
TYTabLPCalcul _listCalcul
Liste des Calcul.
const double getDefaultDMax() const
Relecture de la distance minimale entre deux points par defaut.
void remTabElmtFromCalculs(std::vector< LPTYGeometryNode > tabGeoNode)
Supprime un ensemble d'elements des calculs.
bool addPointControl(LPTYPointControl pPointControl)
LPTYCalcul _pCurrentCalcul
Un pointeur sur le Calcul courant.
virtual DOM_Element toXML(DOM_Element &domElement)
void remElmtFromCalculs(TYElement *pElement)
Supprime un element de tous les calculs.
bool updateAltiMaillage(TYMaillageGeoNode *pMaillageGeoNode, const TYAltimetrie *pAlti)
Met a niveau l'altimetrie d'un maillage.
LPTYMaillageGeoNode findMaillage(const LPTYMaillage pMaillage)
Retrouve le GeoNode associe a un maillage.
bool remAllPointControl()
void setCurrentCalcul(LPTYCalcul pCurCalcul)
Set/Get du pointeur du Calcul courant.
void duplicateNoiseMapState(const TYCalcul *pCalculRef, TYCalcul *pCalculNew)
copie l'etat des points de controle pour un calcul pour un autre calcul
void cleanReceptorsStatus(TYCalcul *pCalcul)
clean status of control points and noise maps
QString _auteur
Nom de l'auteur.
void selectActivePoint(const LPTYSiteNode pSite)
Selectionne les points actifs du maillage.
bool updateAltiRecepteurs()
void verifGeometricParam()
verification des parametres de geometrisation (si necessaire)
TYProjet()
Constructeur. Le constructeur de la classe TYProjet.
TYTabMaillageGeoNode _maillages
Collections de Maillages.
bool remPointControl(LPTYPointControl pPointControl)
const double getDefaultDelaunayTolerence() const
Relecture de la valeur de tolerence de Delaunay par defaut.
const bool displaySpectrumInOctaveForm()
bool remMaillage(const LPTYMaillageGeoNode pMaillageGeoNode)
Suppression d'un maillage.
bool remAllMaillage()
Suppression de tous les maillages.
virtual ~TYProjet()
Destructeur Le destructeur de la classe TYProjet .
double _delaunayTolerance
Parametres de geometrisation.
LPTYSiteNode getSite()
Get du site.
LPTYPointControl getPointControl(int index)
void setSite(const LPTYSiteNode pSite)
Set du site.
bool updateAltiPointControle(TYPointControl *pPtControl, const TYAltimetrie *pAlti)
void updateCalculsWithMaillage(TYMaillage *pMaillage)
void unsetSite()
Supprime la liaison avec le site.
double _maxDistBetweenPoints
void setDMax(const double &val)
Get/set de la distance max entre les points.
void duplicatePtCalcState(const TYCalcul *pCalculRef, TYCalcul *pCalculNew)
copie l'etat des points de controle pour un calcul pour un autre calcul
LPTYMaillage getMaillage(int index)
Retourne un maillage a partir de son index.
bool addCalcul(LPTYCalcul pCalcul)
Ajout d'un Calcul a la liste des Calcul.
LPTYCalcul duplicateCalcul(const LPTYCalcul pCalcul)
Duplique pCalcul.
virtual void updateGraphic()
bool operator!=(const TYProjet &other) const
Operateur !=.
virtual int fromXML(DOM_Element domElement)
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.
LPTYPointControl duplicatePointControl(const LPTYPointControl &pPoint)
Duplique pPoint.
bool remCalcul(const LPTYCalcul pCalcul)
Suppression d'un Calcul a la liste des Calcul.
void remAllCalcul()
Suppression de tous les elements.
void updateGraphicMaillage()
Mets a jour l'objet graphique des maillage apres calcul.
Classe de definition d'un maillage rectangulaire.
void setProjet(const LPTYProjet pProjet)
LPTYAltimetrie getAltimetry() const
virtual void updateCurrentCalcul(TYListID &listID, bool recursif=true)
virtual void setChildsNotInCurrentCalcul()
void setUseEmpriseAsCrbNiv(bool b)
LPTYInfrastructure getInfrastructure()
void update(const bool &force=false)
virtual DOM_Element toXML(DOM_Element &domElement)
virtual bool addToCalcul()
TYSpectreForm
Spectrum representation.