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))
201 DOM_Element pointsControlNode = domDoc.createElement(
"PointsControl");
202 domNewElem.appendChild(pointsControlNode);
209 DOM_Element noiseMapsNode = domDoc.createElement(
"NoiseMaps");
210 domNewElem.appendChild(noiseMapsNode);
211 for (
unsigned int i = 0; i <
_maillages.size(); i++)
217 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
233 bool auteurOk =
false;
234 bool dateCreationOk =
false;
235 bool dateModifOk =
false;
236 bool commentOk =
false;
237 bool currentCalculIDOk =
false;
238 bool delaunayOk =
false;
240 bool useDefaultOk =
false;
241 bool keepAltiUpTodate =
false;
242 bool spectreFormOk =
false;
244 bool spectrePondOk =
false;
245 bool levelCurvesCanBeUnselectedOk =
false;
246 bool bLevelCurvesCanBeUnselectedTmp =
false;
248 QString currentCalculID;
255 QDomNodeList childs = domElement.childNodes();
256 int childcount = childs.length();
257 for (i = 0; i < childcount; i++)
259 elemCur = childs.item(i).toElement();
274 levelCurvesCanBeUnselectedOk);
285 if (elemCur.nodeName() ==
"PointsControl")
288 QDomNodeList childs2 = elemCur.childNodes();
290 for (
unsigned int j = 0; j < childs2.length(); j++)
292 elemCur2 = childs2.item(j).toElement();
303 if (elemCur.nodeName() ==
"NoiseMaps")
306 QDomNodeList childs2 = elemCur.childNodes();
308 for (
unsigned int j = 0; j < childs2.length(); j++)
310 elemCur2 = childs2.item(j).toElement();
328 "consistency in calculation settings");
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++)
354 if (pCalc ==
nullptr)
365 compatibilityVector->clear();
367 compatibilityVector =
nullptr;
373 for (
unsigned int i = 0; i <
_maillages.size(); i++)
385 _listCalcul[j]->setNoiseMapSpectrums(pMaillage, *compatibilityVector);
390 compatibilityVector->clear();
392 compatibilityVector =
nullptr;
397 bool bCurrentCalculFound =
false;
403 bCurrentCalculFound =
true;
408 if (!bCurrentCalculFound && (
_listCalcul.size() > 0))
429 if (!levelCurvesCanBeUnselectedOk)
450 assert(pPointControl);
469 assert(pPointControl);
470 TYTabLPPointControl::iterator ite;
474 if ((*ite) == pPointControl)
477 for (
unsigned int i = 0; i < this->
_listCalcul.size(); i++)
536 TYTabLPCalcul::iterator ite;
540 if ((*ite) == pCalcul)
558 TYTabLPCalcul::iterator ite;
562 if ((*ite)->getID().toString() == idCalcul)
609 for (
unsigned int i = 0; i <
_maillages.size(); i++)
626 bool modified =
true;
635 pt.
_x = pPtControl->
_x;
636 pt.
_y = pPtControl->
_y;
645 pPtControl->
_z = pt.
_z;
662 bool bNoPbAlti =
true;
663 bool modified =
false;
673 bNoPbAlti &= modified;
680 for (
unsigned int i = 0; i <
_maillages.size(); i++)
704 pCalculCopy->
deepCopy(pCalcul,
false);
723 QString idCalculRef = pCalculRef->
getID().toString();
724 QString idCalculNew = pCalculNew->
getID().toString();
734 QString idCalculRef = pCalculRef->
getID().toString();
735 QString idCalculNew = pCalculNew->
getID().toString();
737 for (
unsigned int i = 0; i <
_maillages.size(); i++)
739 dynamic_cast<TYMaillage*
>(
_maillages[i]->getElement())->duplicateEtat(idCalculRef, idCalculNew);
745 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
753 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
778 double delaunay = 0.0001;
831 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
839 assert(pMaillageGeoNode);
874 assert(pMaillageGeoNode);
878 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
884 TYTabMaillageGeoNode::iterator ite;
888 if ((*ite) == pMaillageGeoNode)
903 TYTabMaillageGeoNode::iterator ite;
907 if ((*ite)->getElement()->getID().toString() == idMaillage)
930 TYTabMaillageGeoNode::iterator ite;
946 for (
unsigned int i = 0; i <
getMaillages().size(); i++)
949 pMaillage->getGraphicObject()->update();
962 assert(pMaillageGeoNode);
965 bool modified =
true;
967 if (pMaillageGeoNode == NULL)
975 if (pMaillage == NULL)
984 bool bNoPbAlti =
true;
990 TYProgressManager::setMessage(
"Calcul des altitudes des points de maillage");
994 for (
unsigned int i = 0; i < tabpoint.size(); i++)
1015 pt = matrixinv * pt;
1021 tabpoint[i]->_x = pt._x;
1022 tabpoint[i]->_y = pt._y;
1023 tabpoint[i]->_z = pt._z;
1042 if (pMaillage->
isA(
"TYRectangularMaillage"))
1062 pMaillage->updateGraphicTree();
1080 for (j = 0; j < static_cast<int>(pInfra->
getListBatiment().size()); j++)
1090 for (j = 0; j < static_cast<int>(pInfra->
getListMachine().size()); j++)
1100 std::vector<OPoint3D> tabPts;
1102 for (i = 0; i < static_cast<int>(
getMaillages().size()); i++)
1112 tabPts.reserve(nbPtsCalcul);
1114 for (j = 0; (int)j < nbPtsCalcul; j++)
1117 tabPts.push_back(matrixMaillage * (*(pMaillage->
getPtsCalcul()[j])));
1122 for (j = 0; j < tabVolNodeGeoNode.size(); j++)
1124 OMatrix matrixVolNode = tabVolNodeGeoNode[j]->getMatrix();
1129 for (
int k = 0; k < nbPtsCalcul; k++)
1132 pt = matrixVolNode * tabPts[k];
1151 tabVolNodeGeoNode.clear();
1161 for (
unsigned int i = 0; i <
_maillages.size(); i++)
1175 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 selectCourbeNiveauAndPlanEau()
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.