Back to index

salome-smesh  6.5.0
Classes | Defines | Functions
SMESHGUI_SingleEditDlg.cxx File Reference
#include "SMESHGUI_SingleEditDlg.h"
#include "SMESHGUI.h"
#include "SMESHGUI_Utils.h"
#include "SMESHGUI_VTKUtils.h"
#include "SMESHGUI_MeshUtils.h"
#include <SMESH_Actor.h>
#include <SMDS_Mesh.hxx>
#include <LightApp_SelectionMgr.h>
#include <LightApp_Application.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_MessageBox.h>
#include <SUIT_Desktop.h>
#include <SUIT_Session.h>
#include <SVTK_Selector.h>
#include <SVTK_ViewWindow.h>
#include <SALOME_ListIO.hxx>
#include <TColStd_MapOfInteger.hxx>
#include <TColStd_IndexedMapOfInteger.hxx>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <QGroupBox>
#include <QLabel>
#include <QValidator>
#include <QKeyEvent>

Go to the source code of this file.

Classes

class  BusyLocker
 Simple 'busy state' flag locker. More...

Defines

#define SPACING   6
#define MARGIN   11

Functions

static bool findTriangles (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2, const SMDS_MeshElement *&theTria1, const SMDS_MeshElement *&theTria2)

Define Documentation

#define MARGIN   11

Definition at line 64 of file SMESHGUI_SingleEditDlg.cxx.

#define SPACING   6

Definition at line 63 of file SMESHGUI_SingleEditDlg.cxx.


Function Documentation

static bool findTriangles ( const SMDS_MeshNode *  theNode1,
const SMDS_MeshNode *  theNode2,
const SMDS_MeshElement *&  theTria1,
const SMDS_MeshElement *&  theTria2 
) [static]

Definition at line 295 of file SMESHGUI_SingleEditDlg.cxx.

{
  if (!theNode1 || !theNode2) return false;

  theTria1 = theTria2 = 0;

  std::set< const SMDS_MeshElement* > emap;
  SMDS_ElemIteratorPtr it = theNode1->GetInverseElementIterator();
  while (it->more()) {
    const SMDS_MeshElement* elem = it->next();
    if (elem->GetType() == SMDSAbs_Face && elem->NbNodes() == 3)
      emap.insert(elem);
  }
  it = theNode2->GetInverseElementIterator();
  while (it->more()) {
    const SMDS_MeshElement* elem = it->next();
    if (elem->GetType() == SMDSAbs_Face &&
         emap.find(elem) != emap.end())
    {
      if (theTria1) {
        theTria2 = elem;
        break;
      } else {
        theTria1 = elem;
      }
    }
  }
  return (theTria1 && theTria2);
}