+
+/*!
+ * Class : SMESHGUI_CuttingIntoTetraDlg
+ * Description : Modification of orientation of faces
+ */
+
+SMESHGUI_CuttingIntoTetraDlg::SMESHGUI_CuttingIntoTetraDlg(SMESHGUI* theModule)
+ : SMESHGUI_MultiEditDlg(theModule, SMESH::VolumeFilter, false)
+{
+ setWindowTitle(tr("CAPTION"));
+ myHelpFileName = "split_to_tetra_page.html";
+ myEntityType = 1;
+
+ myToAllChk->setChecked( true ); //aplly to the whole mesh by default
+
+ bool hasHexa = true;//myMesh->_is_nil() ? false : myMesh->NbHexas();
+
+ if ( hasHexa )
+ {
+ myGroupChoice->button(0)->setText( tr("SPLIT_HEX_TO_5_TETRA"));
+ myGroupChoice->button(1)->setText( tr("SPLIT_HEX_TO_6_TETRA"));
+ myGroupChoice->button(2)->setText( tr("SPLIT_HEX_TO_24_TETRA"));
+
+ myCriterionGrp->setTitle( tr("SPLIT_METHOD"));
+ myCriterionGrp->show();
+ myComboBoxFunctor->hide();
+ myChoiceWidget->show();
+ }
+ setSelectionMode();
+ updateButtons();
+}
+
+SMESHGUI_CuttingIntoTetraDlg::~SMESHGUI_CuttingIntoTetraDlg()
+{
+}
+
+bool SMESHGUI_CuttingIntoTetraDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
+ const SMESH::long_array& theIds,
+ SMESH::SMESH_IDSource_ptr theObj)
+{
+ SMESH::SMESH_IDSource_var obj = theObj;
+ if ( CORBA::is_nil( obj ))
+ obj = theEditor->MakeIDSource( theIds, myEntityType ? SMESH::VOLUME : SMESH::FACE );
+ try {
+ theEditor->SplitVolumesIntoTetra( obj, myGroupChoice->checkedId()+1 );
+ }
+ catch ( const SALOME::SALOME_Exception& S_ex ) {
+ SalomeApp_Tools::QtCatchCorbaException( S_ex );
+ return false;
+ }
+ return true;
+}