-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 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
#define NGPOINT_COORDS(p) p(0),p(1),p(2)
+#ifdef _DEBUG_
// dump elements added to ng mesh
//#define DUMP_SEGMENTS
//#define DUMP_TRIANGLES
//#define DUMP_TRIANGLES_SCRIPT "/tmp/trias.py" //!< debug AddIntVerticesInSolids()
+#endif
TopTools_IndexedMapOfShape ShapesWithLocalSize;
std::map<int,double> VertexId2LocalSize;
*/
//================================================================================
-void NETGENPlugin_Mesher::RestrictLocalSize(netgen::Mesh& ngMesh, const gp_XYZ& p, const double size)
+void NETGENPlugin_Mesher::RestrictLocalSize(netgen::Mesh& ngMesh,
+ const gp_XYZ& p,
+ const double size,
+ const bool overrideMinH)
{
- if ( netgen::mparam.minh > size )
+ if ( overrideMinH && netgen::mparam.minh > size )
{
ngMesh.SetMinimalH( size );
netgen::mparam.minh = size;
while ( fID < faceNgID ) // geomFace is already in occgeom.fmap, add a copy
fID = occgeom.fmap.Add( BRepBuilderAPI_Copy( geomFace, /*copyGeom=*/false ));
// Problem with the second order in a quadrangular mesh remains.
- // 1) All quadrangles geberated by NETGEN are moved to an inexistent face
- // by FillSMesh() (find AddFaceDescriptor)
+ // 1) All quadrangles generated by NETGEN are moved to an inexistent face
+ // by FillSMesh() (find "AddFaceDescriptor")
// 2) Temporary triangles generated by StdMeshers_QuadToTriaAdaptor
// are on faces where quadrangles were.
// Due to these 2 points, wrong geom faces are used while conversion to qudratic
nodeVec.push_back( nV );
// get node UV
- bool uvOK = false;
+ bool uvOK = true;
vData.uv = helper.GetNodeUV( face, nV, 0, &uvOK );
if ( !uvOK ) helper.CheckNodeUV( face, nV, vData.uv, BRep_Tool::Tolerance(V),/*force=*/1);
netgen::OCCGeometry& geom,
const TSideVector& wires,
SMESH_MesherHelper& helper,
- vector< const SMDS_MeshNode* > & nodeVec)
+ vector< const SMDS_MeshNode* > & nodeVec,
+ const bool overrideMinH)
{
// ----------------------------
// Check wires and count nodes
int( segLen[ i ] > sumH / 100.) +
int( segLen[ iNext ] > sumH / 100.));
if ( nbSeg > 0 )
- RestrictLocalSize( ngMesh, 0.5*(np1+np2), sumH / nbSeg );
+ RestrictLocalSize( ngMesh, 0.5*(np1+np2), sumH / nbSeg, overrideMinH );
}
if ( isInternalWire )
{