#include <SMESH_NumberFilter.hxx>
#include "StdMeshersGUI_ObjectReferenceParamWdg.h"
#include "StdMeshersGUI_LayerDistributionParamWdg.h"
-#include "StdMeshersGUI_EdgeDirectionParamWdg.h"
+//#include "StdMeshersGUI_EdgeDirectionParamWdg.h"
+#include "StdMeshersGUI_SubShapeSelectorWdg.h"
#include <SALOMEDSClient_Study.hxx>
// SALOME GUI includes
StdMeshers::StdMeshers_Arithmetic1D_var h =
StdMeshers::StdMeshers_Arithmetic1D::_narrow( hypothesis() );
- StdMeshersGUI_EdgeDirectionParamWdg* w =
- widget< StdMeshersGUI_EdgeDirectionParamWdg >( 2 );
+ //StdMeshersGUI_EdgeDirectionParamWdg* w =
+ // widget< StdMeshersGUI_EdgeDirectionParamWdg >( 2 );
+ StdMeshersGUI_SubShapeSelectorWdg* w =
+ widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
h->SetStartLength( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
StdMeshers::StdMeshers_StartEndLength_var h =
StdMeshers::StdMeshers_StartEndLength::_narrow( hypothesis() );
- StdMeshersGUI_EdgeDirectionParamWdg* w =
- widget< StdMeshersGUI_EdgeDirectionParamWdg >( 2 );
+ StdMeshersGUI_SubShapeSelectorWdg* w =
+ widget< StdMeshersGUI_SubShapeSelectorWdg >( 2 );
h->SetStartLength( params[0].myValue.toDouble() );
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
geomFromWdg ( getWidgetForParam( 3 )), // tgt1
geomFromWdg ( getWidgetForParam( 5 ))); // tgt2
}
+ else if( hypType()=="QuadrangleParams" )
+ {
+ StdMeshers::StdMeshers_QuadrangleParams_var h =
+ StdMeshers::StdMeshers_QuadrangleParams::_narrow( hypothesis() );
+ StdMeshersGUI_SubShapeSelectorWdg* w =
+ widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
+ if (w) {
+ if( w->GetListOfIDs()->length()>0 ) {
+ h->SetTriaVertex( w->GetListOfIDs()[0] );
+ }
+ const char * entry = w->GetMainShapeEntry();
+ h->SetObjectEntry( entry );
+ }
+ }
}
return valueStr;
}
item.myName = tr( "SMESH_REVERCE_EDGES" );
p.append( item );
- StdMeshersGUI_EdgeDirectionParamWdg* aDirectionWidget = new StdMeshersGUI_EdgeDirectionParamWdg();
+ //StdMeshersGUI_EdgeDirectionParamWdg* aDirectionWidget =
+ // new StdMeshersGUI_EdgeDirectionParamWdg();
+ StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
+ new StdMeshersGUI_SubShapeSelectorWdg();
QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
if ( anEntry == "" )
anEntry = h->GetObjectEntry();
item.myName = tr( "SMESH_REVERCE_EDGES" );
p.append( item );
- StdMeshersGUI_EdgeDirectionParamWdg* aDirectionWidget = new StdMeshersGUI_EdgeDirectionParamWdg();
+ //StdMeshersGUI_EdgeDirectionParamWdg* aDirectionWidget =
+ // new StdMeshersGUI_EdgeDirectionParamWdg();
+ StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
+ new StdMeshersGUI_SubShapeSelectorWdg();
QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
if ( anEntry == "" )
anEntry = h->GetObjectEntry();
customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
h->GetTargetVertex( 2 )));
}
+ else if( hypType()=="QuadrangleParams" )
+ {
+ StdMeshers::StdMeshers_QuadrangleParams_var h =
+ StdMeshers::StdMeshers_QuadrangleParams::_narrow( hyp );
+
+ item.myName = tr( "SMESH_BASE_VERTEX" );
+ p.append( item );
+
+ StdMeshersGUI_SubShapeSelectorWdg* aDirectionWidget =
+ new StdMeshersGUI_SubShapeSelectorWdg();
+ aDirectionWidget->SetMaxSize(1);
+ aDirectionWidget->SetSubShType(TopAbs_VERTEX);
+ QString anEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+ if ( anEntry == "" )
+ anEntry = h->GetObjectEntry();
+ aDirectionWidget->SetMainShapeEntry( anEntry );
+ SMESH::long_array_var aVec = new SMESH::long_array;
+ int vertID = h->GetTriaVertex();
+ if(vertID>0) {
+ aVec->length(1);
+ aVec[0] = vertID;
+ }
+ aDirectionWidget->SetListOfIDs( aVec );
+ aDirectionWidget->showPreview( true );
+ customWidgets()->append ( aDirectionWidget );
+ }
else
res = false;
return res;
types.insert( "LayerDistribution", "LAYER_DISTRIBUTION" );
types.insert( "SegmentLengthAroundVertex", "SEGMENT_LENGTH_AROUND_VERTEX" );
types.insert( "MaxLength", "MAX_LENGTH" );
+ types.insert( "QuadrangleParams", "QUADRANGLE_PARAMS" );
}
QString res;
param.myValue = w->GetValue();
return true;
}
- if ( widget->inherits( "StdMeshersGUI_EdgeDirectionParamWdg" ))
+ //if ( widget->inherits( "StdMeshersGUI_EdgeDirectionParamWdg" ))
+ //{
+ // const StdMeshersGUI_EdgeDirectionParamWdg * w =
+ // static_cast<const StdMeshersGUI_EdgeDirectionParamWdg*>( widget );
+ // param.myValue = w->GetValue();
+ // return true;
+ //}
+ if ( widget->inherits( "StdMeshersGUI_SubShapeSelectorWdg" ))
{
- const StdMeshersGUI_EdgeDirectionParamWdg * w =
- static_cast<const StdMeshersGUI_EdgeDirectionParamWdg*>( widget );
+ const StdMeshersGUI_SubShapeSelectorWdg * w =
+ static_cast<const StdMeshersGUI_SubShapeSelectorWdg*>( widget );
param.myValue = w->GetValue();
return true;
}