std::vector< ShapeBounds > & topoEdges )
{
topoEdges.clear();
-#if GMSH_MAJOR_VERSION >=4
-#if GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
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_MINOR_VERSION <3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION <3
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
-#else
+#if GMSH_MAJOR_VERSION <4
if ( gEdge->geomType() == GEntity::CompoundCurve )
{
std::vector<GEdge*> gEdges = ((GEdgeCompound*)gEdge)->getCompounds();
std::vector< ShapeBounds > & topoFaces )
{
topoFaces.clear();
-#if GMSH_MAJOR_VERSION >=4
-#if GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
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_MINOR_VERSION <3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION <3
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
-#else
+#if GMSH_MAJOR_VERSION <4
if ( gFace->geomType() == GEntity::CompoundSurface )
{
std::list<GFace*> gFaces = ((GFaceCompound*)gFace)->getCompounds();
// GET topoEdge CORRESPONDING TO gEdge
TopoDS_Edge topoEdge;
std::vector< ShapeBounds > topoEdges;
-#if GMSH_MAJOR_VERSION >=4
-#if GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
if(gEdge->haveParametrization())
-#endif
#else
if ( gEdge->geomType() != GEntity::CompoundCurve )
#endif
{
GFace *gFace = *it;
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+ // 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
+ // bypass the additional mesh in case of compounds. Note, similar cri-
+ // teria also occus in the following 'for' loop.
+ if ( _compounds.size() && gFace->geomType() == GEntity::DiscreteSurface )
+ continue;
+#endif
+
// GET topoFace CORRESPONDING TO gFace
TopoDS_Face topoFace;
std::vector< ShapeBounds > topoFaces;
-#if GMSH_MAJOR_VERSION >=4
-#if GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
if(gFace->haveParametrization())
-#endif
#else
if ( gFace->geomType() != GEntity::CompoundSurface )
#endif
{
GFace *gFace = *it;
-#if GMSH_MAJOR_VERSION >=4
-#if GMSH_MINOR_VERSION >=3
+#if GMSH_MAJOR_VERSION >=4 && GMSH_MINOR_VERSION >=3
+ if ( _compounds.size() && gFace->geomType() == GEntity::DiscreteSurface )
+ continue;
+
bool isCompound = (!gFace->haveParametrization());
-#endif
#else
bool isCompound = ( gFace->geomType() == GEntity::CompoundSurface );
#endif
+
if ( !isCompound && gFace->getVisibility() == 0 )
continue; // belongs to a compound