+ else if( hypType()=="Adaptive1D" )
+ {
+ StdMeshers::StdMeshers_Adaptive1D_var h =
+ StdMeshers::StdMeshers_Adaptive1D::_narrow( hypothesis() );
+ h->SetVarParameter( params[0].text(), "SetMinSize" );
+ h->SetMinSize( params[0].myValue.toDouble() );
+ h->SetVarParameter( params[0].text(), "SetMaxSize" );
+ h->SetMaxSize( params[1].myValue.toDouble() );
+ h->SetVarParameter( params[0].text(), "SetDeflection" );
+ h->SetDeflection( params[2].myValue.toDouble() );
+ }
+ else if( hypType()=="AutomaticLength" )
+ {
+ StdMeshers::StdMeshers_AutomaticLength_var h =
+ StdMeshers::StdMeshers_AutomaticLength::_narrow( hypothesis() );
+
+ h->SetVarParameter( params[0].text(), "SetFineness" );
+ h->SetFineness( params[0].myValue.toDouble() );
+ }
+ else if( hypType()=="NumberOfLayers" )
+ {
+ StdMeshers::StdMeshers_NumberOfLayers_var h =
+ StdMeshers::StdMeshers_NumberOfLayers::_narrow( hypothesis() );
+
+ h->SetVarParameter( params[0].text(), "SetNumberOfLayers" );
+ h->SetNumberOfLayers( params[0].myValue.toInt() );
+ }
+ else if( hypType()=="LayerDistribution" )
+ {
+ StdMeshers::StdMeshers_LayerDistribution_var h =
+ StdMeshers::StdMeshers_LayerDistribution::_narrow( hypothesis() );
+ StdMeshersGUI_LayerDistributionParamWdg* w =
+ widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
+
+ h->SetLayerDistribution( w->GetHypothesis() );
+ }
+ else if( hypType()=="NumberOfLayers2D" )
+ {
+ StdMeshers::StdMeshers_NumberOfLayers2D_var h =
+ StdMeshers::StdMeshers_NumberOfLayers2D::_narrow( hypothesis() );
+
+ h->SetVarParameter( params[0].text(), "SetNumberOfLayers" );
+ h->SetNumberOfLayers( params[0].myValue.toInt() );
+ }
+ else if( hypType()=="LayerDistribution2D" )
+ {
+ StdMeshers::StdMeshers_LayerDistribution2D_var h =
+ StdMeshers::StdMeshers_LayerDistribution2D::_narrow( hypothesis() );
+ StdMeshersGUI_LayerDistributionParamWdg* w =
+ widget< StdMeshersGUI_LayerDistributionParamWdg >( 0 );
+
+ h->SetLayerDistribution( w->GetHypothesis() );
+ }
+ else if( hypType()=="ProjectionSource1D" )
+ {
+ StdMeshers::StdMeshers_ProjectionSource1D_var h =
+ StdMeshers::StdMeshers_ProjectionSource1D::_narrow( hypothesis() );
+
+ h->SetSourceEdge ( geomFromWdg ( getWidgetForParam( 0 )));
+ h->SetSourceMesh ( meshFromWdg ( getWidgetForParam( 1 )));
+ h->SetVertexAssociation( geomFromWdg ( getWidgetForParam( 2 )),
+ geomFromWdg ( getWidgetForParam( 3 )));
+ }
+ else if( hypType()=="ProjectionSource2D" )
+ {
+ StdMeshers::StdMeshers_ProjectionSource2D_var h =
+ StdMeshers::StdMeshers_ProjectionSource2D::_narrow( hypothesis() );
+
+ h->SetSourceFace ( geomFromWdg ( getWidgetForParam( 0 )));
+ h->SetSourceMesh ( meshFromWdg ( getWidgetForParam( 1 )));
+ h->SetVertexAssociation( geomFromWdg ( getWidgetForParam( 2 )), // src1
+ geomFromWdg ( getWidgetForParam( 4 )), // src2
+ geomFromWdg ( getWidgetForParam( 3 )), // tgt1
+ geomFromWdg ( getWidgetForParam( 5 ))); // tgt2
+ }
+ else if( hypType()=="ProjectionSource3D" )
+ {
+ StdMeshers::StdMeshers_ProjectionSource3D_var h =
+ StdMeshers::StdMeshers_ProjectionSource3D::_narrow( hypothesis() );
+
+ h->SetSource3DShape ( geomFromWdg ( getWidgetForParam( 0 )));
+ h->SetSourceMesh ( meshFromWdg ( getWidgetForParam( 1 )));
+ h->SetVertexAssociation( geomFromWdg ( getWidgetForParam( 2 )), // src1
+ geomFromWdg ( getWidgetForParam( 4 )), // src2
+ geomFromWdg ( getWidgetForParam( 3 )), // tgt1
+ geomFromWdg ( getWidgetForParam( 5 ))); // tgt2
+ }
+ else if( hypType()=="ImportSource1D" )
+ {
+ StdMeshers::StdMeshers_ImportSource1D_var h =
+ StdMeshers::StdMeshers_ImportSource1D::_narrow( hypothesis() );
+
+ SMESH::ListOfGroups_var groups = groupsFromWdg( getWidgetForParam( 0 ));
+ h->SetSourceEdges( groups.in() );
+ QCheckBox* toCopyMesh = widget< QCheckBox >( 1 );
+ QCheckBox* toCopyGroups = widget< QCheckBox >( 2 );
+ h->SetCopySourceMesh( toCopyMesh->isChecked(), toCopyGroups->isChecked());
+ }
+ else if( hypType()=="ImportSource2D" )
+ {
+ StdMeshers::StdMeshers_ImportSource2D_var h =
+ StdMeshers::StdMeshers_ImportSource2D::_narrow( hypothesis() );
+
+ SMESH::ListOfGroups_var groups = groupsFromWdg( getWidgetForParam( 0 ));
+ h->SetSourceFaces( groups.in() );
+ QCheckBox* toCopyMesh = widget< QCheckBox >( 1 );
+ QCheckBox* toCopyGroups = widget< QCheckBox >( 2 );
+ h->SetCopySourceMesh( toCopyMesh->isChecked(), toCopyGroups->isChecked());
+ }
+ else if( hypType()=="ViscousLayers" )
+ {
+ StdMeshers::StdMeshers_ViscousLayers_var h =
+ StdMeshers::StdMeshers_ViscousLayers::_narrow( hypothesis() );
+
+ h->SetVarParameter ( params[0].text(), "SetTotalThickness" );
+ h->SetTotalThickness( params[0].myValue.toDouble() );
+ h->SetVarParameter ( params[1].text(), "SetNumberLayers" );
+ h->SetNumberLayers ( params[1].myValue.toInt() );
+ h->SetVarParameter ( params[2].text(), "SetStretchFactor" );
+ h->SetStretchFactor ( params[2].myValue.toDouble() );
+ h->SetMethod (( StdMeshers::VLExtrusionMethod ) params[3].myValue.toInt() );
+
+ if ( StdMeshersGUI_SubShapeSelectorWdg* idsWg =
+ widget< StdMeshersGUI_SubShapeSelectorWdg >( 5 ))
+ {
+ h->SetFaces( idsWg->GetListOfIDs(), params[4].myValue.toInt() );
+ }
+ }
+ else if( hypType()=="ViscousLayers2D" )
+ {
+ StdMeshers::StdMeshers_ViscousLayers2D_var h =
+ StdMeshers::StdMeshers_ViscousLayers2D::_narrow( hypothesis() );
+
+ h->SetVarParameter ( params[0].text(), "SetTotalThickness" );
+ h->SetTotalThickness( params[0].myValue.toDouble() );
+ h->SetVarParameter ( params[1].text(), "SetNumberLayers" );
+ h->SetNumberLayers ( params[1].myValue.toInt() );
+ h->SetVarParameter ( params[2].text(), "SetStretchFactor" );
+ h->SetStretchFactor ( params[2].myValue.toDouble() );
+
+ if ( StdMeshersGUI_SubShapeSelectorWdg* idsWg =
+ widget< StdMeshersGUI_SubShapeSelectorWdg >( 4 ))
+ {
+ h->SetEdges( idsWg->GetListOfIDs(), params[3].myValue.toInt() );
+ }
+ }
+ // else if( hypType()=="QuadrangleParams" )
+ // {
+ // StdMeshers::StdMeshers_QuadrangleParams_var h =
+ // StdMeshers::StdMeshers_QuadrangleParams::_narrow( hypothesis() );
+ // StdMeshersGUI_SubShapeSelectorWdg* w1 =
+ // widget< StdMeshersGUI_SubShapeSelectorWdg >( 0 );
+ // StdMeshersGUI_QuadrangleParamWdg* w2 =
+ // widget< StdMeshersGUI_QuadrangleParamWdg >( 1 );
+ // if (w1 && w2) {
+ // if (w1->GetListSize() > 0) {
+ // h->SetTriaVertex(w1->GetListOfIDs()[0]); // getlist must be called once
+ // const char * entry = w1->GetMainShapeEntry();
+ // h->SetObjectEntry(entry);
+ // }
+ // h->SetQuadType(StdMeshers::QuadType(w2->GetType()));
+ // }
+ // }