: SMESH_Hypothesis(hypId, gen),
_algo2d (automatic),
_algo3d (delaunay3),
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
+ _recomb2DAlgo (simple),
+#else
_recomb2DAlgo (standard),
+#endif
_recombineAll (false),
_subdivAlgo (none),
_remeshAlgo (nosplit),
" " << _minSize <<
" " << (int)_secondOrder <<
" " << (int)_useIncomplElem ;
-
+
save << " " << "__COMPOUNDS_BEGIN__";
for (TCompound::const_iterator it = _compounds.begin(); it != _compounds.end(); ++it )
save << " " << *it << " ";
save << " " << "__COMPOUNDS_END__";
-
+
return save;
}
_is2d = (bool)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_algo2d = (Algo2D)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
if (!_is2d)
{
isOK = static_cast<bool>(load >> is);
else
load.clear(ios::badbit | load.rdstate());
}
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_recomb2DAlgo = (Recomb2DAlgo)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_recombineAll = (bool)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_subdivAlgo = (SubdivAlgo)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_remeshAlgo = (RemeshAlgo)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_remeshPara = (RemeshPara)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> val);
if (isOK)
_smouthSteps = val;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> val);
if (isOK)
_sizeFactor = val;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> val);
if (isOK)
_maxSize = val;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> val);
if (isOK)
_minSize = val;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_secondOrder = (bool)is;
else
load.clear(ios::badbit | load.rdstate());
-
+
isOK = static_cast<bool>(load >> is);
if (isOK)
_useIncomplElem = (bool)is;
else
load.clear(ios::badbit | load.rdstate());
-
-
+
+
std::string entry;
isOK = static_cast<bool>(load >> entry);
if (isOK && entry == "__COMPOUNDS_BEGIN__")
std::vector< ShapeBounds > & topoEdges )
{
topoEdges.clear();
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
for ( size_t i = 0; i < gEdge->compound.size(); ++i )
{
GEdge* gE = static_cast< GEdge* >( gEdge->compound[ i ]);
topoEdges.push_back( ShapeBounds{ gE->bounds(), *((TopoDS_Edge*)gE->getNativePtr()) });
}
-#endif
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION <3
+#else
for ( size_t i = 0; i < gEdge->_compound.size(); ++i )
{
GEdge* gE = static_cast< GEdge* >( gEdge->_compound[ i ]);
topoEdges.push_back( ShapeBounds{ gE->bounds(), *((TopoDS_Edge*)gE->getNativePtr()) });
}
-#endif
-#if GMSH_MAJOR_VERSION <4
- if ( gEdge->geomType() == GEntity::CompoundCurve )
- {
- std::vector<GEdge*> gEdges = ((GEdgeCompound*)gEdge)->getCompounds();
- for ( size_t i = 0; i < gEdges.size(); ++i )
- {
- GEdge* gE = gEdges[ i ];
- topoEdges.push_back( ShapeBounds{ gE->bounds(), *((TopoDS_Edge*)gE->getNativePtr()) });
- }
- }
#endif
return topoEdges.size();
}
std::vector< ShapeBounds > & topoFaces )
{
topoFaces.clear();
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
for ( size_t i = 0; i < gFace->compound.size(); ++i )
{
GFace* gF = static_cast< GFace* >( gFace->compound[ i ]);
topoFaces.push_back( ShapeBounds{ gF->bounds(), *((TopoDS_Face*)gF->getNativePtr()) });
}
-#endif
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION <3
+#else
for ( size_t i = 0; i < gFace->_compound.size(); ++i )
{
GFace* gF = static_cast< GFace* >( gFace->_compound[ i ]);
topoFaces.push_back( ShapeBounds{ gF->bounds(), *((TopoDS_Face*)gF->getNativePtr()) });
}
-#endif
-#if GMSH_MAJOR_VERSION <4
- if ( gFace->geomType() == GEntity::CompoundSurface )
- {
- std::list<GFace*> gFaces = ((GFaceCompound*)gFace)->getCompounds();
- for ( std::list<GFace*>::const_iterator itl = gFaces.begin();itl != gFaces.end(); ++itl )
- {
- GFace* gF = *itl;
- topoFaces.push_back( ShapeBounds{ gF->bounds(), *((TopoDS_Face*)gF->getNativePtr()) });
- }
- }
#endif
return topoFaces.size();
}
//ASSERT(ok);
ok = GmshSetOption("Mesh", "Smoothing" , (double)_smouthSteps) ;
//ASSERT(ok);
- ok = GmshSetOption("Mesh", "CharacteristicLengthFactor", _sizeFactor) ;
- //ASSERT(ok);
- ok = GmshSetOption("Mesh", "CharacteristicLengthMin" , _minSize) ;
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
+ ok = GmshSetOption("Mesh", "MeshSizeFactor" , _sizeFactor) ;
+ ASSERT(ok);
+ ok = GmshSetOption("Mesh", "MeshSizeMin" , _minSize) ;
ASSERT(ok);
- ok = GmshSetOption("Mesh", "CharacteristicLengthMax" , _maxSize) ;
+ ok = GmshSetOption("Mesh", "MeshSizeMax" , _maxSize) ;
+ ASSERT(ok);
+#else
+ ok = GmshSetOption("Mesh", "CharacteristicLengthFactor" , _sizeFactor) ;
ASSERT(ok);
+ ok = GmshSetOption("Mesh", "CharacteristicLengthMin" , _minSize) ;
+ ASSERT(ok);
+ ok = GmshSetOption("Mesh", "CharacteristicLengthMax" , _maxSize) ;
+ ASSERT(ok);
+#endif
ok = GmshSetOption("Mesh", "ElementOrder" , (_secondOrder)?2.:1.) ;
ASSERT(ok);
if (_secondOrder)
if ( !it.More() )
continue;
TopAbs_ShapeEnum shapeType = it.Value().ShapeType();
-#if GMSH_MAJOR_VERSION >=4
std::vector< std::pair< int, int > > dimTags;
for ( ; it.More(); it.Next())
{
_gModel->getGEOInternals()->setCompoundMesh( dim, tags );
toSynchronize = true;
}
-#else
- // compound of edges
- if (shapeType == TopAbs_EDGE)
- {
- MESSAGE(" shapeType == TopAbs_EDGE :");
- int num = _gModel->getNumEdges()+1;
- Curve *curve = CreateCurve(num, MSH_SEGM_COMPOUND, 1, NULL, NULL, -1, -1, 0., 1.);
- for ( ; it.More(); it.Next())
- {
- TopoDS_Shape topoShape = it.Value();
- ASSERT(topoShape.ShapeType() == shapeType);
- curve->compound.push_back(occgeo->addEdgeToModel(_gModel, (TopoDS_Edge&)topoShape)->tag());
- }
- toSynchronize = true;
- Tree_Add(_gModel->getGEOInternals()->Curves, &curve);
- //_gModel->importGEOInternals();
- }
- // compound of faces
- else if (shapeType == TopAbs_FACE)
- {
- MESSAGE(" shapeType == TopAbs_FACE :");
- int num = _gModel->getNumFaces()+1;
- Surface *surface = CreateSurface(num, MSH_SURF_COMPOUND);
- for ( ; it.More(); it.Next())
- {
- TopoDS_Shape topoShape = it.Value();
- ASSERT(topoShape.ShapeType() == shapeType);
- surface->compound.push_back(occgeo->addFaceToModel(_gModel, (TopoDS_Face&)topoShape)->tag());
- }
- toSynchronize = true;
- Tree_Add(_gModel->getGEOInternals()->Surfaces, &surface);
- }
-#endif
if ( toSynchronize )
_gModel->getGEOInternals()->synchronize(_gModel);
}
*/
//================================================================================
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
void GMSHPlugin_Mesher::SetCompoundMeshVisibility()
{
// GET topoEdge CORRESPONDING TO gEdge
TopoDS_Edge topoEdge;
std::vector< ShapeBounds > topoEdges;
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
if(gEdge->haveParametrization())
#else
if ( gEdge->geomType() != GEntity::CompoundCurve )
{
GFace *gFace = *it;
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
// Gmsh since version 4.3 is now producing extra surface and mesh when
// compounds are involved. Since in Gmsh meshing procedure needs acess
// to each of the original topology and the meshed topology. Hence we
TopoDS_Face topoFace;
std::vector< ShapeBounds > topoFaces;
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
if(gFace->haveParametrization())
#else
if ( gFace->geomType() != GEntity::CompoundSurface )
{
GFace *gFace = *it;
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
if ( _compounds.size() && gFace->geomType() == GEntity::DiscreteSurface )
continue;
throw oss.str();
}
else
- printf(oss.str().c_str());
+ printf("%s\n", oss.str().c_str());
}
}
if (!err)
{
-#if GMSH_MAJOR_VERSION < 4
- if (_compounds.size() > 0) _gModel->setCompoundVisibility();
-#endif
-#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=8
if (_compounds.size() > 0)
SetCompoundMeshVisibility();
#endif
<source>GMSH_3D_ALGO</source>
<translation>Algorithme 3D</translation>
</message>
+ <message>
+ <source>GMSH_FRONTAL3</source>
+ <translation>Frontal</translation>
+ </message>
<message>
<source>GMSH_DELAUNAY3</source>
<translation>Delaunay</translation>
<source>GMSH_FRONTAL_DELAUNAY</source>
<translation>Frontal Delaunay</translation>
</message>
+ <message>
+ <source>GMSH_FRONTAL_HEX</source>
+ <translation>Frontal Hex</translation>
+ </message>
<message>
<source>GMSH_MMG3D</source>
<translation>MMG3D</translation>
<source>GMSH_2D_RECOMB_ALGO</source>
<translation>Algorithme de recombinaison 2D</translation>
</message>
+ <message>
+ <source>GMSH_SIMPLE</source>
+ <translation>Simple</translation>
+ </message>
<message>
<source>GMSH_STANDARD</source>
<translation>Standard</translation>
<source>GMSH_BLOSSOM</source>
<translation>Blossom</translation>
</message>
+ <message>
+ <source>GMSH_SIMPLE_FULL_QUADS</source>
+ <translation>Simple quads uniquement</translation>
+ </message>
+ <message>
+ <source>GMSH_BLOSSOM_FULL_QUADS</source>
+ <translation>Blossom quads uniquement</translation>
+ </message>
<message>
<source>GMSH_RECOMBINE_ALL</source>
<translation>Recombiner tous les triangles</translation>