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",
684 current_project.fileName().toStdString().c_str());
691 QString absolute_pyscript_path(QCoreApplication::applicationDirPath());
692 absolute_pyscript_path.append(
"/");
693 absolute_pyscript_path.append(ALTIMETRY_PYSCRIPT);
694 args << absolute_pyscript_path << current_project.fileName() << resultMeshFilePath;
698 QRegularExpression altimetry_size_criterion_reg(
"(MeshElementSizeMax\\s?=\\s?)([0-9]+.[0-9]*)");
699 QRegularExpression altimetry_refine_mesh_reg(
"(RefineMesh\\s?=\\s?)(True|False)");
700 QRegularExpression altimetry_use_volumes_landtakes_reg(
"(UseVolumesLandtake\\s?=\\s?)(True|False)");
701 QRegularExpressionMatch match_size = altimetry_size_criterion_reg.match(parameters);
702 QRegularExpressionMatch match_refi = altimetry_refine_mesh_reg.match(parameters);
703 QRegularExpressionMatch match_land = altimetry_use_volumes_landtakes_reg.match(parameters);
704 if (match_size.hasMatch() && match_refi.hasMatch() && match_land.hasMatch())
706 QString altimetry_size_criterion = match_size.captured(2);
707 QString altimetry_refine_mesh = match_refi.captured(2);
708 QString altimetry_use_volumes_landtakes = match_land.captured(2);
709 args << altimetry_size_criterion << altimetry_refine_mesh << altimetry_use_volumes_landtakes;
712 logger.
info(
"Lancement d'un sous-processus python pour calculer l'altimetrie avec le script: %s",
713 absolute_pyscript_path.toStdString().c_str());
714 std::string error_msg;
715 if (!
python(args, error_msg))
717 logger.
error(
"Echec du calcul de l'altimetrie: %s", error_msg.c_str());
721 std::deque<OPoint3D> points;
722 std::deque<OTriangle> triangles;
723 std::deque<LPTYSol> materials;
724 readMesh(points, triangles, materials, resultMeshFilePath);
734 std::deque<LPTYSol>& materials,
const QString& meshFilePath)
741 char* saved_locale = setlocale(LC_NUMERIC,
"C");
746 logger.
error(
"Echec d'ouverture du fichier ply : %s", qUtf8Printable(meshFilePath));
749 logger.
debug(
"Ouverture du fichier ply reussie : %s", qUtf8Printable(meshFilePath));
752 setlocale(LC_NUMERIC, saved_locale);
754 triangles = reader.
faces();
755 std::deque<std::string> material_ids = reader.
materials();
763 TYSol* ground =
nullptr;
764 for (
int i = 0; i < material_ids.size(); i++)
769 materials.push_back(ground);
774 "Unknown material retrieved from altimetry mesh: id = %s. Using default material instead",
775 material_ids[i].c_str());
843 bool modified =
false;
845 unsigned int i = 0, j = 0;
847 bool bNoPbAlti =
true;
877 for (i = 0; i < pResTrans->
getTabPoint().size(); i++)
935 double hauteur = pMachineGeoNode->
getHauteur();
962 pt = matrix * *pSrc->
getPos();
992 for (i = 0; i < pCrsEau->
getTabPoint().size(); i++)
1086 double delaunay(0.0001);
1098 delaunay = delaunay <= 0.0 ? 0.0001 : delaunay;
1099 return delaunay > 0.05 ? 0.05 : delaunay;
1111 std::vector<std::pair<int, int>>& indices,
1112 std::vector<int>& etages)
const
1115 file.open(
"logsChargement.txt", std::ios::out | std::ios::trunc);
1116 file <<
"Chargement de la liste des faces." << std::endl;
1120 unsigned int j = 0, i = 0;
1121 int compteurFace = 0;
1122 int compteurInfra = 0;
1130 file <<
"Chargement du batiment " << i << std::endl;
1149 for (
unsigned int k = 0; k < pEtage->
getTabMur().size(); k++)
1155 file <<
"Récupération d'un mur rectangulaire." << std::endl;
1161 file <<
"Récupération d'un rectangle." << std::endl;
1162 file <<
"Ajout de la face " << compteurFace <<
", etage " << j
1163 <<
", batiment " << i << std::endl;
1166 tabTmp.push_back(newNode);
1167 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1168 etages.push_back(j);
1177 tabTmp.push_back(newNode);
1178 indices.push_back(std::pair<int, int>(compteurFace++, (
int)i));
1179 etages.push_back(j);
1189 tabTmp2 = pEcran->acousticFaces();
1190 for (
unsigned k = 0; k < tabTmp2.size(); k++)
1192 tabTmp2[k]->setMatrix(matriceEtage * tabTmp2[k]->getMatrix());
1193 tabTmp.push_back(tabTmp2[k]);
1194 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1195 etages.push_back(j);
1202 bool bEtageEcran =
false;
1216 bool bEcran =
false;
1224 for (j = 0; j < tabTmp.size(); j++)
1227 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1230 tabFaces.push_back(tabTmp[j]);
1258 for (j = 0; j < tabTmp.size(); j++)
1261 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1264 tabFaces.push_back(tabTmp[j]);
1265 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1267 etages.push_back(0);
1274 static_cast<uint32>(tabFaces.size());
1288 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1290 for (i = 0; i < nbFacesAlti; i++)
1293 pAccPolygon->setParent(pAlti);
1296 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1300 tabFaces.push_back(pNode);
1301 indices.push_back(std::pair<int, int>(compteurFace++, -1));
1302 etages.push_back(-1);
1313 while (rootsite !=
nullptr && !rootsite->
getRoot())
1317 if (rootsite !=
nullptr)
1329 if (parentsite ==
nullptr)
1348 return abs(a - b) < abs(precision);
1352 std::map<
TYUUID, std::deque<TYTabPoint3D>>& contours)
const
1355 for (
unsigned int i = 0; i < volumes.size(); i++)
1357 OMatrix matrix = volumes[i]->getMatrix();
1358 matrix = global_matrix * matrix;
1360 assert(volume !=
nullptr &&
1361 "found an object which isn't a TYAcousticVolume in a TYTabAcousticVolumeGeoNode");
1365 for (
unsigned int j = 0; j < faces.size(); j++)
1368 OMatrix face_matrix = matrix * faces[j]->getMatrix();
1375 for (
unsigned int k = 0; k < contour.size(); k++)
1377 contour[k] = face_matrix * contour[k];
1388 if (contour[0]._z < tol)
1390 contours[volume->
getID()].push_back(contour);
1398 assert(contours.empty() &&
1399 "Output argument 'contours' is supposed to be empty when calling 'TYSiteNode::getFacesOnGround'");
1406 if (gBatiment->getHauteur() != 0)
1415 assert(pBuilding !=
nullptr &&
1416 "found an object which is not a TYBatiment in _pInfrastructure->getListBatiment()");
1422 matrix.
_m[2][3] = 0.0;
1428 std::deque<TYTabPoint3D> base_faces;
1450 assert(pMachine !=
nullptr &&
1451 "found an object which is not a TYMachine in _pInfrastructure->getListMachine()");
1456 matrix.
_m[2][3] = 0.0;
1459 std::deque<TYTabPoint3D> base_faces;
1472 unsigned int j = 0, i = 0;
1494 bool bEtageEcran =
false;
1508 for (j = 0; j < tabTmp.size(); j++)
1511 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1514 tabFaces.push_back(tabTmp[j]);
1540 for (j = 0; j < tabTmp.size(); j++)
1543 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1546 tabFaces.push_back(tabTmp[j]);
1553 static_cast<uint32>(tabFaces.size());
1562 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1564 for (i = 0; i < nbFacesAlti; i++)
1570 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1574 tabFaces.push_back(pNode);
1583 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
1609 for (
unsigned int j = 0; j < tabChild.size(); j++)
1611 tabChild[j]->setMatrix(matrix * tabChild[j]->getMatrix());
1615 sites.insert(sites.end(), tabChild.begin(), tabChild.end());
1627 if (pSource !=
nullptr)
1632 if (pLine !=
nullptr)
1642 if (pVolNode !=
nullptr)
1648 if (pSite !=
nullptr)
1690 assert(pSiteNodeGeoNode);
1704 pSite->updateGraphicTree();
1718 assert(pSiteNodeGeoNode);
1720 TYTabSiteNodeGeoNode::iterator ite;
1724 if ((*ite) == pSiteNodeGeoNode)
1747 TYTabSiteNodeGeoNode::iterator ite;
1773 TYTabSiteNodeGeoNode::iterator ite;
1799 TYTabSiteNodeGeoNode::iterator ite;
1879 newMatrix = matrix * pTopoFrom->
getListCrbNiv()[i]->getMatrix();
1885 newMatrix = matrix * pTopoFrom->
getListTerrain()[i]->getMatrix();
1891 newMatrix = matrix * pTopoFrom->
getListCrsEau()[i]->getMatrix();
1897 newMatrix = matrix * pTopoFrom->
getListPlanEau()[i]->getMatrix();
1906 for (i = 0; i < pInfraFrom->getListRoute().size(); i++)
1908 newMatrix = matrix * pInfraFrom->getListRoute()[i]->getMatrix();
1909 pInfraTo->addRoute(
new TYRouteGeoNode(pInfraFrom->getListRoute()[i]->getElement(), newMatrix));
1930 newMatrix = matrix * pInfraFrom->
getListMachine()[i]->getMatrix();
1937 for (i = 0; i < pInfraFrom->
getSrcs().size(); i++)
1939 newMatrix = matrix * pInfraFrom->
getSrcs()[i]->getMatrix();
1947 ofs <<
getName().toLatin1().data() <<
'\n';
1955 for (
int i = 0; i < childs.size(); i++)
1959 if (pSite !=
nullptr)
1962 ofs << pElement->
getName().toLatin1().data() <<
'\n';
1966 if (pVolNode !=
nullptr)
1972 if (pAcLine !=
nullptr)
1974 pAcLine->exportCSV(ofs);
1978 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.
std::vector< LPTYCourbeNiveauGeoNode > TYTabCourbeNiveauGeoNode
Collection de noeuds geometriques de type TYCourbeNiveau.
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.
std::vector< LPTYPlanEauGeoNode > TYTabPlanEauGeoNode
Collection de noeuds geometriques 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()
bool isInSelection(TYUUID id)
Tests if the element is present in the selection of this Calculation.
bool addToSelection(TYUUID id)
Adds the item to the selection of this Calculation.
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 selectCourbeNiveauAndPlanEau()
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()
virtual void getChilds(LPTYElementArray &childs, bool recursif=true)
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.