Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ endif()
if (SEPA3D)
target_include_directories (Core PUBLIC ${SEPARATRICE3D_INCLUDE_DIR})
endif (SEPA3D)
target_link_libraries (Core PUBLIC ${CORE_OPTIONAL_LIBRARIES_LIST} Mesquite::Mesquite cgns::cgns PkgConfig::GTS GMDSIg GMDSIo)
target_link_libraries (Core PUBLIC ${CORE_OPTIONAL_LIBRARIES_LIST} Mesquite::Mesquite cgns::cgns PkgConfig::GTS GMDSIg GMDSIo GMDSAero)
# Etre capable une fois installée de retrouver vtk*, ... :
# (Rem : en son absence on a Set runtime path of "/tmp/pignerol/install/lib/libCore.so.5.0.0" to "") ...
set_target_properties (Core PROPERTIES INSTALL_RPATH_USE_LINK_PATH 1)
Expand Down
25 changes: 13 additions & 12 deletions src/Core/Mesh/ExportBlocksCGNSImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
*/
/*----------------------------------------------------------------------------*/
#include "Mesh/ExportBlocksCGNSImplementation.h"
#include "Geom/Volume.h"
#include "Geom/Surface.h"
#include "Geom/Curve.h"
#include "Geom/Vertex.h"
#include "Mesh/MeshItf.h"
#include "Mesh/Surface.h"
/*----------------------------------------------------------------------------*/
#include <gmds/ig/Mesh.h>
#include <gmds/io/IGMeshIOService.h>
#include <gmds/io/VTKWriter.h>
#include <gmds/aero/CGNSWriter3D.h>
/*----------------------------------------------------------------------------*/
#include <TkUtil/MemoryError.h>
#include <iostream>
Expand All @@ -26,8 +23,8 @@ namespace Mgx3D {
namespace Mesh {
/*----------------------------------------------------------------------------*/
ExportBlocksCGNSImplementation::
ExportBlocksCGNSImplementation(Internal::Context& c, const std::string& n)
: m_context(c), m_filename(n)
ExportBlocksCGNSImplementation(Internal::Context& c, const std::string& filename)
: m_context(c), m_filename(filename)
{}

/*----------------------------------------------------------------------------*/
Expand All @@ -43,7 +40,7 @@ namespace Mgx3D {

std::map<gmds::TCellID,unsigned long> n2v;

gmds::Mesh mesh(gmds::MeshModel(gmds::DIM3 | gmds::N | gmds::R | gmds::R2N | gmds::N2R));
gmds::Mesh mesh(gmds::MeshModel(gmds::DIM3 | gmds::N | gmds::F | gmds::R | gmds::R2N | gmds::N2R | gmds::R2F | gmds::F2R | gmds::F2N | gmds::N2F));

gmds::Mesh localMesh = m_context.getMeshManager().getMesh()->getGMDSMesh();

Expand Down Expand Up @@ -150,11 +147,15 @@ namespace Mgx3D {
}
}

gmds::IGMeshIOService ioService(&mesh);
gmds::VTKWriter writer(&ioService);
writer.setCellOptions(gmds::N|gmds::R);
writer.setDataOptions(gmds::N|gmds::R);
writer.write(m_filename);
int position = m_filename.find_last_of('/');

m_basename = m_filename.substr(position+1, m_filename.length()-position+1);

m_path = m_filename.substr(0, position+1);

gmds::aero::CGNSWriter3D writer3D(&mesh);
writer3D.write("",m_basename,m_path);

}
/*----------------------------------------------------------------------------*/
} // end namespace Topo
Expand Down
6 changes: 5 additions & 1 deletion src/Core/protected/Mesh/ExportBlocksCGNSImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Mgx3D {
* \param c le contexte
* \param n le nom du fichier dans lequel se fait l'exportation
*/
ExportBlocksCGNSImplementation(Internal::Context& c, const std::string& n);
ExportBlocksCGNSImplementation(Internal::Context& c, const std::string& filename);

/*------------------------------------------------------------------------*/
/** \brief Destructeur
Expand All @@ -45,8 +45,12 @@ namespace Mgx3D {
/// contexte d'exécution
Internal::Context& m_context;

std::string m_path;

/// fichier dans lequel on exporte
std::string m_filename;

std::string m_basename;
};

/*----------------------------------------------------------------------------*/
Expand Down