using gmsh cpp api not able to extrude mesh with quads
Hi,
I am trying to get a volume mesh with quads
gmsh::initialize();
gmsh::option::setNumber("Geometry.AutoCoherence",2);
gmsh::option::setNumber("Mesh.RecombinationAlgorithm", 2);
//gmsh::option::setNumber("Mesh.Recombine3DAll", 1);
gmsh::model::add("tissue");
gmsh::model::geo::addPoint(1.0,0.0,0.0, lc,1);
gmsh::model::geo::addPoint(1.0,1.0,0.0, lc,2);
gmsh::model::geo::addPoint(0.0,1.0,0.0, lc,3);
gmsh::model::geo::addPoint(0.0,0.0,0.0, lc,4);
gmsh::model::geo::addLine(1,2,1);
gmsh::model::geo::addLine(2,3,2);
gmsh::model::geo::addLine(3,4,3);
gmsh::model::geo::addLine(4,1,4);
gmsh::model::geo::addCurveLoop({1,2,3,4}, 1);
int pl = gmsh::model::geo::addPlaneSurface({1}, 1);
std::vector<std::pair<int, int>> ov;
std::vector<std::pair<int, int>> ov2;
gmsh::model::geo::extrude({{2,1}}, 0, 0, 1, ov2,{8,2},{0.5,1});
gmsh::model::geo::synchronize();
gmsh::model::mesh::setRecombine(2, pl);
gmsh::model::mesh::generate(3);
If I only mesh up to surfaces I can get a hollow cube with quads on the surface. However If I try and mesh the volume I get "Cannot extrude quadrangles without Recombine"
Now I saw a parameter gmsh::option::setNumber("Mesh.Recombine3DAll", 1);
but this did not resolve the issue. When I googled this problem most people are using python or the gmsh script which appears to have workarounds. I do not see much for c++
Thanks in advance!