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",
462 logger->
info(
"[DBG][fromXML] meshFileOk=false -> pas de lecture");
548 for (
int i = 0; i < childs.size(); i++)
550 childs[i]->updateCurrentCalcul(listID, recursif);
590 if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
592 logger.
error(
"Erreur durant l'ouverture du fichier %s", qUtf8Printable(
_topoFileName));
597 QByteArray buffer = file.readAll();
603 if (buffer.isEmpty())
605 logger.
error(
"Erreur durant la lecture du fichier %s", qUtf8Printable(
_topoFileName));
610 const char* data = buffer.constData();
611 size_t dataSize = buffer.size();
627 std::ostringstream msg;
636 msg << boost::diagnostic_information(exc);
637 logger.
error(
"An error prevented to update the altimetry (set log level to debug for diagnostic)");
638 logger.
debug(msg.str().c_str());
650 logger.
info(
"Mise a jour altimetrie...");
655 QTemporaryFile current_project;
656 current_project.setFileTemplate(QDir::tempPath() + QString(
"/XXXXXX.xml"));
662 "Creation de fichier temporaire impossible. Veuillez verifier l'espace disque disponible.");
671 std::ostringstream msg;
672 msg << boost::diagnostic_information(exc);
673 logger.
error(
"Impossible d'exporter le projet courant pour calculer l'altimetrie.");
679 logger.
debug(
"Le calcul va s'executer en mode debug.\nLes fichiers temporaires ne seront pas "
680 "supprimes une fois le calcul termine.\nProjet courant non calcule: %s Projet avec les "
681 "resultats du calcul: %s.",
682 current_project.fileName().toStdString().c_str());
689 QString absolute_pyscript_path(QCoreApplication::applicationDirPath());
690 absolute_pyscript_path.append(
"/");
691 absolute_pyscript_path.append(ALTIMETRY_PYSCRIPT);
692 args << absolute_pyscript_path << current_project.fileName() << resultMeshFilePath;
696 QRegularExpression altimetry_size_criterion_reg(
"(MeshElementSizeMax\\s?=\\s?)([0-9]+.[0-9]*)");
697 QRegularExpression altimetry_refine_mesh_reg(
"(RefineMesh\\s?=\\s?)(True|False)");
698 QRegularExpression altimetry_use_volumes_landtakes_reg(
"(UseVolumesLandtake\\s?=\\s?)(True|False)");
699 QRegularExpressionMatch match_size = altimetry_size_criterion_reg.match(parameters);
700 QRegularExpressionMatch match_refi = altimetry_refine_mesh_reg.match(parameters);
701 QRegularExpressionMatch match_land = altimetry_use_volumes_landtakes_reg.match(parameters);
702 if (match_size.hasMatch() && match_refi.hasMatch() && match_land.hasMatch())
704 QString altimetry_size_criterion = match_size.captured(2);
705 QString altimetry_refine_mesh = match_refi.captured(2);
706 QString altimetry_use_volumes_landtakes = match_land.captured(2);
707 args << altimetry_size_criterion << altimetry_refine_mesh << altimetry_use_volumes_landtakes;
710 logger.
info(
"Lancement d'un sous-processus python pour calculer l'altimetrie avec le script: %s",
711 absolute_pyscript_path.toStdString().c_str());
712 std::string error_msg;
713 if (!
python(args, error_msg))
715 logger.
error(
"Echec du calcul de l'altimetrie: %s", error_msg.c_str());
719 std::deque<OPoint3D> points;
720 std::deque<OTriangle> triangles;
721 std::deque<LPTYSol> materials;
722 readMesh(points, triangles, materials, resultMeshFilePath);
732 std::deque<LPTYSol>& materials,
const QString& meshFilePath)
739 char* saved_locale = setlocale(LC_NUMERIC,
"C");
744 logger.
error(
"Echec d'ouverture du fichier ply : %s", qUtf8Printable(meshFilePath));
747 logger.
debug(
"Ouverture du fichier ply reussie : %s", qUtf8Printable(meshFilePath));
750 setlocale(LC_NUMERIC, saved_locale);
752 triangles = reader.
faces();
753 std::deque<std::string> material_ids = reader.
materials();
761 TYSol* ground =
nullptr;
762 for (
int i = 0; i < material_ids.size(); i++)
767 materials.push_back(ground);
772 "Unknown material retrieved from altimetry mesh: id = %s. Using default material instead",
773 material_ids[i].c_str());
786 bool modified =
false;
788 unsigned int i = 0, j = 0;
790 bool bNoPbAlti =
true;
820 for (i = 0; i < pResTrans->
getTabPoint().size(); i++)
880 double hauteur = pMachineGeoNode->
getHauteur();
909 pt = matrix * *pSrc->
getPos();
939 for (i = 0; i < pCrsEau->
getTabPoint().size(); i++)
1033 double delaunay(0.0001);
1045 delaunay = delaunay <= 0.0 ? 0.0001 : delaunay;
1046 return delaunay > 0.05 ? 0.05 : delaunay;
1058 std::vector<std::pair<int, int>>& indices,
1059 std::vector<int>& etages)
const
1062 file.open(
"logsChargement.txt", std::ios::out | std::ios::trunc);
1063 file <<
"Chargement de la liste des faces." << std::endl;
1067 unsigned int j = 0, i = 0;
1068 int compteurFace = 0;
1069 int compteurInfra = 0;
1077 file <<
"Chargement du batiment " << i << std::endl;
1096 for (
unsigned int k = 0; k < pEtage->
getTabMur().size(); k++)
1102 file <<
"Récupération d'un mur rectangulaire." << std::endl;
1108 file <<
"Récupération d'un rectangle." << std::endl;
1109 file <<
"Ajout de la face " << compteurFace <<
", etage " << j
1110 <<
", batiment " << i << std::endl;
1113 tabTmp.push_back(newNode);
1114 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1115 etages.push_back(j);
1124 tabTmp.push_back(newNode);
1125 indices.push_back(std::pair<int, int>(compteurFace++, (
int)i));
1126 etages.push_back(j);
1136 tabTmp2 = pEcran->acousticFaces();
1137 for (
unsigned k = 0; k < tabTmp2.size(); k++)
1139 tabTmp2[k]->setMatrix(matriceEtage * tabTmp2[k]->getMatrix());
1140 tabTmp.push_back(tabTmp2[k]);
1141 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1142 etages.push_back(j);
1149 bool bEtageEcran =
false;
1163 bool bEcran =
false;
1171 for (j = 0; j < tabTmp.size(); j++)
1174 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1177 tabFaces.push_back(tabTmp[j]);
1205 for (j = 0; j < tabTmp.size(); j++)
1208 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1211 tabFaces.push_back(tabTmp[j]);
1212 indices.push_back(std::pair<int, int>(compteurFace++, compteurInfra));
1214 etages.push_back(0);
1221 static_cast<uint32>(tabFaces.size());
1235 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1237 for (i = 0; i < nbFacesAlti; i++)
1240 pAccPolygon->setParent(pAlti);
1243 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1247 tabFaces.push_back(pNode);
1248 indices.push_back(std::pair<int, int>(compteurFace++, -1));
1249 etages.push_back(-1);
1260 while (rootsite !=
nullptr && !rootsite->
getRoot())
1264 if (rootsite !=
nullptr)
1276 if (parentsite ==
nullptr)
1295 return abs(a - b) < abs(precision);
1299 std::map<
TYUUID, std::deque<TYTabPoint3D>>& contours)
const
1302 for (
unsigned int i = 0; i < volumes.size(); i++)
1304 OMatrix matrix = volumes[i]->getMatrix();
1305 matrix = global_matrix * matrix;
1307 assert(volume !=
nullptr &&
1308 "found an object which isn't a TYAcousticVolume in a TYTabAcousticVolumeGeoNode");
1312 for (
unsigned int j = 0; j < faces.size(); j++)
1315 OMatrix face_matrix = matrix * faces[j]->getMatrix();
1316 faces[j]->setMatrix(face_matrix);
1323 for (
unsigned int k = 0; k < contour.size(); k++)
1325 contour[k] = face_matrix * contour[k];
1336 if (contour[0]._z < tol)
1338 contours[volume->
getID()].push_back(contour);
1346 assert(contours.empty() &&
1347 "Output argument 'contours' is supposed to be empty when calling 'TYSiteNode::getFacesOnGround'");
1354 if (gBatiment->getHauteur() != 0)
1362 OPoint3D position = gBatiment->position();
1364 gBatiment->setPosition(position);
1366 assert(pBuilding !=
nullptr &&
1367 "found an object which is not a TYBatiment in _pInfrastructure->getListBatiment()");
1377 std::deque<TYTabPoint3D> base_faces;
1402 assert(pMachine !=
nullptr &&
1403 "found an object which is not a TYMachine in _pInfrastructure->getListMachine()");
1409 std::deque<TYTabPoint3D> base_faces;
1422 unsigned int j = 0, i = 0;
1444 bool bEtageEcran =
false;
1458 for (j = 0; j < tabTmp.size(); j++)
1461 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1464 tabFaces.push_back(tabTmp[j]);
1490 for (j = 0; j < tabTmp.size(); j++)
1493 tabTmp[j]->setMatrix(matrix * tabTmp[j]->getMatrix());
1496 tabFaces.push_back(tabTmp[j]);
1503 static_cast<uint32>(tabFaces.size());
1512 unsigned int nbFacesAlti =
static_cast<uint32>(listFacesAlti.size());
1514 for (i = 0; i < nbFacesAlti; i++)
1520 *pAccPolygon->getPolygon() = *listFacesAlti.at(i);
1524 tabFaces.push_back(pNode);
1533 for (
unsigned int i = 0; i < tabGeoNode.size(); i++)
1559 for (
unsigned int j = 0; j < tabChild.size(); j++)
1561 tabChild[j]->setMatrix(matrix * tabChild[j]->getMatrix());
1565 sites.insert(sites.end(), tabChild.begin(), tabChild.end());
1577 if (pSource !=
nullptr)
1582 if (pLine !=
nullptr)
1592 if (pVolNode !=
nullptr)
1598 if (pSite !=
nullptr)
1640 assert(pSiteNodeGeoNode);
1653 pSite->updateGraphicTree();
1667 assert(pSiteNodeGeoNode);
1669 TYTabSiteNodeGeoNode::iterator ite;
1673 if ((*ite) == pSiteNodeGeoNode)
1696 TYTabSiteNodeGeoNode::iterator ite;
1722 TYTabSiteNodeGeoNode::iterator ite;
1748 TYTabSiteNodeGeoNode::iterator ite;
1828 newMatrix = matrix * pTopoFrom->
getListCrbNiv()[i]->getMatrix();
1834 newMatrix = matrix * pTopoFrom->
getListTerrain()[i]->getMatrix();
1840 newMatrix = matrix * pTopoFrom->
getListCrsEau()[i]->getMatrix();
1846 newMatrix = matrix * pTopoFrom->
getListPlanEau()[i]->getMatrix();
1855 for (i = 0; i < pInfraFrom->getListRoute().size(); i++)
1857 newMatrix = matrix * pInfraFrom->getListRoute()[i]->getMatrix();
1858 pInfraTo->addRoute(
new TYRouteGeoNode(pInfraFrom->getListRoute()[i]->getElement(), newMatrix));
1879 newMatrix = matrix * pInfraFrom->
getListMachine()[i]->getMatrix();
1886 for (i = 0; i < pInfraFrom->
getSrcs().size(); i++)
1888 newMatrix = matrix * pInfraFrom->
getSrcs()[i]->getMatrix();
1896 ofs <<
getName().toLatin1().data() <<
'\n';
1904 for (
int i = 0; i < childs.size(); i++)
1908 if (pSite !=
nullptr)
1911 ofs << pElement->
getName().toLatin1().data() <<
'\n';
1915 if (pVolNode !=
nullptr)
1921 if (pAcLine !=
nullptr)
1923 pAcLine->exportCSV(ofs);
1927 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.
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)
3D frame with a point and 3 vectors.
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.
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.
void setRepere(const ORepere3D &repere)
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.