Hi everyone, I am using of GMSH to make merge in meshes. I did this cpp:
#include <stdio.h>
#include "Gmsh.h"
#include "GModel.h"
#include "MElement.h"
#include <iostream>
using namespace std;
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
GmshInitialize(argc, argv);
if(argc ==1){
GmshSetOption("General", "Terminal", 1.);
char str[80];
strcpy (str,argv[1]);
strcat (str,".msh");
GModel *m = new GModel();
m->readGEO(argv[1]);
m->mesh(3);
m->writeMSH(str, 1.0);
delete m;
}
else if (argc >2){
GmshSetOption("General", "Terminal", 1.);
GModel *m = new GModel();
m->readMSH(argv[1]);//mesh1.msh
GmshMergeFile(argv[2]);//mesh2.msh
m->writeMSH("test.msh", 1.0);
delete m;
}
GmshFinalize();
}
The GMSH show me this error when i try open the test.msh:
Error Wrong vertex index 0
Error Error loading 'test.msh'
The two input files are attached.
Some clues to correct this?
att.
Bruno Correia
M1.msh
Description: Mesh model
M2.msh
Description: Mesh model
_______________________________________________ gmsh mailing list [email protected] http://www.geuz.org/mailman/listinfo/gmsh
