Back to index

salome-smesh  6.5.0
Public Member Functions | Protected Member Functions | Private Attributes
SMESHGUI_UnionOfTrianglesDlg Class Reference

Class : SMESHGUI_UnionOfTrianglesDlg Description : Construction of quadrangles by automatic association of triangles. More...

#include <SMESHGUI_MultiEditDlg.h>

List of all members.

Public Member Functions

 SMESHGUI_UnionOfTrianglesDlg (SMESHGUI *)
 Class : SMESHGUI_UnionOfTrianglesDlg Description : Construction of quadrangles by automatic association of triangles.
virtual ~SMESHGUI_UnionOfTrianglesDlg ()

Protected Member Functions

virtual bool isValid (const bool)
virtual bool process (SMESH::SMESH_MeshEditor_ptr, const SMESH::long_array &, SMESH::SMESH_IDSource_ptr obj)

Private Attributes

SMESHGUI_SpinBox * myMaxAngleSpin

Detailed Description

Class : SMESHGUI_UnionOfTrianglesDlg Description : Construction of quadrangles by automatic association of triangles.

Definition at line 188 of file SMESHGUI_MultiEditDlg.h.


Constructor & Destructor Documentation

Class : SMESHGUI_UnionOfTrianglesDlg Description : Construction of quadrangles by automatic association of triangles.

Definition at line 1151 of file SMESHGUI_MultiEditDlg.cxx.

                                                 :
  SMESHGUI_MultiEditDlg(theModule, SMESH::TriaFilter, false)
{
  setWindowTitle(tr("CAPTION"));

  myComboBoxFunctor->setEnabled(true);
  myComboBoxFunctor->addItem(tr("WARP_ELEMENTS")); // for quadrangles only
  myComboBoxFunctor->addItem(tr("TAPER_ELEMENTS")); // for quadrangles only

  // Maximum angle
  QWidget* aMaxAngleGrp = new QWidget(myCriterionGrp);
  QHBoxLayout* aMaxAngleGrpLayout = new QHBoxLayout(aMaxAngleGrp);
  aMaxAngleGrpLayout->setMargin(0);
  aMaxAngleGrpLayout->setSpacing(SPACING);

  QLabel* aLab = new QLabel (tr("MAXIMUM_ANGLE"), aMaxAngleGrp);
  myMaxAngleSpin = new SMESHGUI_SpinBox (aMaxAngleGrp);
  myMaxAngleSpin->RangeStepAndValidator(0, 180.0, 1.0, "angle_precision");
  myMaxAngleSpin->SetValue(30.0);

  aMaxAngleGrpLayout->addWidget(aLab);
  aMaxAngleGrpLayout->addWidget(myMaxAngleSpin);

  ((QVBoxLayout*)(myCriterionGrp->layout()))->addWidget(aMaxAngleGrp);
  myCriterionGrp->show();

  myHelpFileName = "uniting_set_of_triangles_page.html";
}

Definition at line 1180 of file SMESHGUI_MultiEditDlg.cxx.

{
}

Member Function Documentation

bool SMESHGUI_UnionOfTrianglesDlg::isValid ( const bool  theMess) [protected, virtual]

Definition at line 1184 of file SMESHGUI_MultiEditDlg.cxx.

{
  bool ok = SMESHGUI_MultiEditDlg::isValid( theMess );
  if( !ok )
    return false;

  QString msg;
  ok = myMaxAngleSpin->isValid( msg, theMess );
  if( !ok ) {
    if( theMess ) {
      QString str( tr( "SMESH_INCORRECT_INPUT" ) );
      if ( !msg.isEmpty() )
        str += "\n" + msg;
      SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), str );
    }
    return false;
  }

  return ok;
}
bool SMESHGUI_UnionOfTrianglesDlg::process ( SMESH::SMESH_MeshEditor_ptr  theEditor,
const SMESH::long_array theIds,
SMESH::SMESH_IDSource_ptr  obj 
) [protected, virtual]

Definition at line 1205 of file SMESHGUI_MultiEditDlg.cxx.

{
  {
    QStringList aParameters;
    aParameters << myMaxAngleSpin->text();
    myMesh->SetParameters( aParameters.join(":").toLatin1().constData() );
  }
  SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
  double aMaxAngle = myMaxAngleSpin->GetValue() * M_PI / 180.0;
  bool ok;
  if ( CORBA::is_nil( obj ))
    ok = theEditor->TriToQuad(theIds, aCriterion, aMaxAngle);
  else
    ok = theEditor->TriToQuadObject(obj, aCriterion, aMaxAngle);
  return ok;
}

Member Data Documentation

SMESHGUI_SpinBox* SMESHGUI_UnionOfTrianglesDlg::myMaxAngleSpin [private]

Definition at line 203 of file SMESHGUI_MultiEditDlg.h.


The documentation for this class was generated from the following files: