mySmoothNormals(DefaultSmoothNormals()),
myHeightFirstLayer(DefaultHeightFirstLayer()),
myBoundaryLayersProgression(DefaultBoundaryLayersProgression()),
+ myCoreSize(DefaultCoreSize()),
myMultinormalsAngle(DefaultMultinormalsAngle()),
myNbOfBoundaryLayers(DefaultNbOfBoundaryLayers()),
_enfVertexList(DefaultHYBRIDEnforcedVertexList()),
return myBoundaryLayersProgression;
}
+//=======================================================================
+//function : SetCoreSize
+//=======================================================================
+
+void HYBRIDPlugin_Hypothesis::SetCoreSize(double toCoreSize)
+{
+ if ( myCoreSize != toCoreSize ) {
+ myCoreSize = toCoreSize;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
+//=======================================================================
+//function : GetCoreSize
+//=======================================================================
+
+double HYBRIDPlugin_Hypothesis::GetCoreSize() const
+{
+ return myCoreSize;
+}
+
//=======================================================================
//function : SetMultinormalsAngle
//=======================================================================
}
//=======================================================================
-//function : GetMultinormalsAngle
+//function : GetCoreSize
//=======================================================================
short HYBRIDPlugin_Hypothesis::GetNbOfBoundaryLayers() const
return 1.0;
}
+//=======================================================================
+//function : DefaultCoreSize
+//=======================================================================
+double HYBRIDPlugin_Hypothesis::DefaultCoreSize()
+{
+ return 0.0;
+}
+
//=======================================================================
//function : DefaultMultinormalsAngle
//=======================================================================
save << (int) myKeepFiles << " ";
save << myWorkingDirectory << " ";
save << myVerboseLevel << " ";
+ save << myCoreSize << " ";
+
if (!myTextOption.empty()) {
save << "__OPTIONS_BEGIN__ ";
save << myTextOption << " ";
else
load.clear(ios::badbit | load.rdstate());
+ isOK = static_cast<bool>(load >> d);
+ if (isOK)
+ myCoreSize = d;
+ else
+ load.clear(ios::badbit | load.rdstate());
std::string separator;
bool hasOptions = false;
bool p_eg = ( hyp && hyp->myTextOption.find("--element_generation ") != std::string::npos );
bool p_cm = ( hyp && hyp->myTextOption.find("--collision_mode ") != std::string::npos );
bool p_am = ( hyp && hyp->myTextOption.find("--add_multinormals ") != std::string::npos );
+ bool p_cs = ( hyp && hyp->myTextOption.find("--global_physical_size ") != std::string::npos );
bool p_mat = ( hyp && hyp->myTextOption.find("--multinormal_angle_threshold ") != std::string::npos );
bool p_sn = ( hyp && hyp->myTextOption.find("--smooth_normals ") != std::string::npos );
//missing options :
- //- global_physical_size
- //- boundary_layer_size_mode
- //- boundary_layer_initial_height_on_surface_tags
//- boundary_layer_max_element_angle
bool nolayers = false;
}
if ( !p_eg && hyp ) {
- if ( hyp->myElementGeneration >= 0 && hyp->myElementGeneration <= 1 ) {
- const char* value[] = { "tetra-dominant" , "hexa-dominant" };
+ if ( hyp->myElementGeneration >= 0 && hyp->myElementGeneration <= 2 ) {
+ const char* value[] = { "tetra-dominant" , "hexa-dominant", "cartesian_core" };
cmd << " --element_generation " << value[ hyp->myElementGeneration ];
}
}
-
+
+ if ( !p_cs && hyp ) {
+ if ( hyp->myCoreSize >= 0 ) {
+ cmd << " --global_physical_size " << hyp->myCoreSize;
+ }
+ }
+
if ( !p_cm && hyp ) {
if ( hyp->myCollisionMode >= 0 && hyp->myCollisionMode <= 1 ) {
const char* value[] = { "decrease" , "stop" };