+ StdMeshers::StdMeshers_ProjectionSource2D_var h =
+ StdMeshers::StdMeshers_ProjectionSource2D::_narrow( hyp );
+
+ item.myName = tr( "SMESH_SOURCE_FACE" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 2 ),
+ h->GetSourceFace()));
+ item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
+ h->GetSourceMesh()));
+ item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetSourceVertex( 1 )));
+ item.myName = tr( "SMESH_TARGET_VERTEX1" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetTargetVertex( 1 )));
+ item.myName = tr( "SMESH_SOURCE_VERTEX2" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetSourceVertex( 2 )));
+ item.myName = tr( "SMESH_TARGET_VERTEX2" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetTargetVertex( 2 )));
+ }
+ else if( hypType()=="ProjectionSource3D" )
+ {
+ StdMeshers::StdMeshers_ProjectionSource3D_var h =
+ StdMeshers::StdMeshers_ProjectionSource3D::_narrow( hyp );
+
+ item.myName = tr( "SMESH_SOURCE_3DSHAPE" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 3, TopAbs_FACE, 6, true ),
+ h->GetSource3DShape()));
+ item.myName = tr( "SMESH_SOURCE_MESH" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::MESH ),
+ h->GetSourceMesh()));
+ item.myName = tr( "SMESH_SOURCE_VERTEX1" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetSourceVertex( 1 )));
+ item.myName = tr( "SMESH_TARGET_VERTEX1" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetTargetVertex( 1 )));
+ item.myName = tr( "SMESH_SOURCE_VERTEX2" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetSourceVertex( 2 )));
+ item.myName = tr( "SMESH_TARGET_VERTEX2" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( filterForShapeOfDim( 0 ),
+ h->GetTargetVertex( 2 )));
+ }
+ else if( hypType()=="ImportSource1D" )
+ {
+ StdMeshers::StdMeshers_ImportSource1D_var h =
+ StdMeshers::StdMeshers_ImportSource1D::_narrow( hyp );
+
+ SMESH::string_array_var groupEntries = h->GetSourceEdges();
+ CORBA::Boolean toCopyMesh, toCopyGroups;
+ h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
+
+ item.myName = tr( "SMESH_SOURCE_EDGES" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_EDGE ),
+ groupEntries));
+
+ item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
+ QCheckBox* aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyMesh );
+ connect( aQCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( onValueChanged() ));
+ customWidgets()->append( aQCheckBox );
+
+ item.myName = tr( "SMESH_TO_COPY_GROUPS" ); p.append( item );
+ aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyGroups );
+ aQCheckBox->setEnabled( toCopyMesh );
+ customWidgets()->append( aQCheckBox );
+ }
+ else if( hypType()=="ImportSource2D" )
+ {
+ StdMeshers::StdMeshers_ImportSource2D_var h =
+ StdMeshers::StdMeshers_ImportSource2D::_narrow( hyp );
+
+ SMESH::string_array_var groupEntries = h->GetSourceFaces();
+ CORBA::Boolean toCopyMesh, toCopyGroups;
+ h->GetCopySourceMesh(toCopyMesh, toCopyGroups);
+
+ item.myName = tr( "SMESH_SOURCE_FACES" ); p.append( item );
+ customWidgets()->append( newObjRefParamWdg( new SMESH_TypeFilter( SMESH::GROUP_FACE ),
+ groupEntries));
+
+ item.myName = tr( "SMESH_COPY_MESH" ); p.append( item );
+ QCheckBox* aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyMesh );
+ connect( aQCheckBox, SIGNAL( stateChanged(int) ), this, SLOT( onValueChanged() ));
+ customWidgets()->append( aQCheckBox );
+
+ item.myName = tr( "SMESH_COPY_GROUPS" ); p.append( item );
+ aQCheckBox = new QCheckBox(dlg());
+ aQCheckBox->setChecked( toCopyGroups );
+ aQCheckBox->setEnabled( toCopyMesh );
+ customWidgets()->append( aQCheckBox );
+ }
+ else if( hypType()=="ViscousLayers" )
+ {
+ StdMeshers::StdMeshers_ViscousLayers_var h =
+ StdMeshers::StdMeshers_ViscousLayers::_narrow( hyp );
+
+ item.myName = tr( "SMESH_TOTAL_THICKNESS" );
+ if(!initVariableName( hyp, item, "SetTotalThickness" ))
+ item.myValue = h->GetTotalThickness();
+ p.append( item );
+ customWidgets()->append (0);
+
+ item.myName = tr( "SMESH_NUMBER_OF_LAYERS" );
+ if(!initVariableName( hyp, item, "SetNumberLayers" ))
+ item.myValue = h->GetNumberLayers();
+ p.append( item );
+ customWidgets()->append (0);
+
+ item.myName = tr( "SMESH_STRETCH_FACTOR" );
+ if(!initVariableName( hyp, item, "SetStretchFactor" ))
+ item.myValue = h->GetStretchFactor();
+ p.append( item );
+ customWidgets()->append (0);
+
+ item.myName = tr( "EXTRUSION_METHOD" );
+ p.append( item );
+ StdMeshersGUI_RadioButtonsGrpWdg* methodWdg = new StdMeshersGUI_RadioButtonsGrpWdg("");
+ methodWdg->setButtonLabels ( QStringList()
+ << tr("EXTMETH_SURF_OFFSET_SMOOTH")
+ << tr("EXTMETH_FACE_OFFSET")
+ << tr("EXTMETH_NODE_OFFSET"),
+ QStringList()
+ << tr("ICON_EXTMETH_SURF_OFFSET_SMOOTH")
+ << tr("ICON_EXTMETH_FACE_OFFSET")
+ << tr("ICON_EXTMETH_NODE_OFFSET"));
+ methodWdg->setChecked( (int) h->GetMethod() );
+ customWidgets()->append( methodWdg );
+
+ QString aMainEntry = SMESHGUI_GenericHypothesisCreator::getMainShapeEntry();
+ QString aSubEntry = SMESHGUI_GenericHypothesisCreator::getShapeEntry();
+ if ( !aMainEntry.isEmpty() )
+ {
+ item.myName = tr( "TO_IGNORE_FACES_OR_NOT" );
+ p.append( item );
+
+ StdMeshersGUI_RadioButtonsGrpWdg* ignoreWdg = new StdMeshersGUI_RadioButtonsGrpWdg("");
+ ignoreWdg->setButtonLabels ( QStringList()
+ << tr("NOT_TO_IGNORE_FACES")
+ << tr("TO_IGNORE_FACES") );
+ ignoreWdg->setChecked( h->GetIsToIgnoreFaces() );
+ connect(ignoreWdg->getButtonGroup(),SIGNAL(buttonClicked(int)),this,SLOT(onValueChanged()));
+ customWidgets()->append( ignoreWdg );
+
+ item.myName =
+ tr( h->GetIsToIgnoreFaces() ? "SMESH_FACES_WO_LAYERS" : "SMESH_FACES_WITH_LAYERS" );
+ p.append( item );
+
+ StdMeshersGUI_SubShapeSelectorWdg* idsWg =
+ new StdMeshersGUI_SubShapeSelectorWdg(0,TopAbs_FACE);
+
+ idsWg->SetGeomShapeEntry( aSubEntry, aMainEntry );
+ if ( idsWg->SetListOfIDs( h->GetFaces() ))
+ {
+ idsWg->ShowPreview( true );
+ }
+ else
+ {
+ SUIT_MessageBox::warning( dlg(),tr( "SMESH_WRN_WARNING" ),tr( "BAD_FACES_WARNING" ));
+ idsWg->setEnabled( false );
+ }
+ customWidgets()->append ( idsWg );
+ }
+
+ item.setNoName();
+ p.append( item );
+ StdMeshersGUI_NameCheckableGrpWdg* nameWdg =
+ new StdMeshersGUI_NameCheckableGrpWdg( tr( "CREATE_GROUPS_FROM_LAYERS" ),
+ tr( "GROUP_NAME" ));
+ nameWdg->setName( h->GetGroupName() );
+ if ( nameWdg->getName().isEmpty() )
+ {
+ nameWdg->setDefaultName( type() );
+ nameWdg->setChecked( false );
+ }
+ customWidgets()->append ( nameWdg );