34 #include "Tympan/core/config.h"
39 #define TR(id) OLocalizator::getString("OMessageManager", (id))
72 : _pProjet(NULL), _bEmpriseAsCrbNiv(false), _altiEmprise(0.0), _useTopoFile(0), _topoFileName(
""),
73 _meshFilePath(
""), _topoFileExtension(
""), _echelle(1.0f), _nbFaceInfra(0), _root(false),
74 _SIGType(
TYMPAN), _SIG_X(0.0), _SIG_Y(0.0), _SIG_OFFSET(0.0), _isTopoFileModified(false)
134 if (TYElement::operator!=(other))
254 for (
unsigned int i = 0; i < pOtherSite->
_listSiteNode.size(); i++)
287 QDir xmlFileDir = QDir(xmlFile.left(xmlFile.lastIndexOf(
'/')));
288 if (xmlFileDir.exists())
328 bool echelleOk =
false;
331 bool topoFileOk =
false;
332 bool meshFileOk =
false;
333 bool empriseAsCrbNivOk =
false;
334 bool altiEmpriseOk =
false;
335 bool useTopoFileOk =
false;
338 QDomNodeList childs = domElement.childNodes();
339 unsigned int childcount = childs.length();
340 for (
unsigned int i = 0; i < childcount; i++)
342 elemCur = childs.item(i).toElement();
362 bool repereOk =
false;
363 bool SIG_XOk =
false;
364 bool SIG_YOk =
false;
365 bool SIG_OFFSETOk =
false;
372 for (
unsigned int i = 0; i < childs.length(); i++)
374 elemCur = childs.item(i).toElement();
400 const QString meshFileNorm = QDir::fromNativeSeparators(meshFile);
406 if (!saved.isEmpty())
408 const QFileInfo sfi(saved);
409 const bool savedIsDir = sfi.isDir();
410 const QString candidate = savedIsDir ? sfi.absoluteFilePath() : sfi.absolutePath();
411 const bool candidateExists = QDir(candidate).exists();
420 const QFileInfo mfi(meshFileNorm);
421 const bool isAbs = mfi.isAbsolute();
426 else if (!xmlDir.isEmpty())
436 std::deque<OPoint3D> points;
437 std::deque<OTriangle> triangles;
438 std::deque<LPTYSol> materials;
440 logger->
debug(
"[DBG][fromXML] Appel readMesh(...) avec _meshFilePath = %s",
444 logger->
debug(
"[DBG][fromXML] readMesh terminé: points=%zu, triangles=%zu, materials=%zu",
445 points.size(), triangles.size(), materials.size());
454 logger->
debug(
"[DBG][fromXML] Echec readMesh(...) avec _meshFilePath = %s",
464 logger->
info(
"[DBG][fromXML] meshFileOk=false -> pas de lecture");
551 for (
int i = 0; i < childs.size(); i++)
553 childs[i]->updateCurrentCalcul(listID, recursif);
593 if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
595 logger.
error(
"Erreur durant l'ouverture du fichier %s", qUtf8Printable(
_topoFileName));
600 QByteArray buffer = file.readAll();
606 if (buffer.isEmpty())
608 logger.
error(
"Erreur durant la lecture du fichier %s", qUtf8Printable(
_topoFileName));
613 const char* data = buffer.constData();
614 size_t dataSize = buffer.size();
630 std::ostringstream msg;
639 msg << boost::diagnostic_information(exc);
640 logger.
error(
"An error prevented to update the altimetry (set log level to debug for diagnostic)");
641 logger.
debug(msg.str().c_str());
653 logger.
info(
"Mise a jour altimetrie...");
658 QTemporaryFile current_project;
659 current_project.setFileTemplate(QDir::tempPath() + QString(
"/XXXXXX.xml"));
665 "Creation de fichier temporaire impossible. Veuillez verifier l'espace disque disponible.");
674 std::ostringstream msg;
675 msg << boost::diagnostic_information(exc);
676 logger.
error(
"Impossible d'exporter le projet courant pour calculer l'altimetrie.");
682 logger.
debug(
"Le calcul va s'executer en mode debug.\nLes fichiers temporaires ne seront pas "
683 "supprimes une fois le calcul termine.\nProjet courant non calcule: %s Projet avec les "
684 "resultats du calcul: %s.",
685 current_project.fileName().toStdString().c_str());
692 QString absolute_pyscript_path(QCoreApplication::applicationDirPath());
693 absolute_pyscript_path.append(
"/");
694 absolute_pyscript_path.append(ALTIMETRY_PYSCRIPT);
695 args << absolute_pyscript_path << current_project.fileName() << resultMeshFilePath;
699 QRegularExpression altimetry_size_criterion_reg(
"(MeshElementSizeMax\\s?=\\s?)([0-9]+.[0-9]*)");
700 QRegularExpression altimetry_refine_mesh_reg(
"(RefineMesh\\s?=\\s?)(True|False)");
701 QRegularExpression altimetry_use_volumes_landtakes_reg(
"(UseVolumesLandtake\\s?=\\s?)(True|False)");
702 QRegularExpressionMatch match_size = altimetry_size_criterion_reg.match(parameters);
703 QRegularExpressionMatch match_refi = altimetry_refine_mesh_reg.match(parameters);
704 QRegularExpressionMatch match_land = altimetry_use_volumes_landtakes_reg.match(parameters);
705 if (match_size.hasMatch() && match_refi.hasMatch() && match_land.hasMatch())
707 QString altimetry_size_criterion = match_size.captured(2);
708 QString altimetry_refine_mesh = match_refi.captured(2);
709 QString altimetry_use_volumes_landtakes = match_land.captured(2);
710 args << altimetry_size_criterion << altimetry_refine_mesh << altimetry_use_volumes_landtakes;
713 logger.
info(
"Lancement d'un sous-processus python pour calculer l'altimetrie avec le script: %s",
714 absolute_pyscript_path.toStdString().c_str());
715 std::string error_msg;
716 if (!
python(args, error_msg))
718 logger.
error(
"Echec du calcul de l'altimetrie: %s", error_msg.c_str());
722 std::deque<OPoint3D> points;
723 std::deque<OTriangle> triangles;
724 std::deque<LPTYSol> materials;
725 readMesh(points, triangles, materials, resultMeshFilePath);
735 std::deque<LPTYSol>& materials,
const QString& meshFilePath)
742 char* saved_locale = setlocale(LC_NUMERIC,
"C");
747 logger.
error(
"Echec d'ouverture du fichier ply : %s", qUtf8Printable(meshFilePath));
750 logger.
debug(
"Ouverture du fichier ply reussie : %s", qUtf8Printable(meshFilePath));
753 setlocale(LC_NUMERIC, saved_locale);
755 triangles = reader.
faces();
756 std::deque<std::string> material_ids = reader.
materials();
764 TYSol* ground =
nullptr;
765 for (
int i = 0; i < material_ids.size(); i++)
770 materials.push_back(ground);
775 "Unknown material retrieved from altimetry mesh: id = %s. Using default material instead",
776 material_ids[i].c_str());
789 bool modified =
false;
791 unsigned int i = 0, j = 0;
793 bool bNoPbAlti =
true;
823 for (i = 0; i < pResTrans->
getTabPoint().size(); i++)
881 double hauteur = pMachineGeoNode->
getHauteur();
908 pt = matrix * *pSrc->
getPos();
938 for (i = 0; i < pCrsEau->
getTabPoint().size(); i++)
1032 double delaunay(0.0001);
1044 delaunay = delaunay <= 0.0 ? 0.0001 : delaunay;
1045 return delaunay > 0.05 ? 0.05 : delaunay;
1057 std::vector<std::pair<int, int>>& indices,
1058 std::vector<int>& etages)
const
1061 file.open(
"logsChargement.txt", std::ios::out | std::ios::trunc);
1062 file <<
"Chargement de la liste des faces." << std::endl;
1066 unsigned int j = 0, i = 0;
1067 int compteurFace = 0;
1068 int compteurInfra = 0;
1076 file <<
"Chargement du batiment " << i << std::endl;
1095 for (
unsigned int k = 0; k < pEtage->
getTabMur().size(); k++)
1101 file <<
"Récupération d'un mur rectangulaire." << std::endl;
1107 file <<
"Récupération d'un rectangle." << std::endl;
1108 file <<
"Ajout de la face " << compteurFace <<
", etage " << j
1109 <<
", batiment " << i << std::endl;
1112 tabTmp.push_back(newNode);
1113 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1114 etages.push_back(j);
1123 tabTmp.push_back(newNode);
1124 indices.push_back(std::pair<int, int>(compteurFace++, (
int)i));
1125 etages.push_back(j);
1135 tabTmp2 = pEcran->acousticFaces();
1136 for (
unsigned k = 0; k < tabTmp2.size(); k++)
1138 tabTmp2[k]->setMatrix(matriceEtage * tabTmp2[k]->getMatrix());
1139 tabTmp.push_back(tabTmp2[k]);
1140 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1141 etages.push_back(j);
1148 bool bEtageEcran =
false;
1162 bool bEcran =
false;
1170 for (j = 0; j < tabTmp.size(); j++)
1173 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1176 tabFaces.push_back(tabTmp[j]);
1204 for (j = 0; j < tabTmp.size(); j++)
1207 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1210 tabFaces.push_back(tabTmp[j]);
1211 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1213 etages.push_back(0);
1220 static_cast<uint32>(tabFaces.size());
1234 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1236 for (i = 0; i < nbFacesAlti; i++)
1239 pAccPolygon->setParent(pAlti);
1242 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1246 tabFaces.push_back(pNode);
1247 indices.push_back(std::pair<int, int>(compteurFace++, -1));
1248 etages.push_back(-1);
1259 while (rootsite !=
nullptr && !rootsite->
getRoot())
1263 if (rootsite !=
nullptr)
1275 if (parentsite ==
nullptr)
1294 return abs(a - b) < abs(precision);
1298 std::map<
TYUUID, std::deque<TYTabPoint3D>>& contours)
const
1301 for (
unsigned int i = 0; i < volumes.size(); i++)
1303 OMatrix matrix = volumes[i]->getMatrix();
1304 matrix = global_matrix * matrix;
1306 assert(volume !=
nullptr &&
1307 "found an object which isn't a TYAcousticVolume in a TYTabAcousticVolumeGeoNode");
1311 for (
unsigned int j = 0; j < faces.size(); j++)
1314 OMatrix face_matrix = matrix * faces[j]->getMatrix();
1321 for (
unsigned int k = 0; k < contour.size(); k++)
1323 contour[k] = face_matrix * contour[k];
1334 if (contour[0]._z < tol)
1336 contours[volume->
getID()].push_back(contour);
1344 assert(contours.empty() &&
1345 "Output argument 'contours' is supposed to be empty when calling 'TYSiteNode::getFacesOnGround'");
1352 if (gBatiment->getHauteur() != 0)
1361 assert(pBuilding !=
nullptr &&
1362 "found an object which is not a TYBatiment in _pInfrastructure->getListBatiment()");
1368 matrix.
_m[2][3] = 0.0;
1374 std::deque<TYTabPoint3D> base_faces;
1396 assert(pMachine !=
nullptr &&
1397 "found an object which is not a TYMachine in _pInfrastructure->getListMachine()");
1402 matrix.
_m[2][3] = 0.0;
1405 std::deque<TYTabPoint3D> base_faces;
1418 unsigned int j = 0, i = 0;
1440 bool bEtageEcran =
false;
1454 for (j = 0; j < tabTmp.size(); j++)
1457 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1460 tabFaces.push_back(tabTmp[j]);
1486 for (j = 0; j < tabTmp.size(); j++)
1489 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1492 tabFaces.push_back(tabTmp[j]);
1499 static_cast<uint32>(tabFaces.size());
1508 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1510 for (i = 0; i < nbFacesAlti; i++)
1516 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1520 tabFaces.push_back(pNode);
1529 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
1555 for (
unsigned int j = 0; j < tabChild.size(); j++)
1557 tabChild[j]->setMatrix(matrix * tabChild[j]->getMatrix());
1561 sites.insert(sites.end(), tabChild.begin(), tabChild.end());
1573 if (pSource !=
nullptr)
1578 if (pLine !=
nullptr)
1588 if (pVolNode !=
nullptr)
1594 if (pSite !=
nullptr)
1636 assert(pSiteNodeGeoNode);
1650 pSite->updateGraphicTree();
1664 assert(pSiteNodeGeoNode);
1666 TYTabSiteNodeGeoNode::iterator ite;
1670 if ((*ite) == pSiteNodeGeoNode)
1693 TYTabSiteNodeGeoNode::iterator ite;
1719 TYTabSiteNodeGeoNode::iterator ite;
1745 TYTabSiteNodeGeoNode::iterator ite;
1825 newMatrix = matrix * pTopoFrom->
getListCrbNiv()[i]->getMatrix();
1831 newMatrix = matrix * pTopoFrom->
getListTerrain()[i]->getMatrix();
1837 newMatrix = matrix * pTopoFrom->
getListCrsEau()[i]->getMatrix();
1843 newMatrix = matrix * pTopoFrom->
getListPlanEau()[i]->getMatrix();
1852 for (i = 0; i < pInfraFrom->getListRoute().size(); i++)
1854 newMatrix = matrix * pInfraFrom->getListRoute()[i]->getMatrix();
1855 pInfraTo->addRoute(
new TYRouteGeoNode(pInfraFrom->getListRoute()[i]->getElement(), newMatrix));
1876 newMatrix = matrix * pInfraFrom->
getListMachine()[i]->getMatrix();
1883 for (i = 0; i < pInfraFrom->
getSrcs().size(); i++)
1885 newMatrix = matrix * pInfraFrom->
getSrcs()[i]->getMatrix();
1893 ofs <<
getName().toLatin1().data() <<
'\n';
1901 for (
int i = 0; i < childs.size(); i++)
1905 if (pSite !=
nullptr)
1908 ofs << pElement->
getName().toLatin1().data() <<
'\n';
1912 if (pVolNode !=
nullptr)
1918 if (pAcLine !=
nullptr)
1920 pAcLine->exportCSV(ofs);
1924 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)
std::vector< bool > EstUnIndexDeFaceEcran
bool almost_equal(double a, double b, double precision)
TY_EXTENSION_INST(TYSiteNode)
TY_EXT_GRAPHIC_INST(TYSiteNode)
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.
double _m[4][4]
The 4x4 matrix array.
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
void setIsUpToDate(bool isUpToDate)
TYTabLPPolygon & getListFaces()
TYElement * getParent() const
virtual bool isInCurrentCalcul()
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
static void setIsSavedOk(const bool &toSave)
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.
TYElement * getElement() const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
OMatrix getMatrix() const
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
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)
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)
bool readMesh(std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, std::deque< LPTYSol > &materials, const QString &meshFilePath)
virtual void do_updateAltimetrie(QString resultMeshFilePath)
virtual bool remFromCalcul()
LPTYTopographie _pTopographie
Topographie.
void setEmprise(TYTabPoint points)
QString _topoFile
Nom du fichier de topographie temporaire.
virtual void setChildsNotInCurrentCalcul()
void setTopoFileName(const QString &name)
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
bool remSiteNode(const LPTYSiteNodeGeoNode pSiteNodeGeoNode)
LPTYInfrastructure getInfrastructure()
LPTYInfrastructure _pInfrastructure
Infrastructure.
QString _topoFileName
Nom du fichier de topographie (image de fond)
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.
const QString & getMeshFilePath()
TYTabSiteNodeGeoNode _listSiteNode
Liste des sites.
TYPoint _position
Position.
QString _meshFilePath
Chemin vers le fichier PLY d'altimétrie.
bool _useTopoFile
Flag d'utilisation d'une image de fond.
QString _topoFileExtension
Extension du fichier de topographie.
virtual void updateAcoustique(const bool &force=false)
void setMeshFilePath(const QString &path)
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
static const QString & getTopoFilePath()
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.
TYSegment _orientation
Orientation du Nord.
bool addSiteNode(LPTYSiteNodeGeoNode pSiteNodeGeoNode)
virtual TYSiteNode & operator=(const TYSiteNode &other)
Operateur =.
virtual bool updateAltimetrie(QString resultMeshFilePath)
static void setTopoFilePath(const QString &path)
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
bool getUseEmpriseAsCrbNiv() const
virtual void updateAltiInfra()
void groundBasedFaces(const TYTabAcousticVolumeGeoNode &volumes, const OMatrix &global_matrix, std::map< TYUUID, std::deque< TYTabPoint3D >> &contours) const
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 ==.
static QString _topoFilePath
Chemin du dossier image temporaire.
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()
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.
static FILE * openFileForReading(const QString &filename)
#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)
Launch a Python subprocess and wait for it using a non-blocking UI loop.
bool must_keep_tmp_files()
Tell whether temporary files should be preserved (debug mode).
bool init_tmp_file(QTemporaryFile &tmp_file, bool keep_file)
Create and initialize a QTemporaryFile according to the current policy.
Utilities to interact with Python subprocesses from the Tympan application.
Utilities to load a project and a solver.