77 */
88/* ----------------------------------------------------------------------------*/
99#include " Mesh/ExportBlocksCGNSImplementation.h"
10- #include " Geom/Volume.h"
11- #include " Geom/Surface.h"
12- #include " Geom/Curve.h"
13- #include " Geom/Vertex.h"
1410#include " Mesh/MeshItf.h"
1511#include " Mesh/Surface.h"
1612/* ----------------------------------------------------------------------------*/
1713#include < gmds/ig/Mesh.h>
1814#include < gmds/io/IGMeshIOService.h>
1915#include < gmds/io/VTKWriter.h>
16+ #include < gmds/aero/CGNSWriter3D.h>
2017/* ----------------------------------------------------------------------------*/
2118#include < TkUtil/MemoryError.h>
2219#include < iostream>
@@ -26,8 +23,8 @@ namespace Mgx3D {
2623 namespace Mesh {
2724/* ----------------------------------------------------------------------------*/
2825 ExportBlocksCGNSImplementation::
29- ExportBlocksCGNSImplementation (Internal::Context& c, const std::string& n )
30- : m_context(c), m_filename(n )
26+ ExportBlocksCGNSImplementation (Internal::Context& c, const std::string& filename )
27+ : m_context(c), m_filename(filename )
3128 {}
3229
3330/* ----------------------------------------------------------------------------*/
@@ -43,7 +40,7 @@ namespace Mgx3D {
4340
4441 std::map<gmds::TCellID,unsigned long > n2v;
4542
46- gmds::Mesh mesh (gmds::MeshModel (gmds::DIM3 | gmds::N | gmds::R | gmds::R2N | gmds::N2R));
43+ 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 ));
4744
4845 gmds::Mesh localMesh = m_context.getMeshManager ().getMesh ()->getGMDSMesh ();
4946
@@ -150,11 +147,15 @@ namespace Mgx3D {
150147 }
151148 }
152149
153- gmds::IGMeshIOService ioService (&mesh);
154- gmds::VTKWriter writer (&ioService);
155- writer.setCellOptions (gmds::N|gmds::R);
156- writer.setDataOptions (gmds::N|gmds::R);
157- writer.write (m_filename);
150+ int position = m_filename.find_last_of (' /' );
151+
152+ m_basename = m_filename.substr (position+1 , m_filename.length ()-position+1 );
153+
154+ m_path = m_filename.substr (0 , position+1 );
155+
156+ gmds::aero::CGNSWriter3D writer3D (&mesh);
157+ writer3D.write (" " ,m_basename,m_path);
158+
158159 }
159160/* ----------------------------------------------------------------------------*/
160161 } // end namespace Topo
0 commit comments