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)
99 if (TYElement::operator!=(other))
191 DOM_Element pointsControlNode = domDoc.createElement(
"PointsControl");
192 domNewElem.appendChild(pointsControlNode);
199 DOM_Element noiseMapsNode = domDoc.createElement(
"NoiseMaps");
200 domNewElem.appendChild(noiseMapsNode);
201 for (
unsigned int i = 0; i <
_maillages.size(); i++)
207 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
223 bool auteurOk =
false;
224 bool dateCreationOk =
false;
225 bool dateModifOk =
false;
226 bool commentOk =
false;
227 bool currentCalculIDOk =
false;
228 bool delaunayOk =
false;
230 bool useDefaultOk =
false;
231 bool keepAltiUpTodate =
false;
232 bool spectreFormOk =
false;
235 QString currentCalculID;
242 QDomNodeList childs = domElement.childNodes();
243 int childcount = childs.length();
244 for (i = 0; i < childcount; i++)
246 elemCur = childs.item(i).toElement();
269 if (elemCur.nodeName() ==
"PointsControl")
272 QDomNodeList childs2 = elemCur.childNodes();
274 for (
unsigned int j = 0; j < childs2.length(); j++)
276 elemCur2 = childs2.item(j).toElement();
287 if (elemCur.nodeName() ==
"NoiseMaps")
290 QDomNodeList childs2 = elemCur.childNodes();
292 for (
unsigned int j = 0; j < childs2.length(); j++)
294 elemCur2 = childs2.item(j).toElement();
312 "consistency in calculation settings");
332 std::map<TYUUID, LPTYSpectre>* compatibilityVector =
333 static_cast<std::map<TYUUID, LPTYSpectre>*
>(
_pointsControl[i].getRealPointer()->getAllUses());
334 std::map<TYUUID, LPTYSpectre>::iterator it;
335 for (it = compatibilityVector->begin(); it != compatibilityVector->end(); it++)
338 if (pCalc ==
nullptr)
349 compatibilityVector->clear();
351 compatibilityVector =
nullptr;
357 for (
unsigned int i = 0; i <
_maillages.size(); i++)
369 _listCalcul[j]->setNoiseMapSpectrums(pMaillage, *compatibilityVector);
374 compatibilityVector->clear();
376 compatibilityVector =
nullptr;
381 bool bCurrentCalculFound =
false;
387 bCurrentCalculFound =
true;
392 if (!bCurrentCalculFound && (
_listCalcul.size() > 0))
429 assert(pPointControl);
448 assert(pPointControl);
449 TYTabLPPointControl::iterator ite;
453 if ((*ite) == pPointControl)
456 for (
unsigned int i = 0; i < this->
_listCalcul.size(); i++)
515 TYTabLPCalcul::iterator ite;
519 if ((*ite) == pCalcul)
537 TYTabLPCalcul::iterator ite;
541 if ((*ite)->getID().toString() == idCalcul)
588 for (
unsigned int i = 0; i <
_maillages.size(); i++)
605 bool modified =
true;
614 pt.
_x = pPtControl->
_x;
615 pt.
_y = pPtControl->
_y;
624 pPtControl->
_z = pt.
_z;
641 bool bNoPbAlti =
true;
642 bool modified =
false;
652 bNoPbAlti &= modified;
659 for (
unsigned int i = 0; i <
_maillages.size(); i++)
683 pCalculCopy->
deepCopy(pCalcul,
false);
702 QString idCalculRef = pCalculRef->
getID().toString();
703 QString idCalculNew = pCalculNew->
getID().toString();
713 QString idCalculRef = pCalculRef->
getID().toString();
714 QString idCalculNew = pCalculNew->
getID().toString();
716 for (
unsigned int i = 0; i <
_maillages.size(); i++)
718 dynamic_cast<TYMaillage*
>(
_maillages[i]->getElement())->duplicateEtat(idCalculRef, idCalculNew);
724 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
732 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
757 double delaunay = 0.0001;
810 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
818 assert(pMaillageGeoNode);
853 assert(pMaillageGeoNode);
857 for (
unsigned int i = 0; i <
_listCalcul.size(); i++)
863 TYTabMaillageGeoNode::iterator ite;
867 if ((*ite) == pMaillageGeoNode)
882 TYTabMaillageGeoNode::iterator ite;
886 if ((*ite)->getElement()->getID().toString() == idMaillage)
909 TYTabMaillageGeoNode::iterator ite;
925 for (
unsigned int i = 0; i <
getMaillages().size(); i++)
928 pMaillage->getGraphicObject()->update();
941 assert(pMaillageGeoNode);
944 bool modified =
true;
946 if (pMaillageGeoNode == NULL)
954 if (pMaillage == NULL)
963 bool bNoPbAlti =
true;
969 TYProgressManager::setMessage(
"Calcul des altitudes des points de maillage");
973 for (
unsigned int i = 0; i < tabpoint.size(); i++)
1000 tabpoint[i]->_x = pt._x;
1001 tabpoint[i]->_y = pt._y;
1002 tabpoint[i]->_z = pt._z;
1021 if (pMaillage->
isA(
"TYRectangularMaillage"))
1043 pMaillage->updateGraphicTree();
1061 for (j = 0; j < static_cast<int>(pInfra->
getListBatiment().size()); j++)
1071 for (j = 0; j < static_cast<int>(pInfra->
getListMachine().size()); j++)
1081 std::vector<OPoint3D> tabPts;
1083 for (i = 0; i < static_cast<int>(
getMaillages().size()); i++)
1093 tabPts.reserve(nbPtsCalcul);
1095 for (j = 0; (int)j < nbPtsCalcul; j++)
1098 tabPts.push_back(matrixMaillage * (*(pMaillage->
getPtsCalcul()[j])));
1103 for (j = 0; j < tabVolNodeGeoNode.size(); j++)
1105 OMatrix matrixVolNode = tabVolNodeGeoNode[j]->getMatrix();
1110 for (
int k = 0; k < nbPtsCalcul; k++)
1113 pt = matrixVolNode * tabPts[k];
1132 tabVolNodeGeoNode.clear();
1142 for (
unsigned int i = 0; i <
_maillages.size(); i++)
1156 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
3D frame with a point and 3 vectors.
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)
void setRepere(const ORepere3D &repere)
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.