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)
95 if (TYElement::operator!=(other))
181 DOM_Element pointsControlNode = domDoc.createElement(
"PointsControl");
182 domNewElem.appendChild(pointsControlNode);
189 DOM_Element noiseMapsNode = domDoc.createElement(
"NoiseMaps");
190 domNewElem.appendChild(noiseMapsNode);
191 for (
unsigned int i = 0; i <
_maillages.size(); i++)
197 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
213 bool auteurOk =
false;
214 bool dateCreationOk =
false;
215 bool dateModifOk =
false;
216 bool commentOk =
false;
217 bool currentCalculIDOk =
false;
218 bool delaunayOk =
false;
220 bool useDefaultOk =
false;
222 QString currentCalculID;
229 QDomNodeList childs = domElement.childNodes();
230 int childcount = childs.length();
231 for (i = 0; i < childcount; i++)
233 elemCur = childs.item(i).toElement();
253 if (elemCur.nodeName() ==
"PointsControl")
256 QDomNodeList childs2 = elemCur.childNodes();
258 for (
unsigned int j = 0; j < childs2.length(); j++)
260 elemCur2 = childs2.item(j).toElement();
271 if (elemCur.nodeName() ==
"NoiseMaps")
274 QDomNodeList childs2 = elemCur.childNodes();
276 for (
unsigned int j = 0; j < childs2.length(); j++)
278 elemCur2 = childs2.item(j).toElement();
296 "consistency in calculation settings");
316 std::map<TYUUID, LPTYSpectre>* compatibilityVector =
317 static_cast<map<TYUUID, LPTYSpectre>*
>(
_pointsControl[i].getRealPointer()->getAllUses());
318 std::map<TYUUID, LPTYSpectre>::iterator it;
319 for (it = compatibilityVector->begin(); it != compatibilityVector->end(); it++)
322 if (pCalc ==
nullptr)
333 compatibilityVector->clear();
335 compatibilityVector =
nullptr;
341 for (
unsigned int i = 0; i <
_maillages.size(); i++)
353 _listCalcul[j]->setNoiseMapSpectrums(pMaillage, *compatibilityVector);
358 compatibilityVector->clear();
360 compatibilityVector =
nullptr;
365 bool bCurrentCalculFound =
false;
371 bCurrentCalculFound =
true;
376 if (!bCurrentCalculFound && (
_listCalcul.size() > 0))
396 assert(pPointControl);
415 assert(pPointControl);
416 TYTabLPPointControl::iterator ite;
420 if ((*ite) == pPointControl)
423 for (
unsigned int i = 0; i < this->
_listCalcul.size(); i++)
482 TYTabLPCalcul::iterator ite;
486 if ((*ite) == pCalcul)
504 TYTabLPCalcul::iterator ite;
508 if ((*ite)->getID().toString() == idCalcul)
555 for (
unsigned int i = 0; i <
_maillages.size(); i++)
572 bool modified =
true;
581 pt.
_x = pPtControl->
_x;
582 pt.
_y = pPtControl->
_y;
591 pPtControl->
_z = pt.
_z;
608 bool bNoPbAlti =
true;
609 bool modified =
false;
619 bNoPbAlti &= modified;
626 for (
unsigned int i = 0; i <
_maillages.size(); i++)
650 pCalculCopy->
deepCopy(pCalcul,
false);
669 QString idCalculRef = pCalculRef->
getID().toString();
670 QString idCalculNew = pCalculNew->
getID().toString();
680 QString idCalculRef = pCalculRef->
getID().toString();
681 QString idCalculNew = pCalculNew->
getID().toString();
683 for (
unsigned int i = 0; i <
_maillages.size(); i++)
685 dynamic_cast<TYMaillage*
>(
_maillages[i]->getElement())->duplicateEtat(idCalculRef, idCalculNew);
691 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
699 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
724 double delaunay = 0.0001;
777 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
785 assert(pMaillageGeoNode);
820 assert(pMaillageGeoNode);
824 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
830 TYTabMaillageGeoNode::iterator ite;
834 if ((*ite) == pMaillageGeoNode)
849 TYTabMaillageGeoNode::iterator ite;
853 if ((*ite)->getElement()->getID().toString() == idMaillage)
876 TYTabMaillageGeoNode::iterator ite;
892 for (
unsigned int i = 0; i <
getMaillages().size(); i++)
895 pMaillage->getGraphicObject()->update();
908 assert(pMaillageGeoNode);
911 bool modified =
true;
913 if (pMaillageGeoNode == NULL)
921 if (pMaillage == NULL)
930 bool bNoPbAlti =
true;
936 TYProgressManager::setMessage(
"Calcul des altitudes des points de maillage");
940 for (
unsigned int i = 0; i < tabpoint.size(); i++)
967 tabpoint[i]->_x = pt._x;
968 tabpoint[i]->_y = pt._y;
969 tabpoint[i]->_z = pt._z;
988 if (pMaillage->
isA(
"TYRectangularMaillage"))
1008 pMaillage->updateGraphicTree();
1026 for (j = 0; j < static_cast<int>(pInfra->
getListBatiment().size()); j++)
1036 for (j = 0; j < static_cast<int>(pInfra->
getListMachine().size()); j++)
1046 vector<OPoint3D> tabPts;
1048 for (i = 0; i < static_cast<int>(
getMaillages().size()); i++)
1058 tabPts.reserve(nbPtsCalcul);
1060 for (j = 0; (int)j < nbPtsCalcul; j++)
1063 tabPts.push_back(matrixMaillage * (*(pMaillage->
getPtsCalcul()[j])));
1068 for (j = 0; j < tabVolNodeGeoNode.size(); j++)
1070 OMatrix matrixVolNode = tabVolNodeGeoNode[j]->getMatrix();
1075 for (
int k = 0; k < nbPtsCalcul; k++)
1078 pt = matrixVolNode * tabPts[k];
1097 tabVolNodeGeoNode.clear();
1107 for (
unsigned int i = 0; i <
_maillages.size(); i++)
1116 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 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 =.
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.
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.
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 remTabElmtFromCalculs(vector< LPTYGeometryNode > tabGeoNode)
Supprime un ensemble d'elements des calculs.
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()