-// Copyright (C) 2004-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
HYBRIDPlugin_Hypothesis::HYBRIDPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen * gen)
: SMESH_Hypothesis(hypId, studyId, gen),
myToMeshHoles(DefaultMeshHoles()),
+ myLayersOnAllWrap(DefaultLayersOnAllWrap()),
myToMakeGroupsOfDomains(DefaultToMakeGroupsOfDomains()),
myMaximumMemory(-1),
myInitialMemory(-1),
_param_algo_dim = 3;
}
+//=======================================================================
+//function : SetLayersOnAllWrap
+//=======================================================================
+
+void HYBRIDPlugin_Hypothesis::SetLayersOnAllWrap(bool toMesh)
+{
+ if ( myLayersOnAllWrap != toMesh ) {
+ myLayersOnAllWrap = toMesh;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : GetLayersOnAllWrap
+//=======================================================================
+
+bool HYBRIDPlugin_Hypothesis::GetLayersOnAllWrap(bool checkFreeOption) const
+{
+ return myLayersOnAllWrap;
+}
+
//=======================================================================
//function : SetToMeshHoles
//=======================================================================
}
+//=======================================================================
+//function : DefaultLayersOnAllWrap
+//=======================================================================
+
+bool HYBRIDPlugin_Hypothesis::DefaultLayersOnAllWrap()
+{
+ return true;
+}
+
//=======================================================================
//function : DefaultMeshHoles
//=======================================================================
save << (int) myElementGeneration << " ";
save << (int) myAddMultinormals << " ";
save << (int) mySmoothNormals << " ";
+ save << (int) myLayersOnAllWrap << " ";
save << myNbOfBoundaryLayers << " ";
save << myHeightFirstLayer << " ";
else
load.clear(ios::badbit | load.rdstate());
+ isOK = (load >> i);
+ if (isOK)
+ myLayersOnAllWrap = (bool) i;
+ else
+ load.clear(ios::badbit | load.rdstate());
+
isOK = (load >> i);
if (isOK)
myNbOfBoundaryLayers = (short) i;
bool p_sn = ( hyp->myTextOption.find("--smooth_normals ") != std::string::npos );
bool nolayers = false;
+ bool layersOnAllWrap = hyp->myLayersOnAllWrap;
//help mode
if ( p_h ) {
//--boundary_layers_surface_ids 5 #for all wrap shell
//--boundary_layers_surface_ids 6 #for all enfMeshList
- //TODO if ( !nolayers ) cmd += " --boundary_layers_surface_ids 5,6 "; //as all wrap shell and triangles of enforced mesh
- if ( !nolayers ) cmd += " --boundary_layers_surface_ids 6 "; //as triangles of enforced mesh
-
+ //TODO? if ( !nolayers ) cmd += " --boundary_layers_surface_ids 5,6 "; //as all wrap shell and triangles of enforced mesh
+ if ( !nolayers ) {
+ if (layersOnAllWrap)
+ cmd += " --boundary_layers_surface_ids 5 "; //as triangles of all wrap
+ else
+ cmd += " --boundary_layers_surface_ids 6 "; //as triangles of enforced mesh
+ }
+
if ( !p_eg && hyp ) {
if ( hyp->myElementGeneration >= 0 && hyp->myElementGeneration <= 1 ) {
const char* value[] = { "tetra-dominant" , "hexa-dominant" };