mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
0019923: EDF 765 SMESH : default values of hypothesis
add preference parameter to control number of segments per diagonal of boundary box of geometry by which default segment length of appropriate 1D hypotheses is defined
This commit is contained in:
parent
2c39bb1e19
commit
fd13e26d1e
@ -43,6 +43,7 @@
|
|||||||
<parameter name="display_mode" value="1" />
|
<parameter name="display_mode" value="1" />
|
||||||
<parameter name="auto_groups" value="false"/>
|
<parameter name="auto_groups" value="false"/>
|
||||||
<parameter name="show_result_notification" value="2"/>
|
<parameter name="show_result_notification" value="2"/>
|
||||||
|
<parameter name="segmentation" value="10"/>
|
||||||
</section>
|
</section>
|
||||||
<section name="resources">
|
<section name="resources">
|
||||||
<!-- Module resources -->
|
<!-- Module resources -->
|
||||||
|
@ -1069,6 +1069,11 @@ SalomeApp_Module( "SMESH" )
|
|||||||
{
|
{
|
||||||
CORBA::Boolean anIsEmbeddedMode;
|
CORBA::Boolean anIsEmbeddedMode;
|
||||||
myComponentSMESH = SMESH_Client::GetSMESHGen(getApp()->orb(),anIsEmbeddedMode);
|
myComponentSMESH = SMESH_Client::GetSMESHGen(getApp()->orb(),anIsEmbeddedMode);
|
||||||
|
|
||||||
|
// 0019923: EDF 765 SMESH : default values of hypothesis
|
||||||
|
SUIT_ResourceMgr* aResourceMgr = SMESH::GetResourceMgr(this);
|
||||||
|
int nbSeg = aResourceMgr->integerValue( "SMESH", "segmentation" );
|
||||||
|
myComponentSMESH->SetBoundaryBoxSegmentation( nbSeg );
|
||||||
}
|
}
|
||||||
|
|
||||||
myActiveDialogBox = 0;
|
myActiveDialogBox = 0;
|
||||||
@ -3404,6 +3409,7 @@ void SMESHGUI::onViewManagerActivated( SUIT_ViewManager* mgr )
|
|||||||
|
|
||||||
void SMESHGUI::createPreferences()
|
void SMESHGUI::createPreferences()
|
||||||
{
|
{
|
||||||
|
// General tab ------------------------------------------------------------------------
|
||||||
int genTab = addPreference( tr( "PREF_TAB_GENERAL" ) );
|
int genTab = addPreference( tr( "PREF_TAB_GENERAL" ) );
|
||||||
|
|
||||||
int updateGroup = addPreference( tr( "PREF_GROUP_UPDATE" ), genTab );
|
int updateGroup = addPreference( tr( "PREF_GROUP_UPDATE" ), genTab );
|
||||||
@ -3457,6 +3463,14 @@ void SMESHGUI::createPreferences()
|
|||||||
setPreferenceProperty( notifyMode, "strings", modes );
|
setPreferenceProperty( notifyMode, "strings", modes );
|
||||||
setPreferenceProperty( notifyMode, "indexes", indices );
|
setPreferenceProperty( notifyMode, "indexes", indices );
|
||||||
|
|
||||||
|
int segGroup = addPreference( tr( "PREF_GROUP_SEGMENT_LENGTH" ), genTab );
|
||||||
|
setPreferenceProperty( segGroup, "columns", 2 );
|
||||||
|
int segLen = addPreference( tr( "PREF_SEGMENT_LENGTH" ), segGroup, LightApp_Preferences::IntSpin,
|
||||||
|
"SMESH", "segmentation" );
|
||||||
|
setPreferenceProperty( segLen, "min", 1 );
|
||||||
|
setPreferenceProperty( segLen, "max", 10000000 );
|
||||||
|
|
||||||
|
// Mesh tab ------------------------------------------------------------------------
|
||||||
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
|
||||||
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
|
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
|
||||||
setPreferenceProperty( nodeGroup, "columns", 2 );
|
setPreferenceProperty( nodeGroup, "columns", 2 );
|
||||||
@ -3499,6 +3513,7 @@ void SMESHGUI::createPreferences()
|
|||||||
|
|
||||||
addPreference( tr( "PREF_ORIENTATION_3D_VECTORS" ), orientGroup, LightApp_Preferences::Bool, "SMESH", "orientation_3d_vectors" );
|
addPreference( tr( "PREF_ORIENTATION_3D_VECTORS" ), orientGroup, LightApp_Preferences::Bool, "SMESH", "orientation_3d_vectors" );
|
||||||
|
|
||||||
|
// Selection tab ------------------------------------------------------------------------
|
||||||
int selTab = addPreference( tr( "PREF_TAB_SELECTION" ) );
|
int selTab = addPreference( tr( "PREF_TAB_SELECTION" ) );
|
||||||
|
|
||||||
int selGroup = addPreference( tr( "PREF_GROUP_SELECTION" ), selTab );
|
int selGroup = addPreference( tr( "PREF_GROUP_SELECTION" ), selTab );
|
||||||
@ -3527,6 +3542,7 @@ void SMESHGUI::createPreferences()
|
|||||||
addPreference( tr( "PREF_ELEMENTS" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_element" );
|
addPreference( tr( "PREF_ELEMENTS" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_element" );
|
||||||
addPreference( tr( "PREF_OBJECTS" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_object" );
|
addPreference( tr( "PREF_OBJECTS" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_object" );
|
||||||
|
|
||||||
|
// Scalar Bar tab ------------------------------------------------------------------------
|
||||||
int sbarTab = addPreference( tr( "SMESH_SCALARBAR" ) );
|
int sbarTab = addPreference( tr( "SMESH_SCALARBAR" ) );
|
||||||
int fontGr = addPreference( tr( "SMESH_FONT_SCALARBAR" ), sbarTab );
|
int fontGr = addPreference( tr( "SMESH_FONT_SCALARBAR" ), sbarTab );
|
||||||
setPreferenceProperty( fontGr, "columns", 2 );
|
setPreferenceProperty( fontGr, "columns", 2 );
|
||||||
@ -3602,7 +3618,7 @@ void SMESHGUI::createPreferences()
|
|||||||
|
|
||||||
void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
|
void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
|
||||||
{
|
{
|
||||||
if( sect=="SMESH" ){
|
if( sect=="SMESH" ) {
|
||||||
float sbX1,sbY1,sbW,sbH;
|
float sbX1,sbY1,sbW,sbH;
|
||||||
float aTol = 1.00000009999999;
|
float aTol = 1.00000009999999;
|
||||||
std::string aWarning;
|
std::string aWarning;
|
||||||
@ -3654,6 +3670,10 @@ void SMESHGUI::preferencesChanged( const QString& sect, const QString& name )
|
|||||||
aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_height",sbH);
|
aResourceMgr->setValue("SMESH", "scalar_bar_horizontal_height",sbH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( name == "segmentation" ) {
|
||||||
|
int nbSeg = aResourceMgr->integerValue( "SMESH", "segmentation" );
|
||||||
|
myComponentSMESH->SetBoundaryBoxSegmentation( nbSeg );
|
||||||
|
}
|
||||||
|
|
||||||
if(aWarning.size() != 0){
|
if(aWarning.size() != 0){
|
||||||
aWarning += "The default values are applied instead.";
|
aWarning += "The default values are applied instead.";
|
||||||
|
@ -2888,6 +2888,14 @@ Please, create VTK viewer and try again</translation>
|
|||||||
<source>PREF_AUTO_GROUPS</source>
|
<source>PREF_AUTO_GROUPS</source>
|
||||||
<translation>Automatically create groups for MED export</translation>
|
<translation>Automatically create groups for MED export</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>PREF_GROUP_SEGMENT_LENGTH</source>
|
||||||
|
<translation>Segment length</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>PREF_SEGMENT_LENGTH</source>
|
||||||
|
<translation>Segmentation of diagonal of boundary box of geometry</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>PREF_AUTO_UPDATE</source>
|
<source>PREF_AUTO_UPDATE</source>
|
||||||
<translation>Automatic update</translation>
|
<translation>Automatic update</translation>
|
||||||
|
Loading…
Reference in New Issue
Block a user