Version: 6.3.1
Data Structures | Defines | Functions

src/SMESHGUI/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>
Include dependency graph for SMESHGUI_SingleEditDlg.cxx:

Go to the source code of this file.

Data Structures

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.

References SMDS_MeshNode.GetInverseElementIterator(), SMDS_MeshElement.GetType(), SMDS_MeshElement.NbNodes(), and SMDSAbs_Face.

Referenced by SMESHGUI_SingleEditDlg.onSelectionDone(), and SMESHGUI_SingleEditDlg.onTextChange().

{
  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);
}
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS