mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 10:20:34 +05:00
PR: test of use of vtk structures in SMDS, first part: only nodes, tested only with hexahedrons.
This commit is contained in:
parent
ec71bd93d2
commit
6cf440ddd4
@ -76,6 +76,9 @@ if test -z $QWTHOME; then
|
|||||||
if test ! -f $QWT_INCDIR/qwt.h ; then
|
if test ! -f $QWT_INCDIR/qwt.h ; then
|
||||||
QWT_INCDIR=/usr/lib/qt4/include/qwt
|
QWT_INCDIR=/usr/lib/qt4/include/qwt
|
||||||
fi
|
fi
|
||||||
|
if test ! -f $QWT_INCDIR/qwt.h ; then
|
||||||
|
QWT_INCDIR=/usr/include/qwt-qt4
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
qwt_ok=no
|
qwt_ok=no
|
||||||
|
@ -31,7 +31,7 @@ CREATE_SUBDIRS = NO
|
|||||||
OUTPUT_LANGUAGE = English
|
OUTPUT_LANGUAGE = English
|
||||||
USE_WINDOWS_ENCODING = NO
|
USE_WINDOWS_ENCODING = NO
|
||||||
BRIEF_MEMBER_DESC = YES
|
BRIEF_MEMBER_DESC = YES
|
||||||
REPEAT_BRIEF = NO
|
REPEAT_BRIEF = YES
|
||||||
ABBREVIATE_BRIEF =
|
ABBREVIATE_BRIEF =
|
||||||
ALWAYS_DETAILED_SEC = YES
|
ALWAYS_DETAILED_SEC = YES
|
||||||
INLINE_INHERITED_MEMB = YES
|
INLINE_INHERITED_MEMB = YES
|
||||||
@ -69,7 +69,7 @@ CASE_SENSE_NAMES = YES
|
|||||||
HIDE_SCOPE_NAMES = NO
|
HIDE_SCOPE_NAMES = NO
|
||||||
SHOW_INCLUDE_FILES = YES
|
SHOW_INCLUDE_FILES = YES
|
||||||
INLINE_INFO = YES
|
INLINE_INFO = YES
|
||||||
SORT_MEMBER_DOCS = NO
|
SORT_MEMBER_DOCS = YES
|
||||||
SORT_BRIEF_DOCS = NO
|
SORT_BRIEF_DOCS = NO
|
||||||
SORT_BY_SCOPE_NAME = NO
|
SORT_BY_SCOPE_NAME = NO
|
||||||
GENERATE_TODOLIST = YES
|
GENERATE_TODOLIST = YES
|
||||||
@ -91,7 +91,7 @@ WARN_IF_UNDOCUMENTED = YES
|
|||||||
WARN_IF_DOC_ERROR = YES
|
WARN_IF_DOC_ERROR = YES
|
||||||
WARN_NO_PARAMDOC = NO
|
WARN_NO_PARAMDOC = NO
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
WARN_FORMAT = "$file:$line: $text"
|
||||||
WARN_LOGFILE =
|
WARN_LOGFILE = log.txt
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the input files
|
# configuration options related to the input files
|
||||||
@ -116,19 +116,19 @@ FILTER_SOURCE_FILES = YES
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to source browsing
|
# configuration options related to source browsing
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
SOURCE_BROWSER = NO
|
SOURCE_BROWSER = YES
|
||||||
INLINE_SOURCES = NO
|
INLINE_SOURCES = YES
|
||||||
STRIP_CODE_COMMENTS = YES
|
STRIP_CODE_COMMENTS = YES
|
||||||
REFERENCED_BY_RELATION = NO
|
REFERENCED_BY_RELATION = YES
|
||||||
REFERENCES_RELATION = YES
|
REFERENCES_RELATION = YES
|
||||||
USE_HTAGS = NO
|
#USE_HTAGS = NO
|
||||||
VERBATIM_HEADERS = YES
|
VERBATIM_HEADERS = YES
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# configuration options related to the alphabetical class index
|
# configuration options related to the alphabetical class index
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ALPHABETICAL_INDEX = YES
|
ALPHABETICAL_INDEX = YES
|
||||||
COLS_IN_ALPHA_INDEX = 3
|
COLS_IN_ALPHA_INDEX = 2
|
||||||
IGNORE_PREFIX =
|
IGNORE_PREFIX =
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@ -137,19 +137,19 @@ IGNORE_PREFIX =
|
|||||||
GENERATE_HTML = YES
|
GENERATE_HTML = YES
|
||||||
HTML_OUTPUT = .
|
HTML_OUTPUT = .
|
||||||
HTML_FILE_EXTENSION = .html
|
HTML_FILE_EXTENSION = .html
|
||||||
HTML_HEADER = @srcdir@/static/myheader.html
|
#HTML_HEADER = @srcdir@/static/myheader.html
|
||||||
HTML_FOOTER = @srcdir@/static/footer.html
|
#HTML_FOOTER = @srcdir@/static/footer.html
|
||||||
HTML_STYLESHEET = @srcdir@/static/doxygen.css
|
#HTML_STYLESHEET = @srcdir@/static/doxygen.css
|
||||||
HTML_ALIGN_MEMBERS = YES
|
HTML_ALIGN_MEMBERS = YES
|
||||||
GENERATE_HTMLHELP = NO
|
GENERATE_HTMLHELP = NO
|
||||||
CHM_FILE =
|
CHM_FILE =
|
||||||
HHC_LOCATION =
|
HHC_LOCATION =
|
||||||
GENERATE_CHI = NO
|
GENERATE_CHI = NO
|
||||||
BINARY_TOC = YES
|
BINARY_TOC = NO
|
||||||
TOC_EXPAND = YES
|
TOC_EXPAND = NO
|
||||||
DISABLE_INDEX = NO
|
DISABLE_INDEX = NO
|
||||||
ENUM_VALUES_PER_LINE = 4
|
ENUM_VALUES_PER_LINE = 4
|
||||||
GENERATE_TREEVIEW = NO
|
GENERATE_TREEVIEW = YES
|
||||||
TREEVIEW_WIDTH = 250
|
TREEVIEW_WIDTH = 250
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
@ -212,14 +212,14 @@ PERLMOD_MAKEVAR_PREFIX =
|
|||||||
# Configuration options related to the preprocessor
|
# Configuration options related to the preprocessor
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
ENABLE_PREPROCESSING = YES
|
ENABLE_PREPROCESSING = YES
|
||||||
MACRO_EXPANSION = NO
|
MACRO_EXPANSION = YES
|
||||||
EXPAND_ONLY_PREDEF = NO
|
EXPAND_ONLY_PREDEF = NO
|
||||||
SEARCH_INCLUDES = YES
|
SEARCH_INCLUDES = YES
|
||||||
INCLUDE_PATH =
|
INCLUDE_PATH =
|
||||||
INCLUDE_FILE_PATTERNS =
|
INCLUDE_FILE_PATTERNS =
|
||||||
PREDEFINED =
|
PREDEFINED =
|
||||||
EXPAND_AS_DEFINED =
|
EXPAND_AS_DEFINED =
|
||||||
SKIP_FUNCTION_MACROS = NO
|
SKIP_FUNCTION_MACROS = YES
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration::additions related to external references
|
# Configuration::additions related to external references
|
||||||
@ -237,24 +237,24 @@ CLASS_DIAGRAMS = YES
|
|||||||
HIDE_UNDOC_RELATIONS = NO
|
HIDE_UNDOC_RELATIONS = NO
|
||||||
HAVE_DOT = YES
|
HAVE_DOT = YES
|
||||||
CLASS_GRAPH = YES
|
CLASS_GRAPH = YES
|
||||||
COLLABORATION_GRAPH = NO
|
COLLABORATION_GRAPH = YES
|
||||||
GROUP_GRAPHS = NO
|
GROUP_GRAPHS = YES
|
||||||
UML_LOOK = NO
|
UML_LOOK = NO
|
||||||
TEMPLATE_RELATIONS = YES
|
TEMPLATE_RELATIONS = YES
|
||||||
INCLUDE_GRAPH = YES
|
INCLUDE_GRAPH = YES
|
||||||
INCLUDED_BY_GRAPH = NO
|
INCLUDED_BY_GRAPH = YES
|
||||||
CALL_GRAPH = NO
|
CALL_GRAPH = NO
|
||||||
GRAPHICAL_HIERARCHY = YES
|
GRAPHICAL_HIERARCHY = YES
|
||||||
DIRECTORY_GRAPH = YES
|
DIRECTORY_GRAPH = YES
|
||||||
DOT_IMAGE_FORMAT = jpg
|
DOT_IMAGE_FORMAT = png
|
||||||
DOT_PATH =
|
DOT_PATH =
|
||||||
DOTFILE_DIRS =
|
DOTFILE_DIRS =
|
||||||
MAX_DOT_GRAPH_WIDTH = 1024
|
MAX_DOT_GRAPH_WIDTH = 1024
|
||||||
MAX_DOT_GRAPH_HEIGHT = 1200
|
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||||
MAX_DOT_GRAPH_DEPTH = 0
|
MAX_DOT_GRAPH_DEPTH = 1000
|
||||||
DOT_TRANSPARENT = NO
|
DOT_TRANSPARENT = NO
|
||||||
DOT_MULTI_TARGETS = NO
|
DOT_MULTI_TARGETS = NO
|
||||||
GENERATE_LEGEND = NO
|
GENERATE_LEGEND = YES
|
||||||
DOT_CLEANUP = YES
|
DOT_CLEANUP = YES
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
@ -45,6 +45,7 @@ dist_SMESHControls_SOURCES = \
|
|||||||
# additionnal information to compil and link file
|
# additionnal information to compil and link file
|
||||||
libSMESHControls_la_CPPFLAGS = \
|
libSMESHControls_la_CPPFLAGS = \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
-I$(srcdir)/../SMDS \
|
-I$(srcdir)/../SMDS \
|
||||||
|
@ -2815,7 +2815,7 @@ void ManifoldPart::expandBoundary
|
|||||||
void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
|
void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
|
||||||
ManifoldPart::TVectorOfFacePtr& theFaces ) const
|
ManifoldPart::TVectorOfFacePtr& theFaces ) const
|
||||||
{
|
{
|
||||||
SMDS_Mesh::SetOfFaces aSetOfFaces;
|
std::set<SMDS_MeshCell *> aSetOfFaces;
|
||||||
// take all faces that shared first node
|
// take all faces that shared first node
|
||||||
SMDS_ElemIteratorPtr anItr = theLink.myNode1->facesIterator();
|
SMDS_ElemIteratorPtr anItr = theLink.myNode1->facesIterator();
|
||||||
for ( ; anItr->more(); )
|
for ( ; anItr->more(); )
|
||||||
@ -2823,7 +2823,7 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
|
|||||||
SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next();
|
SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next();
|
||||||
if ( !aFace )
|
if ( !aFace )
|
||||||
continue;
|
continue;
|
||||||
aSetOfFaces.Add( aFace );
|
aSetOfFaces.insert( aFace );
|
||||||
}
|
}
|
||||||
// take all faces that shared second node
|
// take all faces that shared second node
|
||||||
anItr = theLink.myNode2->facesIterator();
|
anItr = theLink.myNode2->facesIterator();
|
||||||
@ -2831,7 +2831,7 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink,
|
|||||||
for ( ; anItr->more(); )
|
for ( ; anItr->more(); )
|
||||||
{
|
{
|
||||||
SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next();
|
SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next();
|
||||||
if ( aSetOfFaces.Contains( aFace ) )
|
if ( aSetOfFaces.count( aFace ) )
|
||||||
theFaces.push_back( aFace );
|
theFaces.push_back( aFace );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ dist_DAT_Test_SOURCES = \
|
|||||||
libMeshDriverDAT_la_CPPFLAGS = \
|
libMeshDriverDAT_la_CPPFLAGS = \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
-I$(srcdir)/../Driver \
|
-I$(srcdir)/../Driver \
|
||||||
-I$(srcdir)/../SMDS \
|
-I$(srcdir)/../SMDS \
|
||||||
|
@ -63,6 +63,7 @@ libMeshDriverMED_la_CPPFLAGS = \
|
|||||||
@HDF5_INCLUDES@ \
|
@HDF5_INCLUDES@ \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
-I$(srcdir)/../Driver \
|
-I$(srcdir)/../Driver \
|
||||||
-I$(srcdir)/../SMDS \
|
-I$(srcdir)/../SMDS \
|
||||||
|
@ -52,6 +52,7 @@ dist_STL_Test_SOURCES = \
|
|||||||
libMeshDriverSTL_la_CPPFLAGS = \
|
libMeshDriverSTL_la_CPPFLAGS = \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
-I$(srcdir)/../Driver \
|
-I$(srcdir)/../Driver \
|
||||||
-I$(srcdir)/../SMDS
|
-I$(srcdir)/../SMDS
|
||||||
|
@ -71,6 +71,7 @@ libMeshDriverUNV_la_CPPFLAGS = \
|
|||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(CORBA_CXXFLAGS) \
|
$(CORBA_CXXFLAGS) \
|
||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
-I$(srcdir)/../Driver \
|
-I$(srcdir)/../Driver \
|
||||||
-I$(srcdir)/../SMDS \
|
-I$(srcdir)/../SMDS \
|
||||||
|
@ -43,6 +43,7 @@ salomeinclude_HEADERS = \
|
|||||||
SMDS_MeshGroup.hxx \
|
SMDS_MeshGroup.hxx \
|
||||||
SMDS_MeshIDFactory.hxx \
|
SMDS_MeshIDFactory.hxx \
|
||||||
SMDS_MeshNode.hxx \
|
SMDS_MeshNode.hxx \
|
||||||
|
SMDS_MeshNodeIDFactory.hxx \
|
||||||
SMDS_MeshObject.hxx \
|
SMDS_MeshObject.hxx \
|
||||||
SMDS_MeshVolume.hxx \
|
SMDS_MeshVolume.hxx \
|
||||||
SMDS_Position.hxx \
|
SMDS_Position.hxx \
|
||||||
@ -81,6 +82,7 @@ dist_libSMDS_la_SOURCES = \
|
|||||||
SMDS_MeshEdge.cxx \
|
SMDS_MeshEdge.cxx \
|
||||||
SMDS_MeshFace.cxx \
|
SMDS_MeshFace.cxx \
|
||||||
SMDS_MeshVolume.cxx \
|
SMDS_MeshVolume.cxx \
|
||||||
|
SMDS_MeshNodeIDFactory.cxx \
|
||||||
SMDS_MeshElementIDFactory.cxx \
|
SMDS_MeshElementIDFactory.cxx \
|
||||||
SMDS_MeshGroup.cxx \
|
SMDS_MeshGroup.cxx \
|
||||||
SMDS_MeshIDFactory.cxx \
|
SMDS_MeshIDFactory.cxx \
|
||||||
@ -101,9 +103,11 @@ dist_libSMDS_la_SOURCES = \
|
|||||||
libSMDS_la_CPPFLAGS = \
|
libSMDS_la_CPPFLAGS = \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS)
|
$(BOOST_CPPFLAGS)
|
||||||
|
|
||||||
libSMDS_la_LDFLAGS = \
|
libSMDS_la_LDFLAGS = \
|
||||||
|
$(VTK_LIBS) \
|
||||||
$(KERNEL_LDFLAGS) -lSALOMELocalTrace \
|
$(KERNEL_LDFLAGS) -lSALOMELocalTrace \
|
||||||
$(CAS_KERNEL)
|
$(CAS_KERNEL)
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -33,20 +33,28 @@
|
|||||||
#include "SMDS_MeshEdge.hxx"
|
#include "SMDS_MeshEdge.hxx"
|
||||||
#include "SMDS_MeshFace.hxx"
|
#include "SMDS_MeshFace.hxx"
|
||||||
#include "SMDS_MeshVolume.hxx"
|
#include "SMDS_MeshVolume.hxx"
|
||||||
|
#include "SMDS_MeshNodeIDFactory.hxx"
|
||||||
#include "SMDS_MeshElementIDFactory.hxx"
|
#include "SMDS_MeshElementIDFactory.hxx"
|
||||||
#include "SMDS_MeshInfo.hxx"
|
#include "SMDS_MeshInfo.hxx"
|
||||||
#include "SMDS_ElemIterator.hxx"
|
#include "SMDS_ElemIterator.hxx"
|
||||||
#include <NCollection_Map.hxx>
|
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <vector>
|
||||||
|
#include <vtkSystemIncludes.h>
|
||||||
|
|
||||||
|
class vtkUnstructuredGrid;
|
||||||
|
|
||||||
class SMDS_EXPORT SMDS_Mesh:public SMDS_MeshObject{
|
class SMDS_EXPORT SMDS_Mesh:public SMDS_MeshObject{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
static std::vector<SMDS_Mesh*> _meshList; // --- to find the SMDS_mesh from its elements
|
||||||
|
|
||||||
SMDS_Mesh();
|
SMDS_Mesh();
|
||||||
|
|
||||||
|
inline vtkUnstructuredGrid* getGrid() {return myGrid; };
|
||||||
|
|
||||||
SMDS_NodeIteratorPtr nodesIterator() const;
|
SMDS_NodeIteratorPtr nodesIterator() const;
|
||||||
SMDS_0DElementIteratorPtr elements0dIterator() const;
|
SMDS_0DElementIteratorPtr elements0dIterator() const;
|
||||||
SMDS_EdgeIteratorPtr edgesIterator() const;
|
SMDS_EdgeIteratorPtr edgesIterator() const;
|
||||||
@ -537,11 +545,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool Contains (const SMDS_MeshElement* elem) const;
|
bool Contains (const SMDS_MeshElement* elem) const;
|
||||||
|
|
||||||
typedef NCollection_Map<SMDS_MeshNode *> SetOfNodes;
|
typedef std::vector<SMDS_MeshNode *> SetOfNodes;
|
||||||
typedef NCollection_Map<SMDS_Mesh0DElement *> SetOf0DElements;
|
typedef std::vector<SMDS_MeshCell *> SetOfCells;
|
||||||
typedef NCollection_Map<SMDS_MeshEdge *> SetOfEdges;
|
|
||||||
typedef NCollection_Map<SMDS_MeshFace *> SetOfFaces;
|
void updateNodeMinMax();
|
||||||
typedef NCollection_Map<SMDS_MeshVolume *> SetOfVolumes;
|
int fromVtkToSmds(int vtkid) { return myElementIDFactory->fromVtkToSmds(vtkid); };
|
||||||
|
|
||||||
|
int myCellLinksSize;
|
||||||
|
|
||||||
|
static int chunkSize;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SMDS_Mesh(SMDS_Mesh * parent);
|
SMDS_Mesh(SMDS_Mesh * parent);
|
||||||
@ -552,8 +564,9 @@ private:
|
|||||||
SMDS_MeshFace * createQuadrangle(const SMDS_MeshNode * node1,
|
SMDS_MeshFace * createQuadrangle(const SMDS_MeshNode * node1,
|
||||||
const SMDS_MeshNode * node2,
|
const SMDS_MeshNode * node2,
|
||||||
const SMDS_MeshNode * node3,
|
const SMDS_MeshNode * node3,
|
||||||
const SMDS_MeshNode * node4);
|
const SMDS_MeshNode * node4,
|
||||||
SMDS_Mesh0DElement* Find0DElementOrCreate(const SMDS_MeshNode * n);
|
int ID);
|
||||||
|
// SMDS_Mesh0DElement* Find0DElementOrCreate(const SMDS_MeshNode * n);
|
||||||
SMDS_MeshEdge* FindEdgeOrCreate(const SMDS_MeshNode * n1,
|
SMDS_MeshEdge* FindEdgeOrCreate(const SMDS_MeshNode * n1,
|
||||||
const SMDS_MeshNode * n2);
|
const SMDS_MeshNode * n2);
|
||||||
SMDS_MeshFace* FindFaceOrCreate(const SMDS_MeshNode *n1,
|
SMDS_MeshFace* FindFaceOrCreate(const SMDS_MeshNode *n1,
|
||||||
@ -570,19 +583,36 @@ private:
|
|||||||
const SMDS_MeshElement * element,
|
const SMDS_MeshElement * element,
|
||||||
std::set<const SMDS_MeshElement*>& nodes);
|
std::set<const SMDS_MeshElement*>& nodes);
|
||||||
|
|
||||||
|
inline void adjustmyCellsCapacity(int ID)
|
||||||
|
{
|
||||||
|
assert(ID >= 0);
|
||||||
|
if (ID >= myCells.size())
|
||||||
|
myCells.resize(ID+SMDS_Mesh::chunkSize,0);
|
||||||
|
};
|
||||||
|
|
||||||
// Fields PRIVATE
|
// Fields PRIVATE
|
||||||
|
|
||||||
|
int myMeshId; // --- index for this mesh in the vector
|
||||||
|
vtkUnstructuredGrid* myGrid;
|
||||||
|
|
||||||
|
|
||||||
SetOfNodes myNodes;
|
SetOfNodes myNodes;
|
||||||
SetOf0DElements my0DElements;
|
SetOfCells myCells;
|
||||||
SetOfEdges myEdges;
|
|
||||||
SetOfFaces myFaces;
|
// SetOf0DElements my0DElements;
|
||||||
SetOfVolumes myVolumes;
|
// SetOfEdges myEdges;
|
||||||
|
// SetOfFaces myFaces;
|
||||||
|
// SetOfVolumes myVolumes;
|
||||||
|
|
||||||
SMDS_Mesh * myParent;
|
SMDS_Mesh * myParent;
|
||||||
std::list<SMDS_Mesh *> myChildren;
|
std::list<SMDS_Mesh *> myChildren;
|
||||||
SMDS_MeshElementIDFactory *myNodeIDFactory;
|
SMDS_MeshNodeIDFactory *myNodeIDFactory;
|
||||||
SMDS_MeshElementIDFactory *myElementIDFactory;
|
SMDS_MeshElementIDFactory *myElementIDFactory;
|
||||||
SMDS_MeshInfo myInfo;
|
SMDS_MeshInfo myInfo;
|
||||||
|
|
||||||
|
int myNodeMin;
|
||||||
|
int myNodeMax;
|
||||||
|
|
||||||
bool myHasConstructionEdges;
|
bool myHasConstructionEdges;
|
||||||
bool myHasConstructionFaces;
|
bool myHasConstructionFaces;
|
||||||
bool myHasInverseElements;
|
bool myHasInverseElements;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "SMDS_Mesh0DElement.hxx"
|
#include "SMDS_Mesh0DElement.hxx"
|
||||||
#include "SMDS_IteratorOfElements.hxx"
|
#include "SMDS_IteratorOfElements.hxx"
|
||||||
#include "SMDS_MeshNode.hxx"
|
#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -39,7 +40,8 @@ using namespace std;
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
SMDS_Mesh0DElement::SMDS_Mesh0DElement (const SMDS_MeshNode * node)
|
SMDS_Mesh0DElement::SMDS_Mesh0DElement (const SMDS_MeshNode * node)
|
||||||
{
|
{
|
||||||
|
MESSAGE("SMDS_Mesh0DElement " << GetID());
|
||||||
myNode = node;
|
myNode = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
class SMDS_EXPORT SMDS_Mesh0DElement: public SMDS_MeshElement
|
class SMDS_EXPORT SMDS_Mesh0DElement: public SMDS_MeshCell
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SMDS_Mesh0DElement (const SMDS_MeshNode * node);
|
SMDS_Mesh0DElement (const SMDS_MeshNode * node);
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "SMDS_MeshEdge.hxx"
|
#include "SMDS_MeshEdge.hxx"
|
||||||
#include "SMDS_IteratorOfElements.hxx"
|
#include "SMDS_IteratorOfElements.hxx"
|
||||||
#include "SMDS_MeshNode.hxx"
|
#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ using namespace std;
|
|||||||
SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
||||||
const SMDS_MeshNode * node2)
|
const SMDS_MeshNode * node2)
|
||||||
{
|
{
|
||||||
|
//MESSAGE("SMDS_MeshEdge " << GetID());
|
||||||
myNodes[0]=node1;
|
myNodes[0]=node1;
|
||||||
myNodes[1]=node2;
|
myNodes[1]=node2;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "SMDS_MeshElement.hxx"
|
#include "SMDS_MeshElement.hxx"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
class SMDS_EXPORT SMDS_MeshEdge:public SMDS_MeshElement
|
class SMDS_EXPORT SMDS_MeshEdge:public SMDS_MeshCell
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -38,6 +38,11 @@ SMDS_MeshElement::SMDS_MeshElement(int ID):myID(ID)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SMDS_MeshElement::SMDS_MeshElement(int id, UShortType meshId, ShortType shapeId):
|
||||||
|
myID(id), myMeshId(meshId), myShapeId(shapeId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void SMDS_MeshElement::Print(ostream & OS) const
|
void SMDS_MeshElement::Print(ostream & OS) const
|
||||||
{
|
{
|
||||||
OS << "dump of mesh element" << endl;
|
OS << "dump of mesh element" << endl;
|
||||||
@ -238,3 +243,8 @@ int SMDS_MeshElement::GetNodeIndex( const SMDS_MeshNode* node ) const
|
|||||||
return i;
|
return i;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SMDS_MeshCell::SMDS_MeshCell()
|
||||||
|
{
|
||||||
|
myVtkID = -1;
|
||||||
|
};
|
@ -36,6 +36,9 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
typedef unsigned short UShortType;
|
||||||
|
typedef short ShortType;
|
||||||
|
|
||||||
class SMDS_MeshNode;
|
class SMDS_MeshNode;
|
||||||
class SMDS_MeshEdge;
|
class SMDS_MeshEdge;
|
||||||
class SMDS_MeshFace;
|
class SMDS_MeshFace;
|
||||||
@ -116,14 +119,38 @@ public:
|
|||||||
*/
|
*/
|
||||||
int GetNodeIndex( const SMDS_MeshNode* node ) const;
|
int GetNodeIndex( const SMDS_MeshNode* node ) const;
|
||||||
|
|
||||||
|
inline int getId() {return myID; };
|
||||||
|
inline UShortType getMeshId() {return myMeshId; };
|
||||||
|
inline ShortType getshapeId() {return myShapeId; };
|
||||||
|
inline void setShapeId(UShortType shapeId) {myShapeId = shapeId; };
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SMDS_MeshElement(int ID=-1);
|
SMDS_MeshElement(int ID=-1);
|
||||||
|
SMDS_MeshElement(int id, UShortType meshId, ShortType shapeId=-1);
|
||||||
virtual void Print(std::ostream & OS) const;
|
virtual void Print(std::ostream & OS) const;
|
||||||
|
|
||||||
private:
|
int myID; // --- element index
|
||||||
int myID;
|
UShortType myMeshId;
|
||||||
|
ShortType myShapeId;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ============================================================
|
||||||
|
/*!
|
||||||
|
* \brief Base class for all cells
|
||||||
|
*/
|
||||||
|
// ============================================================
|
||||||
|
|
||||||
|
class SMDS_EXPORT SMDS_MeshCell:public SMDS_MeshElement
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SMDS_MeshCell();
|
||||||
|
inline void setVtkId(int vtkId) { myVtkID = vtkId; };
|
||||||
|
inline int getVtkId() const {return myVtkID; };
|
||||||
|
protected:
|
||||||
|
int myVtkID;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Comparator of elements by ID for usage in std containers
|
* \brief Comparator of elements by ID for usage in std containers
|
||||||
|
@ -30,6 +30,12 @@
|
|||||||
|
|
||||||
#include "SMDS_MeshElementIDFactory.hxx"
|
#include "SMDS_MeshElementIDFactory.hxx"
|
||||||
#include "SMDS_MeshElement.hxx"
|
#include "SMDS_MeshElement.hxx"
|
||||||
|
#include "SMDS_Mesh.hxx"
|
||||||
|
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
|
#include <vtkUnstructuredGrid.h>
|
||||||
|
#include <vtkCellType.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -38,9 +44,32 @@ using namespace std;
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
SMDS_MeshElementIDFactory::SMDS_MeshElementIDFactory():
|
SMDS_MeshElementIDFactory::SMDS_MeshElementIDFactory():
|
||||||
SMDS_MeshIDFactory(),
|
SMDS_MeshNodeIDFactory()
|
||||||
myMin(0), myMax(0)
|
|
||||||
{
|
{
|
||||||
|
myIDElements.clear();
|
||||||
|
myVtkIndex.clear();
|
||||||
|
myVtkCellTypes.clear();
|
||||||
|
myVtkCellTypes.reserve(SMDSEntity_Last);
|
||||||
|
myVtkCellTypes[SMDSEntity_Node] = VTK_VERTEX;
|
||||||
|
myVtkCellTypes[SMDSEntity_0D] = VTK_VERTEX;
|
||||||
|
myVtkCellTypes[SMDSEntity_Edge] = VTK_LINE;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Edge] = VTK_QUADRATIC_EDGE;
|
||||||
|
myVtkCellTypes[SMDSEntity_Triangle] = VTK_TRIANGLE;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Triangle] = VTK_QUADRATIC_TRIANGLE;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quadrangle] = VTK_QUAD;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Quadrangle] = VTK_QUADRATIC_TRIANGLE;
|
||||||
|
myVtkCellTypes[SMDSEntity_Polygon] = VTK_POLYGON;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Polygon] = VTK_POLYGON; // -PR- verifer
|
||||||
|
myVtkCellTypes[SMDSEntity_Tetra] = VTK_TETRA;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Tetra] = VTK_QUADRATIC_TETRA;
|
||||||
|
myVtkCellTypes[SMDSEntity_Pyramid] = VTK_PYRAMID;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Pyramid] = VTK_CONVEX_POINT_SET;
|
||||||
|
myVtkCellTypes[SMDSEntity_Hexa] = VTK_HEXAHEDRON;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Hexa] = VTK_QUADRATIC_HEXAHEDRON;
|
||||||
|
myVtkCellTypes[SMDSEntity_Penta] = VTK_WEDGE;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Penta] = VTK_QUADRATIC_WEDGE;
|
||||||
|
myVtkCellTypes[SMDSEntity_Polyhedra] = VTK_CONVEX_POINT_SET;
|
||||||
|
myVtkCellTypes[SMDSEntity_Quad_Polyhedra] = VTK_CONVEX_POINT_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -49,10 +78,51 @@ SMDS_MeshElementIDFactory::SMDS_MeshElementIDFactory():
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool SMDS_MeshElementIDFactory::BindID(int ID, SMDS_MeshElement * elem)
|
bool SMDS_MeshElementIDFactory::BindID(int ID, SMDS_MeshElement * elem)
|
||||||
{
|
{
|
||||||
if (myIDElements.IsBound(ID))
|
if ((ID < myIDElements.size()) && myIDElements[ID] >= 0) // --- already bound
|
||||||
return false;
|
{
|
||||||
myIDElements.Bind(ID,elem);
|
MESSAGE(" --------------------------------- already bound "<< ID << " " << myIDElements[ID]);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ID >= myIDElements.size()) // --- resize local vector
|
||||||
|
{
|
||||||
|
//MESSAGE(" ------------------- resize myIDElements " << ID << " --> " << ID+SMDS_Mesh::chunkSize);
|
||||||
|
myIDElements.resize(ID+SMDS_Mesh::chunkSize,-1); // fill new elements with -1
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- retreive nodes ID
|
||||||
|
|
||||||
|
vector<int> nodeIds;
|
||||||
|
SMDS_ElemIteratorPtr it = elem->nodesIterator();
|
||||||
|
while(it->more())
|
||||||
|
{
|
||||||
|
int nodeId = it->next()->GetID();
|
||||||
|
//MESSAGE(" node in cell " << ID << " : " <<nodeId)
|
||||||
|
nodeIds.push_back(nodeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- insert cell in vtkUnstructuredGrid
|
||||||
|
|
||||||
|
vtkUnstructuredGrid * grid = myMesh->getGrid();
|
||||||
|
int typ = GetVtkCellType(elem->GetType());
|
||||||
|
int cellId = grid->InsertNextLinkedCell(typ, nodeIds.size(), &nodeIds[0]);
|
||||||
|
|
||||||
|
// --- fill local vector
|
||||||
|
|
||||||
|
myIDElements[ID] = cellId;
|
||||||
|
//MESSAGE("smds:" << ID << " vtk:" << cellId );
|
||||||
|
|
||||||
|
if (cellId >= myVtkIndex.size()) // --- resize local vector
|
||||||
|
{
|
||||||
|
//MESSAGE(" --------------------- resize myVtkIndex " << cellId << " --> " << cellId+SMDS_Mesh::chunkSize);
|
||||||
|
myVtkIndex.resize(cellId+SMDS_Mesh::chunkSize, -1);
|
||||||
|
}
|
||||||
|
myVtkIndex[cellId] = ID;
|
||||||
|
|
||||||
elem->myID=ID;
|
elem->myID=ID;
|
||||||
|
SMDS_MeshCell *cell = dynamic_cast<SMDS_MeshCell*>(elem);
|
||||||
|
assert(cell);
|
||||||
|
cell->setVtkId(cellId);
|
||||||
updateMinMax (ID);
|
updateMinMax (ID);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -63,23 +133,10 @@ bool SMDS_MeshElementIDFactory::BindID(int ID, SMDS_MeshElement * elem)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
SMDS_MeshElement* SMDS_MeshElementIDFactory::MeshElement(int ID)
|
SMDS_MeshElement* SMDS_MeshElementIDFactory::MeshElement(int ID)
|
||||||
{
|
{
|
||||||
if (!myIDElements.IsBound(ID))
|
if ((ID<0) || (ID>myMax) || (myIDElements[ID]<0))
|
||||||
return NULL;
|
return NULL;
|
||||||
return myIDElements.Find(ID);
|
const SMDS_MeshElement* elem = GetMesh()->FindElement(ID);
|
||||||
}
|
return (SMDS_MeshElement*)(elem);
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : GetFreeID
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
int SMDS_MeshElementIDFactory::GetFreeID()
|
|
||||||
{
|
|
||||||
int ID;
|
|
||||||
do {
|
|
||||||
ID = SMDS_MeshIDFactory::GetFreeID();
|
|
||||||
} while (myIDElements.IsBound(ID));
|
|
||||||
return ID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -88,36 +145,12 @@ int SMDS_MeshElementIDFactory::GetFreeID()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMDS_MeshElementIDFactory::ReleaseID(const int ID)
|
void SMDS_MeshElementIDFactory::ReleaseID(const int ID)
|
||||||
{
|
{
|
||||||
myIDElements.UnBind(ID);
|
myIDElements[ID] = -1;
|
||||||
SMDS_MeshIDFactory::ReleaseID(ID);
|
SMDS_MeshIDFactory::ReleaseID(ID);
|
||||||
if (ID == myMax)
|
if (ID == myMax)
|
||||||
myMax = 0;
|
myMax = 0;
|
||||||
if (ID == myMin)
|
if (ID == myMin)
|
||||||
myMin = 0;
|
myMax = 0;
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : GetMaxID
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
int SMDS_MeshElementIDFactory::GetMaxID() const
|
|
||||||
{
|
|
||||||
if (myMax == 0)
|
|
||||||
updateMinMax();
|
|
||||||
return myMax;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : GetMinID
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
int SMDS_MeshElementIDFactory::GetMinID() const
|
|
||||||
{
|
|
||||||
if (myMin == 0)
|
|
||||||
updateMinMax();
|
|
||||||
return myMin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -129,9 +162,12 @@ void SMDS_MeshElementIDFactory::updateMinMax() const
|
|||||||
{
|
{
|
||||||
myMin = IntegerLast();
|
myMin = IntegerLast();
|
||||||
myMax = 0;
|
myMax = 0;
|
||||||
SMDS_IdElementMap::Iterator it(myIDElements);
|
for (int i=0; i<myIDElements.size(); i++)
|
||||||
for (; it.More(); it.Next())
|
if (int id=myIDElements[i] >=0)
|
||||||
updateMinMax (it.Key());
|
{
|
||||||
|
if (id > myMax) myMax = id;
|
||||||
|
if (id < myMin) myMin = id;
|
||||||
|
}
|
||||||
if (myMin == IntegerLast())
|
if (myMin == IntegerLast())
|
||||||
myMin = 0;
|
myMin = 0;
|
||||||
}
|
}
|
||||||
@ -141,35 +177,20 @@ void SMDS_MeshElementIDFactory::updateMinMax() const
|
|||||||
//purpose : Return an iterator on elements of the factory
|
//purpose : Return an iterator on elements of the factory
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
class SMDS_Fact_MyElemIterator:public SMDS_ElemIterator
|
|
||||||
{
|
|
||||||
SMDS_IdElementMap::Iterator myIterator;
|
|
||||||
public:
|
|
||||||
SMDS_Fact_MyElemIterator(const SMDS_IdElementMap& s):myIterator(s)
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool more()
|
|
||||||
{
|
|
||||||
return myIterator.More() != Standard_False;
|
|
||||||
}
|
|
||||||
|
|
||||||
const SMDS_MeshElement* next()
|
|
||||||
{
|
|
||||||
const SMDS_MeshElement* current = myIterator.Value();
|
|
||||||
myIterator.Next();
|
|
||||||
return current;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SMDS_ElemIteratorPtr SMDS_MeshElementIDFactory::elementsIterator() const
|
SMDS_ElemIteratorPtr SMDS_MeshElementIDFactory::elementsIterator() const
|
||||||
{
|
{
|
||||||
return SMDS_ElemIteratorPtr
|
return myMesh->elementsIterator(SMDSAbs_All);
|
||||||
(new SMDS_Fact_MyElemIterator(myIDElements));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMDS_MeshElementIDFactory::Clear()
|
void SMDS_MeshElementIDFactory::Clear()
|
||||||
{
|
{
|
||||||
myIDElements.Clear();
|
myIDElements.clear();
|
||||||
myMin = myMax = 0;
|
myMin = myMax = 0;
|
||||||
SMDS_MeshIDFactory::Clear();
|
SMDS_MeshIDFactory::Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SMDS_MeshElementIDFactory::GetVtkCellType(int SMDSType)
|
||||||
|
{
|
||||||
|
assert((SMDSType >=0) && (SMDSType< SMDSEntity_Last));
|
||||||
|
return myVtkCellTypes[SMDSType];
|
||||||
|
}
|
||||||
|
@ -28,28 +28,25 @@
|
|||||||
|
|
||||||
#include "SMESH_SMDS.hxx"
|
#include "SMESH_SMDS.hxx"
|
||||||
|
|
||||||
#include "SMDS_MeshIDFactory.hxx"
|
#include "SMDS_MeshNodeIDFactory.hxx"
|
||||||
#include "SMDS_ElemIterator.hxx"
|
|
||||||
|
|
||||||
#include <NCollection_DataMap.hxx>
|
#include <vector>
|
||||||
|
|
||||||
class SMDS_MeshElement;
|
class SMDS_MeshElement;
|
||||||
|
|
||||||
typedef NCollection_DataMap<int, SMDS_MeshElement *> SMDS_IdElementMap;
|
class SMDS_EXPORT SMDS_MeshElementIDFactory:public SMDS_MeshNodeIDFactory
|
||||||
|
|
||||||
class SMDS_EXPORT SMDS_MeshElementIDFactory:public SMDS_MeshIDFactory
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SMDS_MeshElementIDFactory();
|
SMDS_MeshElementIDFactory();
|
||||||
bool BindID(int ID, SMDS_MeshElement * elem);
|
bool BindID(int ID, SMDS_MeshElement * elem);
|
||||||
SMDS_MeshElement * MeshElement(int ID);
|
SMDS_MeshElement * MeshElement(int ID);
|
||||||
virtual int GetFreeID();
|
|
||||||
virtual void ReleaseID(int ID);
|
virtual void ReleaseID(int ID);
|
||||||
int GetMaxID() const;
|
|
||||||
int GetMinID() const;
|
|
||||||
SMDS_ElemIteratorPtr elementsIterator() const;
|
SMDS_ElemIteratorPtr elementsIterator() const;
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
private:
|
int GetVtkCellType(int SMDSType);
|
||||||
|
int fromVtkToSmds(int vtkid) { return myVtkIndex[vtkid]; };
|
||||||
|
|
||||||
|
protected:
|
||||||
void updateMinMax() const;
|
void updateMinMax() const;
|
||||||
void updateMinMax(int id) const
|
void updateMinMax(int id) const
|
||||||
{
|
{
|
||||||
@ -57,8 +54,9 @@ private:
|
|||||||
if (id < myMin) myMin = id;
|
if (id < myMin) myMin = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
SMDS_IdElementMap myIDElements;
|
std::vector<int> myIDElements; // index = ID client, value = ID vtk
|
||||||
mutable int myMin, myMax;
|
std::vector<int> myVtkIndex; // index = ID vtk, value = ID client
|
||||||
|
std::vector<int> myVtkCellTypes;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "SMDS_MeshElement.hxx"
|
#include "SMDS_MeshElement.hxx"
|
||||||
|
|
||||||
class SMDS_EXPORT SMDS_MeshFace:public SMDS_MeshElement
|
class SMDS_EXPORT SMDS_MeshFace:public SMDS_MeshCell
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SMDSAbs_ElementType GetType() const;
|
SMDSAbs_ElementType GetType() const;
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
//
|
//
|
||||||
#include "SMDS_MeshIDFactory.hxx"
|
#include "SMDS_MeshIDFactory.hxx"
|
||||||
|
#include "SMDS_Mesh.hxx"
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -33,20 +35,26 @@ using namespace std;
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
SMDS_MeshIDFactory::SMDS_MeshIDFactory():myMaxID(0)
|
SMDS_MeshIDFactory::SMDS_MeshIDFactory():myMaxID(-1), myMesh(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMDS_MeshIDFactory::GetFreeID()
|
int SMDS_MeshIDFactory::GetFreeID()
|
||||||
{
|
{
|
||||||
if (myPoolOfID.empty()) return ++myMaxID;
|
int newid;
|
||||||
|
if (myPoolOfID.empty())
|
||||||
|
{
|
||||||
|
newid = ++myMaxID;
|
||||||
|
//MESSAGE("GetFreeID new " << newid);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
set<int>::iterator i = myPoolOfID.begin();
|
set<int>::iterator i = myPoolOfID.begin();
|
||||||
int ID = *i;//myPoolOfID.top();
|
newid = *i;//myPoolOfID.top();
|
||||||
myPoolOfID.erase( i );//myPoolOfID.pop();
|
myPoolOfID.erase( i );//myPoolOfID.pop();
|
||||||
return ID;
|
MESSAGE("GetFreeID pool " << newid);
|
||||||
}
|
}
|
||||||
|
return newid;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -55,7 +63,7 @@ int SMDS_MeshIDFactory::GetFreeID()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMDS_MeshIDFactory::ReleaseID(const int ID)
|
void SMDS_MeshIDFactory::ReleaseID(const int ID)
|
||||||
{
|
{
|
||||||
if ( ID > 0 )
|
if ( ID >= 0 )
|
||||||
{
|
{
|
||||||
if ( ID < myMaxID )
|
if ( ID < myMaxID )
|
||||||
{
|
{
|
||||||
@ -82,6 +90,16 @@ void SMDS_MeshIDFactory::ReleaseID(const int ID)
|
|||||||
|
|
||||||
void SMDS_MeshIDFactory::Clear()
|
void SMDS_MeshIDFactory::Clear()
|
||||||
{
|
{
|
||||||
myMaxID = 0;
|
myMaxID = -1;
|
||||||
myPoolOfID.clear();
|
myPoolOfID.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SMDS_MeshIDFactory::SetMesh(SMDS_Mesh *mesh)
|
||||||
|
{
|
||||||
|
myMesh = mesh;
|
||||||
|
}
|
||||||
|
|
||||||
|
SMDS_Mesh* SMDS_MeshIDFactory::GetMesh()
|
||||||
|
{
|
||||||
|
return myMesh;
|
||||||
|
}
|
||||||
|
@ -31,18 +31,22 @@
|
|||||||
#include "SMDS_MeshObject.hxx"
|
#include "SMDS_MeshObject.hxx"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
class SMDS_Mesh;
|
||||||
|
|
||||||
class SMDS_EXPORT SMDS_MeshIDFactory:public SMDS_MeshObject
|
class SMDS_EXPORT SMDS_MeshIDFactory:public SMDS_MeshObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual int GetFreeID();
|
int GetFreeID();
|
||||||
virtual void ReleaseID(int ID);
|
virtual void ReleaseID(int ID);
|
||||||
virtual void Clear();
|
virtual void Clear();
|
||||||
|
|
||||||
protected:
|
void SetMesh(SMDS_Mesh *mesh);
|
||||||
SMDS_MeshIDFactory();
|
SMDS_Mesh* GetMesh();
|
||||||
int myMaxID;
|
protected:
|
||||||
std::set<int> myPoolOfID;
|
SMDS_MeshIDFactory();
|
||||||
|
int myMaxID;
|
||||||
|
std::set<int> myPoolOfID;
|
||||||
|
SMDS_Mesh *myMesh;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,6 +28,14 @@
|
|||||||
#include "SMDS_MeshNode.hxx"
|
#include "SMDS_MeshNode.hxx"
|
||||||
#include "SMDS_SpacePosition.hxx"
|
#include "SMDS_SpacePosition.hxx"
|
||||||
#include "SMDS_IteratorOfElements.hxx"
|
#include "SMDS_IteratorOfElements.hxx"
|
||||||
|
#include "SMDS_Mesh.hxx"
|
||||||
|
#include <vtkUnstructuredGrid.h>
|
||||||
|
|
||||||
|
#define protected public
|
||||||
|
#include <vtkCellLinks.h>
|
||||||
|
#define protected protected
|
||||||
|
|
||||||
|
#include "utilities.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -36,10 +44,50 @@ using namespace std;
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
SMDS_MeshNode::SMDS_MeshNode(double x, double y, double z):
|
SMDS_MeshNode::SMDS_MeshNode(int id, int meshId, int shapeId, double x, double y, double z):
|
||||||
myX(x), myY(y), myZ(z),
|
SMDS_MeshElement(id, meshId, shapeId),
|
||||||
myPosition(SMDS_SpacePosition::originSpacePosition())
|
myPosition(SMDS_SpacePosition::originSpacePosition())
|
||||||
{
|
{
|
||||||
|
//MESSAGE("Node " << myID << " (" << x << ", " << y << ", " << z << ")");
|
||||||
|
SMDS_Mesh* mesh = SMDS_Mesh::_meshList[myMeshId];
|
||||||
|
vtkUnstructuredGrid * grid = mesh->getGrid();
|
||||||
|
vtkPoints *points = grid->GetPoints();
|
||||||
|
//int nbp = points->GetNumberOfPoints();
|
||||||
|
points->InsertPoint(myID, x, y, z);
|
||||||
|
if (myID >= mesh->myCellLinksSize)
|
||||||
|
{
|
||||||
|
//points->SetNumberOfPoints(myID+SMDS_Mesh::chunkSize);
|
||||||
|
vtkCellLinks *cellLinks = grid->GetCellLinks();
|
||||||
|
|
||||||
|
// int imax = cellLinks->Size;
|
||||||
|
// for (int i =0; i<imax; i++)
|
||||||
|
// {
|
||||||
|
// vtkCellLinks::Link &ilink = cellLinks->GetLink(i);
|
||||||
|
// int ncells = ilink.ncells;
|
||||||
|
// int *cells = ilink.cells;
|
||||||
|
// MESSAGE("NODE " << i << " " << cellLinks << " " << cells << " " << ncells);
|
||||||
|
// for (int j=0; j< ncells; j++)
|
||||||
|
// MESSAGE(" " << j << " " << cells[j]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
cellLinks->Resize(myID+SMDS_Mesh::chunkSize);
|
||||||
|
|
||||||
|
// cellLinks = grid->GetCellLinks();
|
||||||
|
// imax = cellLinks->Size;
|
||||||
|
// for (int i =0; i<imax; i++)
|
||||||
|
// {
|
||||||
|
// vtkCellLinks::Link &ilink = cellLinks->GetLink(i);
|
||||||
|
// int ncells = ilink.ncells;
|
||||||
|
// int *cells = ilink.cells;
|
||||||
|
// MESSAGE("NODE " << i << " " << cellLinks << " " << cells << " " << ncells);
|
||||||
|
// for (int j=0; j< ncells; j++)
|
||||||
|
// MESSAGE(" " << j << " " << cells[j]);
|
||||||
|
// }
|
||||||
|
|
||||||
|
mesh->myCellLinksSize = cellLinks->Size;
|
||||||
|
//MESSAGE(" -------------------------------------- resize CellLinks " << myID << " --> " << mesh->myCellLinksSize);
|
||||||
|
}
|
||||||
|
//setXYZ(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -49,14 +97,8 @@ SMDS_MeshNode::SMDS_MeshNode(double x, double y, double z):
|
|||||||
|
|
||||||
void SMDS_MeshNode::RemoveInverseElement(const SMDS_MeshElement * parent)
|
void SMDS_MeshNode::RemoveInverseElement(const SMDS_MeshElement * parent)
|
||||||
{
|
{
|
||||||
NCollection_List<const SMDS_MeshElement*>::Iterator it(myInverseElements);
|
MESSAGE("RemoveInverseElement " << myID << " " << parent->GetID());
|
||||||
while (it.More()) {
|
SMDS_Mesh::_meshList[myMeshId]->getGrid()->RemoveReferenceToCell(myID, parent->GetID()); // -PR- GetVtkID ?
|
||||||
const SMDS_MeshElement* elem = it.Value();
|
|
||||||
if (elem == parent)
|
|
||||||
myInverseElements.Remove(it);
|
|
||||||
else
|
|
||||||
it.Next();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -66,8 +108,8 @@ void SMDS_MeshNode::RemoveInverseElement(const SMDS_MeshElement * parent)
|
|||||||
|
|
||||||
void SMDS_MeshNode::Print(ostream & OS) const
|
void SMDS_MeshNode::Print(ostream & OS) const
|
||||||
{
|
{
|
||||||
OS << "Node <" << GetID() << "> : X = " << myX << " Y = "
|
OS << "Node <" << myID << "> : X = " << X() << " Y = "
|
||||||
<< myY << " Z = " << myZ << endl;
|
<< Y() << " Z = " << Z() << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -98,74 +140,88 @@ const SMDS_PositionPtr& SMDS_MeshNode::GetPosition() const
|
|||||||
|
|
||||||
class SMDS_MeshNode_MyInvIterator:public SMDS_ElemIterator
|
class SMDS_MeshNode_MyInvIterator:public SMDS_ElemIterator
|
||||||
{
|
{
|
||||||
NCollection_List<const SMDS_MeshElement*>::Iterator myIterator;
|
private:
|
||||||
|
SMDS_Mesh* myMesh;
|
||||||
|
int* myCells;
|
||||||
|
int myNcells;
|
||||||
SMDSAbs_ElementType myType;
|
SMDSAbs_ElementType myType;
|
||||||
|
int iter;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMDS_MeshNode_MyInvIterator(const NCollection_List<const SMDS_MeshElement*>& s,
|
SMDS_MeshNode_MyInvIterator(SMDS_Mesh *mesh,
|
||||||
|
int* cells,
|
||||||
|
int ncells,
|
||||||
SMDSAbs_ElementType type):
|
SMDSAbs_ElementType type):
|
||||||
myIterator(s), myType(type)
|
myMesh(mesh), myCells(cells), myNcells(ncells), myType(type), iter(0)
|
||||||
{}
|
{
|
||||||
|
//MESSAGE("SMDS_MeshNode_MyInvIterator : ncells " << myNcells);
|
||||||
|
}
|
||||||
|
|
||||||
bool more()
|
bool more()
|
||||||
{
|
{
|
||||||
if ( myType != SMDSAbs_All ) {
|
return (iter< myNcells);
|
||||||
while ( myIterator.More() && myIterator.Value()->GetType() != myType)
|
|
||||||
myIterator.Next();
|
|
||||||
}
|
|
||||||
return myIterator.More() != Standard_False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const SMDS_MeshElement* next()
|
const SMDS_MeshElement* next()
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* current=myIterator.Value();
|
int vtkId = myCells[iter];
|
||||||
myIterator.Next();
|
int smdsId = myMesh->fromVtkToSmds(vtkId);
|
||||||
return current;
|
const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
|
||||||
|
iter++;
|
||||||
|
return elem;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||||
GetInverseElementIterator(SMDSAbs_ElementType type) const
|
GetInverseElementIterator(SMDSAbs_ElementType type) const
|
||||||
{
|
{
|
||||||
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(myInverseElements,type));
|
vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myID);
|
||||||
|
//MESSAGE("ncells " << l.ncells);
|
||||||
|
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Same as GetInverseElementIterator but the create iterator only return
|
// Same as GetInverseElementIterator but the create iterator only return
|
||||||
// wanted type elements.
|
// wanted type elements.
|
||||||
class SMDS_MeshNode_MyIterator:public SMDS_ElemIterator
|
class SMDS_MeshNode_MyIterator:public SMDS_ElemIterator
|
||||||
{
|
{
|
||||||
NCollection_List<const SMDS_MeshElement*> mySet;
|
private:
|
||||||
NCollection_List<const SMDS_MeshElement*>::Iterator myIterator;
|
SMDS_Mesh* myMesh;
|
||||||
|
int* myCells;
|
||||||
|
int myNcells;
|
||||||
|
SMDSAbs_ElementType myType;
|
||||||
|
int iter;
|
||||||
|
vector<SMDS_MeshElement*> myFiltCells;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMDS_MeshNode_MyIterator(SMDSAbs_ElementType type,
|
SMDS_MeshNode_MyIterator(SMDS_Mesh *mesh,
|
||||||
const NCollection_List<const SMDS_MeshElement*>& s)
|
int* cells,
|
||||||
|
int ncells,
|
||||||
|
SMDSAbs_ElementType type):
|
||||||
|
myMesh(mesh), myCells(cells), myNcells(ncells), myType(type), iter(0)
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement * e;
|
for (; iter<ncells; iter++)
|
||||||
bool toInsert;
|
{
|
||||||
NCollection_List<const SMDS_MeshElement*>::Iterator it(s);
|
int vtkId = myCells[iter];
|
||||||
for(; it.More(); it.Next())
|
int smdsId = myMesh->fromVtkToSmds(vtkId);
|
||||||
{
|
const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
|
||||||
e=it.Value();
|
if (elem->GetType() == type)
|
||||||
switch(type)
|
myFiltCells.push_back((SMDS_MeshElement*)elem);
|
||||||
{
|
}
|
||||||
case SMDSAbs_Edge: toInsert=true; break;
|
myNcells = myFiltCells.size();
|
||||||
case SMDSAbs_Face: toInsert=(e->GetType()!=SMDSAbs_Edge); break;
|
iter = 0;
|
||||||
case SMDSAbs_Volume: toInsert=(e->GetType()==SMDSAbs_Volume); break;
|
//MESSAGE("SMDS_MeshNode_MyIterator (filter) " << ncells << " " << myNcells);
|
||||||
}
|
|
||||||
if(toInsert) mySet.Append(e);
|
|
||||||
}
|
|
||||||
myIterator.Init(mySet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool more()
|
bool more()
|
||||||
{
|
{
|
||||||
return myIterator.More() != Standard_False;
|
return (iter< myNcells);
|
||||||
}
|
}
|
||||||
|
|
||||||
const SMDS_MeshElement* next()
|
const SMDS_MeshElement* next()
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* current=myIterator.Value();
|
const SMDS_MeshElement* elem = myFiltCells[iter];
|
||||||
myIterator.Next();
|
iter++;
|
||||||
return current;
|
return elem;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -175,10 +231,10 @@ SMDS_ElemIteratorPtr SMDS_MeshNode::
|
|||||||
if(type==SMDSAbs_Node)
|
if(type==SMDSAbs_Node)
|
||||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
|
return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
|
||||||
else
|
else
|
||||||
return SMDS_ElemIteratorPtr
|
{
|
||||||
(new SMDS_IteratorOfElements
|
vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myID);
|
||||||
(this,type,
|
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(SMDS_Mesh::_meshList[myMeshId], l.cells, l.ncells, type));
|
||||||
SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(type, myInverseElements))));
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMDS_MeshNode::NbNodes() const
|
int SMDS_MeshNode::NbNodes() const
|
||||||
@ -186,26 +242,35 @@ int SMDS_MeshNode::NbNodes() const
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double* SMDS_MeshNode::getCoord() const
|
||||||
|
{
|
||||||
|
return SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetPoint(myID);
|
||||||
|
}
|
||||||
|
|
||||||
double SMDS_MeshNode::X() const
|
double SMDS_MeshNode::X() const
|
||||||
{
|
{
|
||||||
return myX;
|
double *coord = getCoord();
|
||||||
|
return coord[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
double SMDS_MeshNode::Y() const
|
double SMDS_MeshNode::Y() const
|
||||||
{
|
{
|
||||||
return myY;
|
double *coord = getCoord();
|
||||||
|
return coord[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
double SMDS_MeshNode::Z() const
|
double SMDS_MeshNode::Z() const
|
||||||
{
|
{
|
||||||
return myZ;
|
double *coord = getCoord();
|
||||||
|
return coord[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//* resize the vtkPoints structure every SMDS_Mesh::chunkSize points
|
||||||
void SMDS_MeshNode::setXYZ(double x, double y, double z)
|
void SMDS_MeshNode::setXYZ(double x, double y, double z)
|
||||||
{
|
{
|
||||||
myX=x;
|
vtkPoints *points = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetPoints();
|
||||||
myY=y;
|
points->InsertPoint(myID, x, y, z);
|
||||||
myZ=z;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SMDSAbs_ElementType SMDS_MeshNode::GetType() const
|
SMDSAbs_ElementType SMDS_MeshNode::GetType() const
|
||||||
@ -219,13 +284,9 @@ SMDSAbs_ElementType SMDS_MeshNode::GetType() const
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
|
void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
|
||||||
{
|
{
|
||||||
NCollection_List<const SMDS_MeshElement*>::Iterator it(myInverseElements);
|
const SMDS_MeshCell *cell = dynamic_cast<const SMDS_MeshCell*>(ME);
|
||||||
for (; it.More(); it.Next()) {
|
assert(cell);
|
||||||
const SMDS_MeshElement* elem = it.Value();
|
SMDS_Mesh::_meshList[myMeshId]->getGrid()->AddReferenceToCell(myID, cell->getVtkId());
|
||||||
if (elem == ME)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
myInverseElements.Append(ME);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -234,12 +295,13 @@ void SMDS_MeshNode::AddInverseElement(const SMDS_MeshElement* ME)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMDS_MeshNode::ClearInverseElements()
|
void SMDS_MeshNode::ClearInverseElements()
|
||||||
{
|
{
|
||||||
myInverseElements.Clear();
|
SMDS_Mesh::_meshList[myMeshId]->getGrid()->ResizeCellList(myID, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SMDS_MeshNode::emptyInverseElements()
|
bool SMDS_MeshNode::emptyInverseElements()
|
||||||
{
|
{
|
||||||
return myInverseElements.IsEmpty() != Standard_False;
|
vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myID);
|
||||||
|
return (l.ncells == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
@ -250,13 +312,19 @@ bool SMDS_MeshNode::emptyInverseElements()
|
|||||||
|
|
||||||
int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
|
int SMDS_MeshNode::NbInverseElements(SMDSAbs_ElementType type) const
|
||||||
{
|
{
|
||||||
|
vtkCellLinks::Link l = SMDS_Mesh::_meshList[myMeshId]->getGrid()->GetCellLinks()->GetLink(myID);
|
||||||
|
|
||||||
if ( type == SMDSAbs_All )
|
if ( type == SMDSAbs_All )
|
||||||
return myInverseElements.Extent();
|
return l.ncells;
|
||||||
|
|
||||||
int nb = 0;
|
int nb = 0;
|
||||||
NCollection_List<const SMDS_MeshElement*>::Iterator it( myInverseElements );
|
SMDS_Mesh *mesh = SMDS_Mesh::_meshList[myMeshId];
|
||||||
for ( ; it.More(); it.Next() )
|
for (int i=0; i<l.ncells; i++)
|
||||||
if ( it.Value()->GetType() == type )
|
{
|
||||||
nb++;
|
const SMDS_MeshElement* elem = mesh->FindNode(l.cells[i]);
|
||||||
|
if (elem->GetType() == type)
|
||||||
|
nb++;
|
||||||
|
}
|
||||||
return nb;
|
return nb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,10 @@ class SMDS_EXPORT SMDS_MeshNode:public SMDS_MeshElement
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMDS_MeshNode(double x, double y, double z);
|
SMDS_MeshNode(int id, int meshId, int shapeId = -1, double x=0, double y=0, double z=0);
|
||||||
|
|
||||||
|
double* getCoord() const;
|
||||||
|
|
||||||
void Print(std::ostream & OS) const;
|
void Print(std::ostream & OS) const;
|
||||||
double X() const;
|
double X() const;
|
||||||
double Y() const;
|
double Y() const;
|
||||||
@ -67,9 +70,7 @@ protected:
|
|||||||
elementsIterator(SMDSAbs_ElementType type) const;
|
elementsIterator(SMDSAbs_ElementType type) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double myX, myY, myZ;
|
|
||||||
SMDS_PositionPtr myPosition;
|
SMDS_PositionPtr myPosition;
|
||||||
NCollection_List<const SMDS_MeshElement*> myInverseElements;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "SMDS_MeshElement.hxx"
|
#include "SMDS_MeshElement.hxx"
|
||||||
|
|
||||||
class SMDS_EXPORT SMDS_MeshVolume:public SMDS_MeshElement
|
class SMDS_EXPORT SMDS_MeshVolume:public SMDS_MeshCell
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -85,6 +85,7 @@ libSMESHimpl_la_CPPFLAGS = \
|
|||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(MED_CXXFLAGS) \
|
$(MED_CXXFLAGS) \
|
||||||
$(GEOM_CXX_FLAGS) \
|
$(GEOM_CXX_FLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
@HDF5_INCLUDES@ \
|
@HDF5_INCLUDES@ \
|
||||||
-I$(srcdir)/../Controls \
|
-I$(srcdir)/../Controls \
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "SMESHDS_Document.hxx"
|
#include "SMESHDS_Document.hxx"
|
||||||
#include "SMDS_MeshElement.hxx"
|
#include "SMDS_MeshElement.hxx"
|
||||||
#include "SMDS_MeshNode.hxx"
|
#include "SMDS_MeshNode.hxx"
|
||||||
|
#include "SMDS_Mesh.hxx"
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
#include "OpUtil.hxx"
|
#include "OpUtil.hxx"
|
||||||
@ -40,6 +41,8 @@
|
|||||||
#include <TopTools_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||||
|
|
||||||
|
#include "memoire.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -54,6 +57,8 @@ SMESH_Gen::SMESH_Gen()
|
|||||||
_localId = 0;
|
_localId = 0;
|
||||||
_hypId = 0;
|
_hypId = 0;
|
||||||
_segmentation = 10;
|
_segmentation = 10;
|
||||||
|
SMDS_Mesh::_meshList.clear();
|
||||||
|
MESSAGE(SMDS_Mesh::_meshList.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
@ -135,6 +140,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
TSetOfInt* aShapesId)
|
TSetOfInt* aShapesId)
|
||||||
{
|
{
|
||||||
MESSAGE("SMESH_Gen::Compute");
|
MESSAGE("SMESH_Gen::Compute");
|
||||||
|
MEMOSTAT;
|
||||||
|
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
|
|
||||||
@ -284,6 +290,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh,
|
|||||||
}
|
}
|
||||||
|
|
||||||
MESSAGE( "VSR - SMESH_Gen::Compute() finished, OK = " << ret);
|
MESSAGE( "VSR - SMESH_Gen::Compute() finished, OK = " << ret);
|
||||||
|
MEMOSTAT;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ libSMESHClient_la_CPPFLAGS = \
|
|||||||
$(MED_CXXFLAGS) \
|
$(MED_CXXFLAGS) \
|
||||||
$(GEOM_CXXFLAGS) \
|
$(GEOM_CXXFLAGS) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(CORBA_CXXFLAGS) \
|
$(CORBA_CXXFLAGS) \
|
||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
|
@ -60,6 +60,7 @@ dist_libSMESHDS_la_SOURCES = \
|
|||||||
libSMESHDS_la_CPPFLAGS = \
|
libSMESHDS_la_CPPFLAGS = \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
-I$(srcdir)/../SMDS
|
-I$(srcdir)/../SMDS
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ libSMESHEngine_la_CPPFLAGS = \
|
|||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
@HDF5_INCLUDES@ \
|
@HDF5_INCLUDES@ \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(GUI_CXXFLAGS) \
|
$(GUI_CXXFLAGS) \
|
||||||
|
@ -110,6 +110,7 @@
|
|||||||
|
|
||||||
#include "GEOM_Client.hxx"
|
#include "GEOM_Client.hxx"
|
||||||
#include "Utils_ExceptHandlers.hxx"
|
#include "Utils_ExceptHandlers.hxx"
|
||||||
|
#include "memoire.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
@ -1375,6 +1376,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
GEOM::GEOM_Object_ptr theShapeObject )
|
GEOM::GEOM_Object_ptr theShapeObject )
|
||||||
throw ( SALOME::SALOME_Exception )
|
throw ( SALOME::SALOME_Exception )
|
||||||
{
|
{
|
||||||
|
MEMOSTAT;
|
||||||
Unexpect aCatch(SALOME_SalomeException);
|
Unexpect aCatch(SALOME_SalomeException);
|
||||||
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Compute" );
|
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Compute" );
|
||||||
|
|
||||||
|
@ -965,7 +965,7 @@ throw (SALOME::SALOME_Exception)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NCollection_Map< int > anIds;
|
vector< int > anIds;
|
||||||
SMESH::ElementType aType = SMESH::ALL;
|
SMESH::ElementType aType = SMESH::ALL;
|
||||||
for ( int g = 0, n = theGroups.length(); g < n; g++ )
|
for ( int g = 0, n = theGroups.length(); g < n; g++ )
|
||||||
{
|
{
|
||||||
@ -988,7 +988,7 @@ throw (SALOME::SALOME_Exception)
|
|||||||
for ( int i = 0, n = aCurrIds->length(); i < n; i++ )
|
for ( int i = 0, n = aCurrIds->length(); i < n; i++ )
|
||||||
{
|
{
|
||||||
int aCurrId = aCurrIds[ i ];
|
int aCurrId = aCurrIds[ i ];
|
||||||
anIds.Add( aCurrId );
|
anIds.push_back( aCurrId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -999,12 +999,12 @@ throw (SALOME::SALOME_Exception)
|
|||||||
|
|
||||||
// Create array of identifiers
|
// Create array of identifiers
|
||||||
SMESH::long_array_var aResIds = new SMESH::long_array;
|
SMESH::long_array_var aResIds = new SMESH::long_array;
|
||||||
aResIds->length( anIds.Extent() );
|
aResIds->length( anIds.size() );
|
||||||
|
|
||||||
NCollection_Map< int >::Iterator anIter( anIds );
|
//NCollection_Map< int >::Iterator anIter( anIds );
|
||||||
for ( int i = 0; anIter.More(); anIter.Next(), i++ )
|
for ( int i = 0; i<anIds.size(); i++ )
|
||||||
{
|
{
|
||||||
aResIds[ i ] = anIter.Value();
|
aResIds[ i ] = anIds[i];
|
||||||
}
|
}
|
||||||
aResGrp->Add( aResIds );
|
aResGrp->Add( aResIds );
|
||||||
|
|
||||||
@ -1130,14 +1130,14 @@ throw (SALOME::SALOME_Exception)
|
|||||||
|
|
||||||
// create map of ids
|
// create map of ids
|
||||||
int nbGrp = theGroups.length();
|
int nbGrp = theGroups.length();
|
||||||
NCollection_Map< int > anIds;
|
vector< int > anIds;
|
||||||
NCollection_DataMap< int, int >::Iterator anIter( anIdToCount );
|
NCollection_DataMap< int, int >::Iterator anIter( anIdToCount );
|
||||||
for ( ; anIter.More(); anIter.Next() )
|
for ( ; anIter.More(); anIter.Next() )
|
||||||
{
|
{
|
||||||
int aCurrId = anIter.Key();
|
int aCurrId = anIter.Key();
|
||||||
int aCurrNb = anIter.Value();
|
int aCurrNb = anIter.Value();
|
||||||
if ( aCurrNb == nbGrp )
|
if ( aCurrNb == nbGrp )
|
||||||
anIds.Add( aCurrId );
|
anIds.push_back( aCurrId );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create group
|
// Create group
|
||||||
@ -1147,12 +1147,12 @@ throw (SALOME::SALOME_Exception)
|
|||||||
|
|
||||||
// Create array of identifiers
|
// Create array of identifiers
|
||||||
SMESH::long_array_var aResIds = new SMESH::long_array;
|
SMESH::long_array_var aResIds = new SMESH::long_array;
|
||||||
aResIds->length( anIds.Extent() );
|
aResIds->length( anIds.size() );
|
||||||
|
|
||||||
NCollection_Map< int >::Iterator aListIter( anIds );
|
//NCollection_Map< int >::Iterator aListIter( anIds );
|
||||||
for ( int i = 0; aListIter.More(); aListIter.Next(), i++ )
|
for ( int i = 0; i<anIds.size(); i++ )
|
||||||
{
|
{
|
||||||
aResIds[ i ] = aListIter.Value();
|
aResIds[ i ] = anIds[i];
|
||||||
}
|
}
|
||||||
aResGrp->Add( aResIds );
|
aResGrp->Add( aResIds );
|
||||||
|
|
||||||
@ -1249,7 +1249,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutListOfGroups(
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
NCollection_Map< int > aToolIds;
|
set< int > aToolIds;
|
||||||
SMESH::ElementType aType = SMESH::ALL;
|
SMESH::ElementType aType = SMESH::ALL;
|
||||||
int g, n;
|
int g, n;
|
||||||
// iterate through tool groups
|
// iterate through tool groups
|
||||||
@ -1274,11 +1274,11 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutListOfGroups(
|
|||||||
for ( int i = 0, n = aCurrIds->length(); i < n; i++ )
|
for ( int i = 0, n = aCurrIds->length(); i < n; i++ )
|
||||||
{
|
{
|
||||||
int aCurrId = aCurrIds[ i ];
|
int aCurrId = aCurrIds[ i ];
|
||||||
aToolIds.Add( aCurrId );
|
aToolIds.insert( aCurrId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NCollection_Map< int > anIds; // result
|
vector< int > anIds; // result
|
||||||
|
|
||||||
// Iterate through main group
|
// Iterate through main group
|
||||||
for ( g = 0, n = theMainGroups.length(); g < n; g++ )
|
for ( g = 0, n = theMainGroups.length(); g < n; g++ )
|
||||||
@ -1302,8 +1302,8 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutListOfGroups(
|
|||||||
for ( int i = 0, n = aCurrIds->length(); i < n; i++ )
|
for ( int i = 0, n = aCurrIds->length(); i < n; i++ )
|
||||||
{
|
{
|
||||||
int aCurrId = aCurrIds[ i ];
|
int aCurrId = aCurrIds[ i ];
|
||||||
if ( !aToolIds.Contains( aCurrId ) )
|
if ( !aToolIds.count( aCurrId ) )
|
||||||
anIds.Add( aCurrId );
|
anIds.push_back( aCurrId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1314,12 +1314,11 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CutListOfGroups(
|
|||||||
|
|
||||||
// Create array of identifiers
|
// Create array of identifiers
|
||||||
SMESH::long_array_var aResIds = new SMESH::long_array;
|
SMESH::long_array_var aResIds = new SMESH::long_array;
|
||||||
aResIds->length( anIds.Extent() );
|
aResIds->length( anIds.size() );
|
||||||
|
|
||||||
NCollection_Map< int >::Iterator anIter( anIds );
|
for (int i=0; i<anIds.size(); i++ )
|
||||||
for ( int i = 0; anIter.More(); anIter.Next(), i++ )
|
|
||||||
{
|
{
|
||||||
aResIds[ i ] = anIter.Value();
|
aResIds[ i ] = anIds[i];
|
||||||
}
|
}
|
||||||
aResGrp->Add( aResIds );
|
aResGrp->Add( aResIds );
|
||||||
|
|
||||||
@ -1371,7 +1370,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup(
|
|||||||
{
|
{
|
||||||
// Create map of nodes from all groups
|
// Create map of nodes from all groups
|
||||||
|
|
||||||
NCollection_Map< int > aNodeMap;
|
set< int > aNodeMap;
|
||||||
|
|
||||||
for ( int g = 0, n = theGroups.length(); g < n; g++ )
|
for ( int g = 0, n = theGroups.length(); g < n; g++ )
|
||||||
{
|
{
|
||||||
@ -1390,7 +1389,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup(
|
|||||||
int aCurrId = aCurrIds[ i ];
|
int aCurrId = aCurrIds[ i ];
|
||||||
const SMDS_MeshNode* aNode = aMeshDS->FindNode( aCurrId );
|
const SMDS_MeshNode* aNode = aMeshDS->FindNode( aCurrId );
|
||||||
if ( aNode )
|
if ( aNode )
|
||||||
aNodeMap.Add( aNode->GetID() );
|
aNodeMap.insert( aNode->GetID() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1408,7 +1407,7 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup(
|
|||||||
const SMDS_MeshNode* aNode =
|
const SMDS_MeshNode* aNode =
|
||||||
dynamic_cast<const SMDS_MeshNode*>( aNodeIter->next() );
|
dynamic_cast<const SMDS_MeshNode*>( aNodeIter->next() );
|
||||||
if ( aNode )
|
if ( aNode )
|
||||||
aNodeMap.Add( aNode->GetID() );
|
aNodeMap.insert( aNode->GetID() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1416,22 +1415,25 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup(
|
|||||||
|
|
||||||
// Get result identifiers
|
// Get result identifiers
|
||||||
|
|
||||||
NCollection_Map< int > aResultIds;
|
vector< int > aResultIds;
|
||||||
if ( theElemType == SMESH::NODE )
|
if ( theElemType == SMESH::NODE )
|
||||||
{
|
{
|
||||||
NCollection_Map< int >::Iterator aNodeIter( aNodeMap );
|
//NCollection_Map< int >::Iterator aNodeIter( aNodeMap );
|
||||||
for ( ; aNodeIter.More(); aNodeIter.Next() )
|
set<int>::iterator iter = aNodeMap.begin();
|
||||||
aResultIds.Add( aNodeIter.Value() );
|
for ( ; iter != aNodeMap.end(); iter++ )
|
||||||
|
aResultIds.push_back( *iter);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Create list of elements of given dimension constructed on the nodes
|
// Create list of elements of given dimension constructed on the nodes
|
||||||
NCollection_Map< int > anElemList;
|
vector< int > anElemList;
|
||||||
NCollection_Map< int >::Iterator aNodeIter( aNodeMap );
|
//NCollection_Map< int >::Iterator aNodeIter( aNodeMap );
|
||||||
for ( ; aNodeIter.More(); aNodeIter.Next() )
|
//for ( ; aNodeIter.More(); aNodeIter.Next() )
|
||||||
|
set<int>::iterator iter = aNodeMap.begin();
|
||||||
|
for ( ; iter != aNodeMap.end(); iter++ )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* aNode =
|
const SMDS_MeshElement* aNode =
|
||||||
dynamic_cast<const SMDS_MeshElement*>( aMeshDS->FindNode( aNodeIter.Value() ) );
|
dynamic_cast<const SMDS_MeshElement*>( aMeshDS->FindNode( *iter ) );
|
||||||
if ( !aNode )
|
if ( !aNode )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1441,15 +1443,16 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup(
|
|||||||
const SMDS_MeshElement* anElem =
|
const SMDS_MeshElement* anElem =
|
||||||
dynamic_cast<const SMDS_MeshElement*>( anElemIter->next() );
|
dynamic_cast<const SMDS_MeshElement*>( anElemIter->next() );
|
||||||
if ( anElem && anElem->GetType() == anElemType )
|
if ( anElem && anElem->GetType() == anElemType )
|
||||||
anElemList.Add( anElem->GetID() );
|
anElemList.push_back( anElem->GetID() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check whether all nodes of elements are present in nodes map
|
// check whether all nodes of elements are present in nodes map
|
||||||
NCollection_Map< int >::Iterator anIter( anElemList );
|
//NCollection_Map< int >::Iterator anIter( anElemList );
|
||||||
for ( ; anIter.More(); anIter.Next() )
|
//for ( ; anIter.More(); anIter.Next() )
|
||||||
|
for (int i=0; i< anElemList.size(); i++)
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* anElem = aMeshDS->FindElement( anIter.Value() );
|
const SMDS_MeshElement* anElem = aMeshDS->FindElement( anElemList[i] );
|
||||||
if ( !anElem )
|
if ( !anElem )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1459,14 +1462,14 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup(
|
|||||||
{
|
{
|
||||||
const SMDS_MeshNode* aNode =
|
const SMDS_MeshNode* aNode =
|
||||||
dynamic_cast<const SMDS_MeshNode*>( aNodeIter->next() );
|
dynamic_cast<const SMDS_MeshNode*>( aNodeIter->next() );
|
||||||
if ( !aNode || !aNodeMap.Contains( aNode->GetID() ) )
|
if ( !aNode || !aNodeMap.count( aNode->GetID() ) )
|
||||||
{
|
{
|
||||||
isOk = false;
|
isOk = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( isOk )
|
if ( isOk )
|
||||||
aResultIds.Add( anElem->GetID() );
|
aResultIds.push_back( anElem->GetID() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1478,11 +1481,12 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateDimGroup(
|
|||||||
|
|
||||||
// Create array of identifiers
|
// Create array of identifiers
|
||||||
SMESH::long_array_var aResIds = new SMESH::long_array;
|
SMESH::long_array_var aResIds = new SMESH::long_array;
|
||||||
aResIds->length( aResultIds.Extent() );
|
aResIds->length( aResultIds.size() );
|
||||||
|
|
||||||
NCollection_Map< int >::Iterator aResIter( aResultIds );
|
//NCollection_Map< int >::Iterator aResIter( aResultIds );
|
||||||
for ( int i = 0; aResIter.More(); aResIter.Next(), i++ )
|
//for ( int i = 0; aResIter.More(); aResIter.Next(), i++ )
|
||||||
aResIds[ i ] = aResIter.Value();
|
for (int i=0; i< aResultIds.size(); i++)
|
||||||
|
aResIds[ i ] = aResultIds[i];
|
||||||
aResGrp->Add( aResIds );
|
aResGrp->Add( aResIds );
|
||||||
|
|
||||||
// Remove strings corresponding to group creation
|
// Remove strings corresponding to group creation
|
||||||
|
@ -130,6 +130,7 @@ dist_libStdMeshers_la_SOURCES = \
|
|||||||
libStdMeshers_la_CPPFLAGS = \
|
libStdMeshers_la_CPPFLAGS = \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(GUI_CXXFLAGS) \
|
$(GUI_CXXFLAGS) \
|
||||||
-I$(srcdir)/../SMESHImpl \
|
-I$(srcdir)/../SMESHImpl \
|
||||||
|
@ -117,6 +117,7 @@ libStdMeshersEngine_la_CPPFLAGS = \
|
|||||||
$(GEOM_CXXFLAGS) \
|
$(GEOM_CXXFLAGS) \
|
||||||
$(MED_CXXFLAGS) \
|
$(MED_CXXFLAGS) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
|
$(VTK_INCLUDES) \
|
||||||
$(CORBA_CXXFLAGS) \
|
$(CORBA_CXXFLAGS) \
|
||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
-I$(srcdir)/../SMESHImpl \
|
-I$(srcdir)/../SMESHImpl \
|
||||||
|
Loading…
Reference in New Issue
Block a user