-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#else
extern int OCCGenerateMesh (OCCGeometry&, Mesh*&, int, int, char*);
#endif
-#if defined(NETGEN_V5) && defined(WIN32)
- DLL_HEADER
-#endif
-extern MeshingParameters mparam;
-#if defined(NETGEN_V5) && defined(WIN32)
- DLL_HEADER
-#endif
+
+ NETGENPLUGIN_DLL_HEADER
+ extern MeshingParameters mparam;
+
+ NETGENPLUGIN_DLL_HEADER
extern volatile multithreadt multithread;
}
using namespace nglib;
*/
//=============================================================================
-NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D(int hypId, int studyId,
- SMESH_Gen* gen)
- : SMESH_3D_Algo(hypId, studyId, gen)
+NETGENPlugin_NETGEN_3D::NETGENPlugin_NETGEN_3D(int hypId, SMESH_Gen* gen)
+ : SMESH_3D_Algo(hypId, gen)
{
_name = "NETGEN_3D";
_shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID);// 1 bit /shape type
const SMESHDS_SubMesh * aSubMeshDSFace = proxyMesh->GetSubMesh( aShapeFace );
if ( !aSubMeshDSFace ) continue;
+
SMDS_ElemIteratorPtr iteratorElem = aSubMeshDSFace->GetElements();
+ if ( _quadraticMesh &&
+ dynamic_cast< const SMESH_ProxyMesh::SubMesh*>( aSubMeshDSFace ))
+ {
+ // add medium nodes of proxy triangles to helper (#16843)
+ while ( iteratorElem->more() )
+ helper.AddTLinks( static_cast< const SMDS_MeshFace* >( iteratorElem->next() ));
+
+ iteratorElem = aSubMeshDSFace->GetElements();
+ }
while ( iteratorElem->more() ) // loop on elements on a geom face
{
// check mesh face
str << ": " << ex.GetMessageString();
error(str);
}
- catch (netgen::NgException exc)
+ catch (netgen::NgException& exc)
{
SMESH_Comment str("NgException");
if ( strlen( netgen::multithread.task ) > 0 )
if ( err )
{
SMESH_ComputeErrorPtr ce = NETGENPlugin_Mesher::ReadErrors(nodeVec);
- if ( ce && !ce->myBadElements.empty() )
+ if ( ce && ce->HasBadElems() )
error( ce );
}
StdMeshers_QuadToTriaAdaptor* Adaptor = new StdMeshers_QuadToTriaAdaptor;
Adaptor->Compute(aMesh);
proxyMesh.reset( Adaptor );
+
+ if ( aHelper->IsQuadraticMesh() )
+ {
+ SMDS_ElemIteratorPtr fIt = proxyMesh->GetFaces();
+ while( fIt->more())
+ aHelper->AddTLinks( static_cast< const SMDS_MeshFace* >( fIt->next() ));
+ }
}
// maps nodes to ng ID