35 #include "Tympan/core/config.h"
40 #define TR(id) OLocalizator::getString("OMessageManager", (id))
75 : _pProjet(NULL), _bEmpriseAsCrbNiv(false), _altiEmprise(0.0), _useTopoFile(0), _topoFileName(
""),
76 _topoFileExtension(
""), _echelle(1.0f), _nbFaceInfra(0), _root(false), _SIGType(
TYMPAN), _SIG_X(0.0),
77 _SIG_Y(0.0), _SIG_OFFSET(0.0), _isTopoFileModified(false)
136 if (TYElement::operator!=(other))
251 for (
unsigned int i = 0; i < pOtherSite->
_listSiteNode.size(); i++)
283 QDir xmlFileDir = QDir(xmlFile.left(xmlFile.lastIndexOf(
'/')));
284 if (xmlFileDir.exists())
287 domNewElem,
"topoFile",
288 xmlFileDir.relativeFilePath(QString(
_topoFileName.c_str())).toLatin1().constData());
322 bool echelleOk =
false;
324 bool topoFileOk =
false;
325 bool empriseAsCrbNivOk =
false;
326 bool altiEmpriseOk =
false;
327 bool useTopoFileOk =
false;
330 QDomNodeList childs = domElement.childNodes();
331 unsigned int childcount = childs.length();
332 for (
unsigned int i = 0; i < childcount; i++)
334 elemCur = childs.item(i).toElement();
353 bool repereOk =
false;
354 bool SIG_XOk =
false;
355 bool SIG_YOk =
false;
356 bool SIG_OFFSETOk =
false;
363 for (
unsigned int i = 0; i < childs.length(); i++)
365 elemCur = childs.item(i).toElement();
469 for (
int i = 0; i < childs.size(); i++)
471 childs[i]->updateCurrentCalcul(listID, recursif);
506 FILE* streamSrc = NULL;
508 char* buffer =
nullptr;
522 fseek(streamSrc, 0, SEEK_END);
523 lSize = ftell(streamSrc);
527 buffer = (
char*)malloc(
sizeof(
char) * lSize);
530 logger.
error(
"Impossible d'allouer la mémoire au buffer durant la lecture du fichier %s",
536 result = fread(buffer, 1, lSize, streamSrc);
578 msg << boost::diagnostic_information(exc);
579 logger.
error(
"An error prevented to update the altimetry (set log level to debug for diagnostic)");
580 logger.
debug(msg.str().c_str());
592 logger.
info(
"Mise a jour altimetrie...");
597 QTemporaryFile current_project;
598 current_project.setFileTemplate(QDir::tempPath() + QString(
"/XXXXXX.xml"));
601 QTemporaryFile result_mesh;
602 result_mesh.setFileTemplate(QDir::tempPath() + QString(
"/XXXXXX.ply"));
606 "Creation de fichier temporaire impossible. Veuillez verifier l'espace disque disponible.");
615 std::ostringstream msg;
616 msg << boost::diagnostic_information(exc);
617 logger.
error(
"Impossible d'exporter le projet courant pour calculer l'altimetrie.");
623 logger.
debug(
"Le calcul va s'executer en mode debug.\nLes fichiers temporaires ne seront pas "
624 "supprimes une fois le calcul termine.\nProjet courant non calcule: %s Projet avec les "
625 "resultats du calcul: %s.",
626 current_project.fileName().toStdString().c_str(),
627 result_mesh.fileName().toStdString().c_str());
634 QString absolute_pyscript_path(QCoreApplication::applicationDirPath());
635 absolute_pyscript_path.append(
"/");
636 absolute_pyscript_path.append(ALTIMETRY_PYSCRIPT);
637 args << absolute_pyscript_path << current_project.fileName() << result_mesh.fileName();
641 QRegExp altimetry_size_criterion_reg(
"(MeshElementSizeMax\\s?=\\s?)([0-9]+.[0-9]*)");
642 QRegExp altimetry_refine_mesh_reg(
"(RefineMesh\\s?=\\s?)(True|False)");
643 QRegExp altimetry_use_volumes_landtakes_reg(
"(UseVolumesLandtake\\s?=\\s?)(True|False)");
644 int pos_size = altimetry_size_criterion_reg.indexIn(parameters);
645 int pos_refi = altimetry_refine_mesh_reg.indexIn(parameters);
646 int pos_land = altimetry_use_volumes_landtakes_reg.indexIn(parameters);
647 if (pos_size > -1 && pos_refi > -1 && pos_land > -1)
649 QString altimetry_size_criterion = altimetry_size_criterion_reg.cap(2);
650 QString altimetry_refine_mesh = altimetry_refine_mesh_reg.cap(2);
651 QString altimetry_use_volumes_landtakes = altimetry_use_volumes_landtakes_reg.cap(2);
652 args << altimetry_size_criterion << altimetry_refine_mesh << altimetry_use_volumes_landtakes;
655 logger.
info(
"Lancement d'un sous-processus python pour calculer l'altimetrie avec le script: %s",
656 absolute_pyscript_path.toStdString().c_str());
658 if (!
python(args, error_msg))
660 logger.
error(
"Echec du calcul de l'altimetrie: %s", error_msg.c_str());
664 std::deque<OPoint3D> points;
665 std::deque<OTriangle> triangles;
666 std::deque<LPTYSol> materials;
667 readMesh(points, triangles, materials, result_mesh.fileName());
675 std::deque<LPTYSol>& materials,
const QString& filename)
682 char* saved_locale = setlocale(LC_NUMERIC,
"C");
685 setlocale(LC_NUMERIC, saved_locale);
687 triangles = reader.
faces();
688 std::deque<std::string> material_ids = reader.
materials();
695 TYSol* ground =
nullptr;
696 for (
int i = 0; i < material_ids.size(); i++)
701 materials.push_back(ground);
706 "Unknown material retrieved from altimetry mesh: id = %s. Using default material instead",
707 material_ids[i].c_str());
720 bool modified =
false;
722 unsigned int i = 0, j = 0;
732 TYProgressManager::setMessage(
"Mise a jour de l'altimetrie des infrastructures");
737 bool bNoPbAlti =
true;
781 for (i = 0; i < pResTrans->
getTabPoint().size(); i++)
855 double hauteur = pMachineGeoNode->
getHauteur();
890 pt = matrix * *pSrc->
getPos();
928 for (i = 0; i < pCrsEau->
getTabPoint().size(); i++)
1034 double delaunay(0.0001);
1046 delaunay = delaunay <= 0.0 ? 0.0001 : delaunay;
1047 return delaunay > 0.05 ? 0.05 : delaunay;
1059 std::vector<std::pair<int, int>>& indices,
1060 std::vector<int>& etages)
const
1063 file.open(
"logsChargement.txt", ios::out | ios::trunc);
1064 file <<
"Chargement de la liste des faces." << endl;
1068 unsigned int j = 0, i = 0;
1069 int compteurFace = 0;
1070 int compteurInfra = 0;
1078 file <<
"Chargement du batiment " << i << endl;
1097 for (
unsigned int k = 0; k < pEtage->
getTabMur().size(); k++)
1103 file <<
"Récupération d'un mur rectangulaire." << endl;
1109 file <<
"Récupération d'un rectangle." << endl;
1110 file <<
"Ajout de la face " << compteurFace <<
", etage " << j
1111 <<
", batiment " << i << endl;
1114 tabTmp.push_back(newNode);
1115 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1116 etages.push_back(j);
1125 tabTmp.push_back(newNode);
1126 indices.push_back(std::pair<int, int>(compteurFace++, (
int)i));
1127 etages.push_back(j);
1137 tabTmp2 = pEcran->acousticFaces();
1138 for (
unsigned k = 0; k < tabTmp2.size(); k++)
1140 tabTmp2[k]->setMatrix(matriceEtage * tabTmp2[k]->getMatrix());
1141 tabTmp.push_back(tabTmp2[k]);
1142 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1143 etages.push_back(j);
1150 bool bEtageEcran =
false;
1164 bool bEcran =
false;
1172 for (j = 0; j < tabTmp.size(); j++)
1175 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1178 tabFaces.push_back(tabTmp[j]);
1206 for (j = 0; j < tabTmp.size(); j++)
1209 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1212 tabFaces.push_back(tabTmp[j]);
1213 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1215 etages.push_back(0);
1222 static_cast<uint32>(tabFaces.size());
1236 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1238 for (i = 0; i < nbFacesAlti; i++)
1241 pAccPolygon->setParent(pAlti);
1244 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1248 tabFaces.push_back(pNode);
1249 indices.push_back(std::pair<int, int>(compteurFace++, -1));
1250 etages.push_back(-1);
1261 while (rootsite !=
nullptr && !rootsite->
getRoot())
1265 if (rootsite !=
nullptr)
1277 if (parentsite ==
nullptr)
1296 return abs(a - b) < abs(precision);
1300 std::map<
TYUUID, std::deque<TYTabPoint3D>>& contours)
const
1303 for (
unsigned int i = 0; i < volumes.size(); i++)
1305 OMatrix matrix = volumes[i]->getMatrix();
1306 matrix = global_matrix * matrix;
1308 assert(volume !=
nullptr &&
1309 "found an object which isn't a TYAcousticVolume in a TYTabAcousticVolumeGeoNode");
1313 for (
unsigned int j = 0; j < faces.size(); j++)
1316 OMatrix face_matrix = matrix * faces[j]->getMatrix();
1317 faces[j]->setMatrix(face_matrix);
1324 for (
unsigned int k = 0; k < contour.size(); k++)
1326 contour[k] = face_matrix * contour[k];
1337 if (contour[0]._z < tol)
1339 contours[volume->
getID()].push_back(contour);
1347 assert(contours.empty() &&
1348 "Output argument 'contours' is supposed to be empty when calling 'TYSiteNode::getFacesOnGround'");
1355 if (gBatiment->getHauteur() != 0)
1363 OPoint3D position = gBatiment->position();
1365 gBatiment->setPosition(position);
1367 assert(pBuilding !=
nullptr &&
1368 "found an object which is not a TYBatiment in _pInfrastructure->getListBatiment()");
1378 std::deque<TYTabPoint3D> base_faces;
1403 assert(pMachine !=
nullptr &&
1404 "found an object which is not a TYMachine in _pInfrastructure->getListMachine()");
1410 std::deque<TYTabPoint3D> base_faces;
1423 unsigned int j = 0, i = 0;
1445 bool bEtageEcran =
false;
1459 for (j = 0; j < tabTmp.size(); j++)
1462 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1465 tabFaces.push_back(tabTmp[j]);
1491 for (j = 0; j < tabTmp.size(); j++)
1494 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1497 tabFaces.push_back(tabTmp[j]);
1504 static_cast<uint32>(tabFaces.size());
1513 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1515 for (i = 0; i < nbFacesAlti; i++)
1521 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1525 tabFaces.push_back(pNode);
1534 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
1560 for (
unsigned int j = 0; j < tabChild.size(); j++)
1562 tabChild[j]->setMatrix(matrix * tabChild[j]->getMatrix());
1566 sites.insert(sites.end(), tabChild.begin(), tabChild.end());
1578 if (pSource !=
nullptr)
1583 if (pLine !=
nullptr)
1593 if (pVolNode !=
nullptr)
1599 if (pSite !=
nullptr)
1641 assert(pSiteNodeGeoNode);
1654 pSite->updateGraphicTree();
1668 assert(pSiteNodeGeoNode);
1670 TYTabSiteNodeGeoNode::iterator ite;
1674 if ((*ite) == pSiteNodeGeoNode)
1697 TYTabSiteNodeGeoNode::iterator ite;
1723 TYTabSiteNodeGeoNode::iterator ite;
1749 TYTabSiteNodeGeoNode::iterator ite;
1829 newMatrix = matrix * pTopoFrom->
getListCrbNiv()[i]->getMatrix();
1835 newMatrix = matrix * pTopoFrom->
getListTerrain()[i]->getMatrix();
1841 newMatrix = matrix * pTopoFrom->
getListCrsEau()[i]->getMatrix();
1847 newMatrix = matrix * pTopoFrom->
getListPlanEau()[i]->getMatrix();
1856 for (i = 0; i < pInfraFrom->getListRoute().size(); i++)
1858 newMatrix = matrix * pInfraFrom->getListRoute()[i]->getMatrix();
1859 pInfraTo->addRoute(
new TYRouteGeoNode(pInfraFrom->getListRoute()[i]->getElement(), newMatrix));
1880 newMatrix = matrix * pInfraFrom->
getListMachine()[i]->getMatrix();
1887 for (i = 0; i < pInfraFrom->
getSrcs().size(); i++)
1889 newMatrix = matrix * pInfraFrom->
getSrcs()[i]->getMatrix();
1897 ofs <<
getName().toLatin1().data() <<
'\n';
1905 for (
int i = 0; i < childs.size(); i++)
1909 if (pSite !=
nullptr)
1912 ofs << pElement->
getName().toLatin1().data() <<
'\n';
1916 if (pVolNode !=
nullptr)
1922 if (pAcLine !=
nullptr)
1924 pAcLine->exportCSV(ofs);
1928 if (pSource !=
nullptr)
std::vector< LPTYAcousticFaceSetGeoNode > TYTabAcousticVolumeGeoNode
Collection de noeuds geometriques de type TYAcousticFaceSet.
TYGeometryNode TYAcousticSurfaceGeoNode
Noeud geometrique de type TYAcousticSurface.
std::vector< LPTYAcousticSurfaceGeoNode > TYTabAcousticSurfaceGeoNode
Collection de noeuds geometriques de type TYAcousticSurface.
SmartPtr< TYAcousticSurfaceGeoNode > LPTYAcousticSurfaceGeoNode
Smart Pointer sur TYAcousticSurfaceGeoNode.
TYGeometryNode TYBatimentGeoNode
Noeud geometrique de type TYBatiment.
TYGeometryNode TYCourbeNiveauGeoNode
Noeud geometrique de type TYCourbeNiveau.
TYGeometryNode TYCoursEauGeoNode
Noeud geometrique de type TYCoursEau.
std::deque< OPoint3D > TYTabPoint3D
Collection de OPoint3D.
std::vector< LPTYPolygon > TYTabLPPolygon
Collection de pointeurs de TYPolygon.
std::list< TYUUID > TYListID
Collection d'identifiants.
std::vector< LPTYElement > LPTYElementArray
#define TYDIRPREFERENCEMANAGER
TYGeometryNode TYMachineGeoNode
Noeud geometrique de type TYMachine.
TYGeometryNode TYPlanEauGeoNode
Noeud geometrique de type TYPlanEau.
TYGeometryNode TYReseauTransportGeoNode
Noeud geometrique de type TYReseauTransport.
TYGeometryNode TYRouteGeoNode
Geometrical node of type TYRoute.
Representation graphique d'un ensemble de sites (fichier header)
bool almost_equal(double a, double b, double precision)
TY_EXTENSION_INST(TYSiteNode)
TY_EXT_GRAPHIC_INST(TYSiteNode)
vector< bool > EstUnIndexDeFaceEcran
TYGeometryNode TYSiteNodeGeoNode
Noeud geometrique de type TYSiteNode.
std::vector< LPTYSiteNodeGeoNode > TYTabSiteNodeGeoNode
Collection de noeuds geometriques de type TYSiteNode.
TYGeometryNode TYSourcePonctuelleGeoNode
Noeud geometrique de type TYSourcePonctuelle.
TYGeometryNode TYTerrainGeoNode
Noeud geometrique de type TYTerrain.
Implementation details header for altimetry_reader.cpp.
double _z
z coordinate of OCoord3D
OMatrix getInvert(int *ok=0) const
Return the inverse matrix of this matrix.
virtual void debug(const char *message,...)
virtual void error(const char *message,...)
static OMessageManager * get()
virtual void info(const char *message,...)
virtual const char * getClassName() const
static OPrototype * safeDownCast(OPrototype *pObject)
OPoint3D _origin
The origin point.
double scalar(const OVector3D &vector) const
Performs the scalar product between this object and another vector.
T * _pObj
The real pointer, must derived IRefCount.
TYTabPoint & getTabPoint()
virtual bool updateAcoustic(const bool &force=false)
TYTabAcousticSurfaceGeoNode & getTabAcousticSurf()
virtual TYTabPoint3D getOContour(int n=-1) const
virtual TYTabAcousticSurfaceGeoNode acousticFaces()
virtual void exportCSV(std::ofstream &ofs)
Export au format csv sur un flux transmis.
virtual bool updateAcoustic(const bool &force=false)
LPTYAcousticVolume getAcousticVol(int index)
TYTabAcousticVolumeGeoNode & getTabAcousticVol()
virtual TYTabAcousticSurfaceGeoNode acousticFaces()
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 plugBackTriangulation(const std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const std::deque< LPTYSol > &materials)
plug back triangulation providfed by the TYTopographie
TYTabLPPolygon & getListFaces()
TYElement * getParent() const
virtual bool isInCurrentCalcul()
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
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 QString getName() const
TYElement * _pParent
Reference sur l'element parent.
virtual void updateCurrentCalcul(TYListID &listID, bool recursif=true)
virtual void setInCurrentCalcul(bool state, bool recurschild=true, bool recursparent=true)
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
void setParent(TYElement *pParent)
virtual int fromXML(DOM_Element domElement)
QString getStringID() const
static TYElement * getInstance(TYUUID uuid)
virtual void setIsGeometryModified(bool isModified)
void setacousticFacesPourCalcul(bool bPourCalculTrajet)
TYTabMurGeoNode & getTabMur()
const ORepere3D & getORepere3D() const
void setHauteur(const double &hauteur)
Set the heigth above the ground.
double getHauteur()
Get the height above the ground.
OPoint3D position()
Get the position of the element.
TYElement * getElement() const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
OMatrix getMatrix() const
void setPosition(const OPoint3D &pos)
Set the position of the element.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
TYTabBatimentGeoNode & getListBatiment()
bool addToCalcul(TYGeometryNode *pNode)
LPTYUserSourcePonctuelleGeoNode getSrc(int index)
LPTYMachineGeoNode getMachine(int index)
LPTYReseauTransport getResTrans(int index)
TYTabUserSourcePonctuelleGeoNode & getSrcs()
LPTYBatimentGeoNode getBatiment(int index)
TYTabReseauTransportGeoNode & getListResTrans()
virtual DOM_Element toXML(DOM_Element &domElement)
bool addBatiment(LPTYBatimentGeoNode pBatimentGeoNode)
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
bool addMachine(LPTYMachineGeoNode pMachineGeoNode)
bool addSrc(LPTYUserSourcePonctuelle pSrc)
bool updateAcoustic(const TYCalcul *pCalcul, const bool &force=false)
TYTabMachineGeoNode & getListMachine()
bool addResTrans(LPTYReseauTransportGeoNode pResTransGeoNode)
QString generateName(const char *classname)
Retourne le nom de la classe associe a un nombre.
void enable(bool enable)
Active la generation de nom.
static TYNameManager * get()
Retourne l'instance singleton.
virtual DOM_Element toXML(DOM_Element &domElement)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
const TYTabPoint & getPoints() const
virtual OVector3D normal() const
static void set(int totalSteps, int stepSize=1)
void remElmtFromCalculs(TYElement *pElement)
Supprime un element de tous les calculs.
bool updateAltiRecepteurs()
double getDelaunayTolerence()
LPTYCalcul getCurrentCalcul()
Set/Get du pointeur du Calcul courant.
double getHauteurMoyenne() const
virtual bool updateAltitudes(const TYAltimetrie &alti, LPTYRouteGeoNode pGeoNode, OMatrix globalMatrix)
Required the road to update its altitude after altimetry changed.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual DOM_Element toXML(DOM_Element &domElement)
TYTabSiteNodeGeoNode collectSites(bool include=true) const
const double getAltiEmprise() const
void setProjet(const LPTYProjet pProjet)
std::string _topoFileName
Nom du fichier de topographie.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
LPTYAltimetrie getAltimetry() const
void appendSite(LPTYSiteNode pSiteFrom, const OMatrix &matrix, LPTYSiteNode pSiteTo)
OMatrix getGlobalMatrix() const
LPTYTopographie getTopographie()
virtual void updateCurrentCalcul(TYListID &listID, bool recursif=true)
virtual void setIsGeometryModified(bool isModified)
virtual bool remFromCalcul()
LPTYTopographie _pTopographie
Topographie.
std::string _topoFile
Nom du fichier de topographie temporaire.
virtual void setChildsNotInCurrentCalcul()
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
bool remSiteNode(const LPTYSiteNodeGeoNode pSiteNodeGeoNode)
LPTYInfrastructure getInfrastructure()
LPTYInfrastructure _pInfrastructure
Infrastructure.
double _altiEmprise
Altitude associee a l'emprise (s'il y a lieu)
float _echelle
Echelle du site.
virtual int fromXML(DOM_Element domElement)
systemSIG _SIGType
Coordonnees SIG.
static std::string * _topoFilePath
Chemin du dossier image temporaire.
TYTabSiteNodeGeoNode _listSiteNode
Liste des sites.
TYPoint _position
Position.
bool _useTopoFile
Flag d'utilisation d'une image de fond.
virtual void updateAcoustique(const bool &force=false)
static void setTopoFilePath(const std::string &path)
static const std::string & getTopoFilePath()
void uuid2tysol(const std::deque< std::string > &material_ids, std::deque< LPTYSol > &materials)
void update(const bool &force=false)
bool _root
Test si site racine.
void getListFaces(TYTabAcousticSurfaceGeoNode &tabFaces, unsigned int &nbFaceInfra, std::vector< bool > &EstUnIndexDeFaceEcran) const
virtual DOM_Element toXML(DOM_Element &domElement)
TYTabSiteNodeGeoNode & getListSiteNode()
virtual std::string toString() const
LPTYSiteNodeGeoNode findSiteNode(const LPTYSiteNode pSiteNode)
LPTYProjet _pProjet
Projet auquel appartient (eventuellement) le site.
std::string _topoFileExtension
Extension du fichier de topographie.
virtual bool updateAltimetrie()
TYSegment _orientation
Orientation du Nord.
bool addSiteNode(LPTYSiteNodeGeoNode pSiteNodeGeoNode)
virtual TYSiteNode & operator=(const TYSiteNode &other)
Operateur =.
virtual void exportCSV(std::ofstream &ofs)
Export au format csv sur un flux transmis.
void getListFacesWithoutFloor(TYTabAcousticSurfaceGeoNode &tabFaces, unsigned int &nbFaceInfra, std::vector< bool > &EstUnIndexDeFaceEcran, std::vector< std::pair< int, int >> &indices, std::vector< int > &etages) const
void setTopoFileName(std::string name)
bool getUseEmpriseAsCrbNiv() const
virtual void updateAltiInfra()
void groundBasedFaces(const TYTabAcousticVolumeGeoNode &volumes, const OMatrix &global_matrix, std::map< TYUUID, std::deque< TYTabPoint3D >> &contours) const
void readMesh(std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, std::deque< LPTYSol > &materials, const QString &filename)
virtual bool addToCalcul()
void getFacesOnGround(std::map< TYUUID, std::deque< TYTabPoint3D >> &contours) const
bool _bEmpriseAsCrbNiv
Utilisation de l'emprise comme courbe de niveau.
virtual bool operator!=(const TYSiteNode &other) const
Operateur !=.
bool _isTopoFileModified
Flag de modification de l'image de fond.
virtual bool operator==(const TYSiteNode &other) const
Operateur ==.
virtual void do_updateAltimetrie()
virtual void setListPoints(const TYTabPoint &liste)
virtual TYTabPoint & getListPoints()
void setSol(const LPTYSol pSol)
TYTerrain * getDefTerrain()
virtual void setIsGeometryModified(bool isModified)
TYTabPlanEauGeoNode & getListPlanEau()
bool addCrsEau(LPTYCoursEauGeoNode pCoursEauGeoNode)
LPTYCoursEau getCrsEau(int index)
virtual DOM_Element toXML(DOM_Element &domElement)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
LPTYAltimetrie getAltimetrie()
void setDefTerrain(int defTerrainIdx)
void setDefTerrainIdx(const int &defTerrainIdx)
TYTabCoursEauGeoNode & getListCrsEau()
bool addCrbNiv(LPTYCourbeNiveauGeoNode pCrbNivGeoNode)
bool addPlanEau(LPTYPlanEauGeoNode pPlanEauGeoNode)
LPTYTerrain getTerrain(int index)
TYTabPoint & getEmprise()
void setEmprise(const TYTabPoint &pts, const bool &defTerrain=true)
TYTabCourbeNiveauGeoNode & getListCrbNiv()
bool addTerrain(LPTYTerrainGeoNode pTerGeoNode)
TYTabTerrainGeoNode & getListTerrain()
void sortTerrainsBySurface()
void exportCSV(std::ofstream &ofs)
Export au format csv sur un flux transmis.
static QString getSavedFileName()
read an Altimetry from a PLY file.
virtual const points_array_t & points() const
virtual void read()
read the file whose name was given at reader's construction time
virtual const materials_array_t & materials() const
Getter for the faces read.
virtual const faces_array_t & faces() const
Getter for the faces read.
#define tympan_source_loc
This macro build a source_loc object to be attached to a tympan::Exception.
void save_project(const char *filename, const LPTYProjet &project)
save a project into an XML file
The base exception class for all exceptions specific to Code_TYMPAN.
The base exception class for errors due to invalid data.
bool python(QStringList args, std::string &error_msg)
bool must_keep_tmp_files()
bool init_tmp_file(QTemporaryFile &tmp_file, bool keep_file)
Utilitaires pour les interactions entre l'application tympan et des sous- processus python.
Utilities to load a project and a solver.