diff --git a/Makefile.in b/Makefile.in
index f3a90dfb5..ded60d8ed 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -14,7 +14,7 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl
@COMMENCE@
-SUBDIRS = idl src doc
+SUBDIRS = idl src doc adm_local
RESOURCES_FILES = \
delete.png \
@@ -131,7 +131,14 @@ mesh_pattern.png \
pattern_sample_2d.png \
pattern_sample_3D.png \
mesh_add.png \
-mesh_remove.png
+mesh_remove.png \
+mesh_quad_edge.png \
+mesh_quad_triangle.png \
+mesh_quad_quadrangle.png \
+mesh_quad_tetrahedron.png \
+mesh_quad_pyramid.png \
+mesh_quad_pentahedron.png \
+mesh_quad_hexahedron.png
BIN_SCRIPT= \
VERSION
diff --git a/adm_local/Makefile.in b/adm_local/Makefile.in
new file mode 100644
index 000000000..9b5e810db
--- /dev/null
+++ b/adm_local/Makefile.in
@@ -0,0 +1,41 @@
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=..
+srcdir=@srcdir@
+VPATH=.:$(srcdir)/adm_local
+
+
+all: resources
+
+install:
+ cp -rf @top_srcdir@/adm_local @prefix@
+
+bin:
+
+resources :
+ cp -rf @top_srcdir@/adm_local $(top_builddir)
+
+inc:
+
+lib:
+
+depend:
+
+depend_idl:
+
+install-end:
+
+install-include:
+
+install-bin:
+
+uninstall:
+
+uninstall-idl:
+
+distclean:
+
+clean:
+
+distclean-other:
+
diff --git a/adm_local/unix/config_files/check_Geom.m4 b/adm_local/unix/config_files/check_Geom.m4
deleted file mode 100644
index 13f3be40c..000000000
--- a/adm_local/unix/config_files/check_Geom.m4
+++ /dev/null
@@ -1,45 +0,0 @@
-# Check availability of Geom binary distribution
-#
-# Author : Nicolas REJNERI (OPEN CASCADE, 2003)
-#
-
-AC_DEFUN([CHECK_GEOM],[
-
-AC_CHECKING(for Geom)
-
-Geom_ok=no
-
-AC_ARG_WITH(geom,
- [ --with-geom=DIR root directory path of GEOM installation ],
- GEOM_DIR="$withval",GEOM_DIR="")
-
-if test "x$GEOM_DIR" == "x" ; then
-
-# no --with-geom-dir option used
-
- if test "x$GEOM_ROOT_DIR" != "x" ; then
-
- # GEOM_ROOT_DIR environment variable defined
- GEOM_DIR=$GEOM_ROOT_DIR
-
- fi
-#
-fi
-
-if test -f ${GEOM_DIR}/lib/salome/libGEOMClient.so ; then
- Geom_ok=yes
- AC_MSG_RESULT(Using Geom module distribution in ${GEOM_DIR})
-
- if test "x$GEOM_ROOT_DIR" == "x" ; then
- GEOM_ROOT_DIR=${GEOM_DIR}
- fi
- AC_SUBST(GEOM_ROOT_DIR)
-
-else
- AC_MSG_WARN("Cannot find compiled Geom module distribution")
-fi
-
-AC_MSG_RESULT(for Geom: $Geom_ok)
-
-])dnl
-
diff --git a/adm_local/unix/config_files/check_Med.m4 b/adm_local/unix/config_files/check_Med.m4
deleted file mode 100644
index 727bf4381..000000000
--- a/adm_local/unix/config_files/check_Med.m4
+++ /dev/null
@@ -1,45 +0,0 @@
-# Check availability of Med binary distribution
-#
-# Author : Nicolas REJNERI (OPEN CASCADE, 2003)
-#
-
-AC_DEFUN([CHECK_MED],[
-
-AC_CHECKING(for Med)
-
-Med_ok=no
-
-AC_ARG_WITH(med,
- [ --with-med=DIR root directory path of MED installation ],
- MED_DIR="$withval",MED_DIR="")
-
-if test "x$MED_DIR" == "x" ; then
-
-# no --with-med-dir option used
-
- if test "x$MED_ROOT_DIR" != "x" ; then
-
- # MED_ROOT_DIR environment variable defined
- MED_DIR=$MED_ROOT_DIR
-
- fi
-#
-fi
-
-if test -f ${MED_DIR}/idl/salome/MED.idl ; then
- Med_ok=yes
- AC_MSG_RESULT(Using Med module distribution in ${MED_DIR})
-
- if test "x$MED_ROOT_DIR" == "x" ; then
- MED_ROOT_DIR=${MED_DIR}
- fi
- AC_SUBST(MED_ROOT_DIR)
-
-else
- AC_MSG_WARN("Cannot find Med module sources")
-fi
-
-AC_MSG_RESULT(for Med: $Med_ok)
-
-])dnl
-
diff --git a/adm_local/unix/config_files/check_SMESH.m4 b/adm_local/unix/config_files/check_SMESH.m4
new file mode 100644
index 000000000..86a8264b2
--- /dev/null
+++ b/adm_local/unix/config_files/check_SMESH.m4
@@ -0,0 +1,54 @@
+# Check availability of SMesh binary distribution
+#
+# Author : Nicolas REJNERI (OPEN CASCADE, 2003)
+#
+
+AC_DEFUN([CHECK_SMESH],[
+
+AC_CHECKING(for SMesh)
+
+SMesh_ok=no
+
+AC_ARG_WITH(smesh,
+ [ --with-smesh=DIR root directory path of SMESH installation ],
+ SMESH_DIR="$withval",SMESH_DIR="")
+
+if test "x$SMESH_DIR" == "x" ; then
+
+# no --with-smesh option used
+
+ if test "x$SMESH_ROOT_DIR" != "x" ; then
+
+ # SMESH_ROOT_DIR environment variable defined
+ SMESH_DIR=$SMESH_ROOT_DIR
+
+ else
+
+ # search SMESH binaries in PATH variable
+ AC_PATH_PROG(TEMP, libSMESH_Swig.py)
+ if test "x$TEMP" != "x" ; then
+ SMESH_BIN_DIR=`dirname $TEMP`
+ SMESH_DIR=`dirname $SMESH_BIN_DIR`
+ fi
+
+ fi
+#
+fi
+
+if test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then
+ SMesh_ok=yes
+ AC_MSG_RESULT(Using SMesh module distribution in ${SMESH_DIR})
+
+ if test "x$SMESH_ROOT_DIR" == "x" ; then
+ SMESH_ROOT_DIR=${SMESH_DIR}
+ fi
+ AC_SUBST(SMESH_ROOT_DIR)
+
+else
+ AC_MSG_WARN("Cannot find compiled SMesh module distribution")
+fi
+
+AC_MSG_RESULT(for SMesh: $SMesh_ok)
+
+])dnl
+
diff --git a/adm_local/unix/config_files/check_f77.m4 b/adm_local/unix/config_files/check_f77.m4
new file mode 100644
index 000000000..1b74a8532
--- /dev/null
+++ b/adm_local/unix/config_files/check_f77.m4
@@ -0,0 +1,29 @@
+dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+dnl
+dnl
+dnl
+AC_DEFUN([CHECK_F77],[
+
+AC_PROG_F77
+
+AC_F77_LIBRARY_LDFLAGS
+AC_F77_WRAPPERS
+
+])dnl
diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in
index 5e556548e..7f57ab3d8 100644
--- a/adm_local/unix/make_commence.in
+++ b/adm_local/unix/make_commence.in
@@ -240,14 +240,27 @@ $(top_srcdir)/configure.in: $(top_srcdir)/configure.in.base
ACLOCAL_SRC = \
-ac_cxx_bool.m4 check_corba.m4 check_vtk.m4 \
+ac_cxx_bool.m4 check_corba.m4 \
ac_cxx_depend_flag.m4 check_hdf5.m4 enable_pthreads.m4 \
ac_cxx_mutable.m4 check_mico.m4 libtool.m4 \
ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \
-ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \
+ac_cxx_partial_specialization.m4 python.m4 \
ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
-ac_cc_warnings.m4 check_qt.m4 check_boost.m4 \
-check_swig.m4
+ac_cc_warnings.m4 check_boost.m4 check_swig.m4
-$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%)
- cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files
+ACLOCAL_GUI = \
+check_vtk.m4 check_opengl.m4 check_qt.m4 \
+check_GUI.m4 check_corba_in_GUI.m4
+
+ACLOCAL_MED = check_Med.m4
+ACLOCAL_GEOM = check_GEOM.m4
+
+$(top_srcdir)/aclocal.m4: $(ACLOCAL_SRC:%=@KERNEL_ROOT_DIR@/salome_adm/unix/config_files/%) \
+ $(ACLOCAL_GUI:%=@GUI_ROOT_DIR@/adm_local/unix/config_files/%) \
+ $(ACLOCAL_MED:%=@MED_ROOT_DIR@/adm_local/unix/config_files/%) \
+ $(ACLOCAL_GEOM:%=@GEOM_ROOT_DIR@/adm_local/unix/config_files/%)
+ cd $(top_srcdir) ; aclocal --acdir=adm_local/unix/config_files -I @KERNEL_ROOT_DIR@/salome_adm/unix/config_files \
+ -I @GUI_ROOT_DIR@/adm_local/unix/config_files \
+ -I @MED_ROOT_DIR@/adm_local/unix/config_files \
+ -I @GEOM_ROOT_DIR@/adm_local/unix/config_files
+
\ No newline at end of file
diff --git a/build_configure b/build_configure
index b884b1757..2d81c7eae 100755
--- a/build_configure
+++ b/build_configure
@@ -26,6 +26,31 @@ fi
# echo "failed : KERNEL_SRC variable is not correct !"
# exit
#fi
+
+########################################################################
+# Test if the GUI_ROOT_DIR is set correctly
+
+if test ! -d "${GUI_ROOT_DIR}"; then
+ echo "failed : GUI_ROOT_DIR variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the MED_ROOT_DIR is set correctly
+
+if test ! -d "${MED_ROOT_DIR}"; then
+ echo "failed : MED_ROOT_DIR variable is not correct !"
+ exit
+fi
+
+########################################################################
+# Test if the GEOM_ROOT_DIR is set correctly
+
+if test ! -d "${GEOM_ROOT_DIR}"; then
+ echo "failed : GEOM_ROOT_DIR variable is not correct !"
+ exit
+fi
+
########################################################################
# find_in - utility function
#
@@ -203,7 +228,10 @@ else
echo -n "Creating 'configure' script ... "
fi
-aclocal --acdir=adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files
+aclocal -I adm_local/unix/config_files -I ${KERNEL_ROOT_DIR}/salome_adm/unix/config_files \
+ -I ${GUI_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${MED_ROOT_DIR}/adm_local/unix/config_files \
+ -I ${GEOM_ROOT_DIR}/adm_local/unix/config_files
if autoconf
then
echo "done"
diff --git a/configure.in.base b/configure.in.base
index d81e49771..d0105c7b0 100644
--- a/configure.in.base
+++ b/configure.in.base
@@ -265,6 +265,26 @@ echo
CHECK_HTML_GENERATORS
+echo
+echo ---------------------------------------------
+echo Testing GUI
+echo ---------------------------------------------
+echo
+
+CHECK_SALOME_GUI
+
+echo
+echo ---------------------------------------------
+echo Testing full GUI
+echo ---------------------------------------------
+echo
+
+CHECK_CORBA_IN_GUI
+if test "x${CORBA_IN_GUI}" != "xyes"; then
+ echo "failed : For configure SMESH module necessary full GUI !"
+ exit
+fi
+
echo
echo ---------------------------------------------
echo Testing Kernel
diff --git a/doc/salome/gui/SMESH/defining_hypotheses_tui.htm b/doc/salome/gui/SMESH/defining_hypotheses_tui.htm
index 581805053..0874e4507 100755
--- a/doc/salome/gui/SMESH/defining_hypotheses_tui.htm
+++ b/doc/salome/gui/SMESH/defining_hypotheses_tui.htm
@@ -284,58 +284,54 @@ else
# create vertices
-px =
- geompy.MakeVertex(100., 0. ,
- 0. )
+px =geompy.MakeVertex(100., 0. ,0. )
-py =
- geompy.MakeVertex(0. ,
- 100., 0. )
+py =geompy.MakeVertex(0. ,100., 0. )
-pz =
- geompy.MakeVertex(0. ,
- 0. , 100.)
+pz =geompy.MakeVertex(0. ,0. , 100.)
# create a vector from
two points
-vxy = geompy.MakeVector(px,
- py)
+vxy = geompy.MakeVector(px,py)
# create an arc from
three points
-arc = geompy.MakeArc(py,
- pz, px)
+arc = geompy.MakeArc(py, pz, px)
# create a wire
-wire = geompy.MakeWire([vxy,
- arc])
+wire = geompy.MakeWire([vxy,arc])
isPlanarFace = 1
-# create a face from
- the wire
+# create a face from the wire
-face1 = geompy.MakeFace(wire,
- isPlanarFace)
+face1 = geompy.MakeFace(wire,isPlanarFace)
-# add objects in the
- study
+# get edges from the face
+
+vxy, arc = geompy.SubShapeAll(face1, geompy.ShapeType["EDGE"])
+
+
+
+# add objects in the study
id_face1 = geompy.addToStudy(face1,"Face1")
+id_arc = geompy.addToStudyInFather(face1,arc,"Arc Edge")
+
# display faces
@@ -350,44 +346,34 @@ else
# create hexahedral mesh
-hexa = smesh.Mesh(face1,
- "Face compound : hexahedrical mesh")
+hexa = smesh.Mesh(face1,"Face compound : hexahedrical mesh")
algo = hexa.Triangle()
-# define "MaxElementArea"
- hypothesis to be applied to
- each triangle
+# define "MaxElementArea"hypothesis
algo.MaxElementArea(30)
-# create a quadrangle
- 2D algorithm for faces
-
-hexa.Quadrangle()
-
-
-
-# create a local hypothesis
+# create a local hypothesis on the wire
algo = hexa.Segment(wire)
-# define "NumberOfSegments"
- hypothesis to cut an edge in a fixed number of segments
+# define "NumberOfSegments"hypothesis to cut
+a straight edge in a fixed number of segments
algo.NumberOfSegments(6)
-# define "Deflection1D"
- hypothesis
+# define a local "Deflection1D"hypothesis on the arc
+algo = hexa.Segment(arc)
algo.Deflection1D(1)
diff --git a/idl/SMESH_BasicHypothesis.idl b/idl/SMESH_BasicHypothesis.idl
index b6367b75d..7880020e7 100644
--- a/idl/SMESH_BasicHypothesis.idl
+++ b/idl/SMESH_BasicHypothesis.idl
@@ -286,6 +286,20 @@ module StdMeshers
{
};
+ /*!
+ * StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
+ * This is an auxiliary 1D hypothesis whose presence forces construction
+ * of quadratic edges.
+ * If the 2D mesher sees that all boundary edges are quadratic ones,
+ * it generates quadratic faces, else it generates linear faces using
+ * medium nodes as if they were vertex ones.
+ * The 3D mesher generates quadratic volumes only if all boundary faces
+ * are quadratic ones, else it fails.
+ */
+ interface StdMeshers_QuadraticMesh : SMESH::SMESH_Hypothesis
+ {
+ };
+
/*!
* StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl
index bc6edfb72..ee234b95e 100644
--- a/idl/SMESH_Gen.idl
+++ b/idl/SMESH_Gen.idl
@@ -59,6 +59,16 @@ module SMESH
SMESH_Pattern GetPattern();
+ /*!
+ Set the current mode
+ */
+ void SetEmbeddedMode( in boolean theMode );
+
+ /*!
+ Get the current mode
+ */
+ boolean IsEmbeddedMode();
+
/*!
Set the current study
*/
diff --git a/idl/SMESH_Group.idl b/idl/SMESH_Group.idl
index 37657674b..3cbb606da 100644
--- a/idl/SMESH_Group.idl
+++ b/idl/SMESH_Group.idl
@@ -84,6 +84,16 @@ module SMESH
* Returns the mesh object this group belongs to
*/
SMESH_Mesh GetMesh();
+
+ /*!
+ * Sets group color number
+ */
+ void SetColorNumber( in long color );
+
+ /*!
+ * Returns group color number
+ */
+ long GetColorNumber();
};
/*!
diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl
index 1fe2f2dd8..4b7b54707 100644
--- a/idl/SMESH_Mesh.idl
+++ b/idl/SMESH_Mesh.idl
@@ -69,7 +69,14 @@ module SMESH
MOVE_NODE,
CHANGE_ELEMENT_NODES,
CHANGE_POLYHEDRON_NODES,
- RENUMBER
+ RENUMBER,
+ ADD_QUADEDGE,
+ ADD_QUADTRIANGLE,
+ ADD_QUADQUADRANGLE,
+ ADD_QUADTETRAHEDRON,
+ ADD_QUADPYRAMID,
+ ADD_QUADPENTAHEDRON,
+ ADD_QUADHEXAHEDRON
};
struct log_block
@@ -119,7 +126,8 @@ module SMESH
HYP_INCOMPATIBLE, // hypothesis does not fit algo
HYP_NOTCONFORM, // not conform mesh is produced appling a hypothesis
HYP_ALREADY_EXIST,// such hypothesis already exist
- HYP_BAD_DIM // bad dimension
+ HYP_BAD_DIM, // bad dimension
+ HYP_BAD_SUBSHAPE // shape is neither the main one, nor its subshape, nor a group
};
/*!
@@ -335,6 +343,11 @@ module SMESH
SMESH_MeshEditor GetMeshEditor()
raises (SALOME::SALOME_Exception);
+ /*! Check group names for duplications.
+ * Consider maximum group name length stored in MED file.
+ */
+ boolean HasDuplicatedGroupNamesMED();
+
/*!
* Export Mesh to different MED Formats
* @params
@@ -434,6 +447,12 @@ module SMESH
* Get mesh description
*/
string Dump();
+
+ /*!
+ * Get mesh pointer
+ */
+ long GetMeshPtr();
+
};
interface SMESH_subMesh : SALOME::GenericObj, SMESH_IDSource
@@ -514,6 +533,8 @@ module SMESH
boolean AddFace(in long_array IDsOfNodes);
+ boolean AddPolygonalFace(in long_array IdsOfNodes);
+
boolean AddVolume(in long_array IDsOfNodes);
/*!
diff --git a/resources/StdMeshers.xml b/resources/StdMeshers.xml
index 2c1cd12cc..6daf06253 100644
--- a/resources/StdMeshers.xml
+++ b/resources/StdMeshers.xml
@@ -57,6 +57,12 @@
icon-id="mesh_algo_quad.png"
dim="2"/>
+
+
FindElement( theId );
- if ( anEdge == 0 || anEdge->GetType() != SMDSAbs_Edge || anEdge->NbNodes() != 2 )
+ if ( anEdge == 0 || anEdge->GetType() != SMDSAbs_Edge/* || anEdge->NbNodes() != 2 */)
return 0;
- TColStd_MapOfInteger aMap;
+ // for each pair of nodes in anEdge (there are 2 pairs in a quadratic edge)
+ // count elements containing both nodes of the pair.
+ // Note that there may be such cases for a quadratic edge (a horizontal line):
+ //
+ // Case 1 Case 2
+ // | | | | |
+ // | | | | |
+ // +-----+------+ +-----+------+
+ // | | | |
+ // | | | |
+ // result sould be 2 in both cases
+ //
+ int aResult0 = 0, aResult1 = 0;
+ // last node, it is a medium one in a quadratic edge
+ const SMDS_MeshNode* aLastNode = anEdge->GetNode( anEdge->NbNodes() - 1 );
+ const SMDS_MeshNode* aNode0 = anEdge->GetNode( 0 );
+ const SMDS_MeshNode* aNode1 = anEdge->GetNode( 1 );
+ if ( aNode1 == aLastNode ) aNode1 = 0;
- int aResult = 0;
- SMDS_ElemIteratorPtr anIter = anEdge->nodesIterator();
- if ( anIter != 0 ) {
- while( anIter->more() ) {
- const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next();
- if ( aNode == 0 )
- return 0;
- SMDS_ElemIteratorPtr anElemIter = aNode->GetInverseElementIterator();
- while( anElemIter->more() ) {
- const SMDS_MeshElement* anElem = anElemIter->next();
- if ( anElem != 0 && anElem->GetType() != SMDSAbs_Edge ) {
- int anId = anElem->GetID();
-
- if ( anIter->more() ) // i.e. first node
- aMap.Add( anId );
- else if ( aMap.Contains( anId ) )
- aResult++;
- }
- }
+ SMDS_ElemIteratorPtr anElemIter = aLastNode->GetInverseElementIterator();
+ while( anElemIter->more() ) {
+ const SMDS_MeshElement* anElem = anElemIter->next();
+ if ( anElem != 0 && anElem->GetType() != SMDSAbs_Edge ) {
+ SMDS_ElemIteratorPtr anIter = anElem->nodesIterator();
+ while ( anIter->more() ) {
+ if ( const SMDS_MeshElement* anElemNode = anIter->next() ) {
+ if ( anElemNode == aNode0 ) {
+ aResult0++;
+ if ( !aNode1 ) break; // not a quadratic edge
+ }
+ else if ( anElemNode == aNode1 )
+ aResult1++;
+ }
+ }
}
}
+ int aResult = max ( aResult0, aResult1 );
+
+// TColStd_MapOfInteger aMap;
+
+// SMDS_ElemIteratorPtr anIter = anEdge->nodesIterator();
+// if ( anIter != 0 ) {
+// while( anIter->more() ) {
+// const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next();
+// if ( aNode == 0 )
+// return 0;
+// SMDS_ElemIteratorPtr anElemIter = aNode->GetInverseElementIterator();
+// while( anElemIter->more() ) {
+// const SMDS_MeshElement* anElem = anElemIter->next();
+// if ( anElem != 0 && anElem->GetType() != SMDSAbs_Edge ) {
+// int anId = anElem->GetID();
+
+// if ( anIter->more() ) // i.e. first node
+// aMap.Add( anId );
+// else if ( aMap.Contains( anId ) )
+// aResult++;
+// }
+// }
+// }
+// }
return aResult;
}
@@ -154,23 +193,41 @@ bool NumericalFunctor::GetPoints(const int theId,
}
bool NumericalFunctor::GetPoints(const SMDS_MeshElement* anElem,
- TSequenceOfXYZ& theRes )
+ TSequenceOfXYZ& theRes )
{
theRes.clear();
if ( anElem == 0)
return false;
+ theRes.reserve( anElem->NbNodes() );
+
// Get nodes of the element
- SMDS_ElemIteratorPtr anIter = anElem->nodesIterator();
- if ( anIter != 0 )
- {
- while( anIter->more() )
- {
- const SMDS_MeshNode* aNode = (SMDS_MeshNode*)anIter->next();
- if ( aNode != 0 ){
+ SMDS_ElemIteratorPtr anIter;
+
+ if ( anElem->IsQuadratic() ) {
+ switch ( anElem->GetType() ) {
+ case SMDSAbs_Edge:
+ anIter = static_cast
+ (anElem)->interlacedNodesElemIterator();
+ break;
+ case SMDSAbs_Face:
+ anIter = static_cast
+ (anElem)->interlacedNodesElemIterator();
+ break;
+ default:
+ anIter = anElem->nodesIterator();
+ //return false;
+ }
+ }
+ else {
+ anIter = anElem->nodesIterator();
+ }
+
+ if ( anIter ) {
+ while( anIter->more() ) {
+ if ( const SMDS_MeshNode* aNode = static_cast( anIter->next() ))
theRes.push_back( gp_XYZ( aNode->X(), aNode->Y(), aNode->Z() ) );
- }
}
}
@@ -285,6 +342,7 @@ double AspectRatio::GetValue( const TSequenceOfXYZ& P )
// According to "Mesh quality control" by Nadir Bouhamau referring to
// Pascal Jean Frey and Paul-Louis George. Maillages, applications aux elements finis.
// Hermes Science publications, Paris 1999 ISBN 2-7462-0024-4
+ // PAL10872
int nbNodes = P.size();
@@ -840,22 +898,21 @@ SMDSAbs_ElementType Skew::GetType() const
*/
double Area::GetValue( const TSequenceOfXYZ& P )
{
- double aArea = 0;
- if ( P.size() == 3 )
- return getArea( P( 1 ), P( 2 ), P( 3 ) );
- else if (P.size() > 3)
- aArea = getArea( P( 1 ), P( 2 ), P( 3 ) );
- else
- return 0;
-
- for (int i=4; i<=P.size(); i++)
- aArea += getArea(P(1),P(i-1),P(i));
- return aArea;
+ gp_Vec aVec1( P(2) - P(1) );
+ gp_Vec aVec2( P(3) - P(1) );
+ gp_Vec SumVec = aVec1 ^ aVec2;
+ for (int i=4; i<=P.size(); i++) {
+ gp_Vec aVec1( P(i-1) - P(1) );
+ gp_Vec aVec2( P(i) - P(1) );
+ gp_Vec tmp = aVec1 ^ aVec2;
+ SumVec.Add(tmp);
+ }
+ return SumVec.Magnitude() * 0.5;
}
double Area::GetBadRate( double Value, int /*nbNodes*/ ) const
{
- // meaningless as it is not quality control functor
+ // meaningless as it is not a quality control functor
return Value;
}
@@ -871,7 +928,11 @@ SMDSAbs_ElementType Area::GetType() const
*/
double Length::GetValue( const TSequenceOfXYZ& P )
{
- return ( P.size() == 2 ? getDistance( P( 1 ), P( 2 ) ) : 0 );
+ switch ( P.size() ) {
+ case 2: return getDistance( P( 1 ), P( 2 ) );
+ case 3: return getDistance( P( 1 ), P( 2 ) ) + getDistance( P( 2 ), P( 3 ) );
+ default: return 0.;
+ }
}
double Length::GetBadRate( double Value, int /*nbNodes*/ ) const
@@ -894,7 +955,10 @@ double Length2D::GetValue( long theElementId)
{
TSequenceOfXYZ P;
+ //cout<<"Length2D::GetValue"<FindElement( theElementId );
@@ -908,7 +972,11 @@ double Length2D::GetValue( long theElementId)
case SMDSAbs_Edge:
if (len == 2){
aVal = getDistance( P( 1 ), P( 2 ) );
- break;
+ break;
+ }
+ else if (len == 3){ // quadratic edge
+ aVal = getDistance(P( 1 ),P( 3 )) + getDistance(P( 3 ),P( 2 ));
+ break;
}
case SMDSAbs_Face:
if (len == 3){ // triangles
@@ -926,6 +994,22 @@ double Length2D::GetValue( long theElementId)
aVal = Max(Max(L1,L2),Max(L3,L4));
break;
}
+ if (len == 6){ // quadratic triangles
+ double L1 = getDistance(P( 1 ),P( 2 )) + getDistance(P( 2 ),P( 3 ));
+ double L2 = getDistance(P( 3 ),P( 4 )) + getDistance(P( 4 ),P( 5 ));
+ double L3 = getDistance(P( 5 ),P( 6 )) + getDistance(P( 6 ),P( 1 ));
+ aVal = Max(L1,Max(L2,L3));
+ //cout<<"L1="<NbNodes();
/* Combien de mailles, faces ou aretes ? */
- int nb_of_nodes, nb_of_edges, nb_of_faces, nb_of_volumes;
+ int /*nb_of_nodes,*/ nb_of_edges, nb_of_faces, nb_of_volumes;
nb_of_edges = myMesh->NbEdges();
nb_of_faces = myMesh->NbFaces();
nb_of_volumes = myMesh->NbVolumes();
diff --git a/src/DriverMED/DriverMED_Family.cxx b/src/DriverMED/DriverMED_Family.cxx
index 47a923dbd..0da2c4cff 100644
--- a/src/DriverMED/DriverMED_Family.cxx
+++ b/src/DriverMED/DriverMED_Family.cxx
@@ -32,6 +32,103 @@
using namespace std;
+//=============================================================================
+/*!
+ * Default constructor
+ */
+//=============================================================================
+DriverMED_Family
+::DriverMED_Family():
+ myGroupAttributVal(0)
+{}
+
+
+//=============================================================================
+const ElementsSet&
+DriverMED_Family
+::GetElements () const
+{
+ return myElements;
+}
+
+int
+DriverMED_Family
+::GetId () const
+{
+ return myId;
+}
+
+void
+DriverMED_Family
+::SetId (const int theId)
+{
+ myId = theId;
+}
+
+void
+DriverMED_Family
+::AddElement(const SMDS_MeshElement* theElement)
+{
+ myElements.insert(theElement);
+}
+
+void
+DriverMED_Family
+::AddGroupName(std::string theGroupName)
+{
+ myGroupNames.insert(theGroupName);
+}
+
+void
+DriverMED_Family
+::SetType(const SMDSAbs_ElementType theType)
+{
+ myType = theType;
+}
+
+SMDSAbs_ElementType
+DriverMED_Family
+::GetType()
+{
+ return myType;
+}
+
+bool
+DriverMED_Family
+::MemberOf(std::string theGroupName) const
+{
+ return myGroupNames.find(theGroupName) != myGroupNames.end();
+}
+
+const MED::TStringSet&
+DriverMED_Family
+::GetGroupNames () const
+{
+ return myGroupNames;
+}
+
+
+int
+DriverMED_Family
+::GetGroupAttributVal() const
+{
+ return myGroupAttributVal;
+}
+
+void
+DriverMED_Family
+::SetGroupAttributVal( int theValue)
+{
+ myGroupAttributVal = theValue;
+}
+
+bool
+DriverMED_Family
+::IsEmpty () const
+{
+ return myElements.empty();
+}
+
//=============================================================================
/*!
* Split each group from list on some parts (families)
@@ -39,15 +136,16 @@ using namespace std;
* Resulting families have no common elements.
*/
//=============================================================================
-list DriverMED_Family::MakeFamilies
- (const map & theSubMeshes,
- const list& theGroups,
- const bool doGroupOfNodes,
- const bool doGroupOfEdges,
- const bool doGroupOfFaces,
- const bool doGroupOfVolumes)
+DriverMED_FamilyPtrList
+DriverMED_Family
+::MakeFamilies(const SMESHDS_SubMeshPtrMap& theSubMeshes,
+ const SMESHDS_GroupBasePtrList& theGroups,
+ const bool doGroupOfNodes,
+ const bool doGroupOfEdges,
+ const bool doGroupOfFaces,
+ const bool doGroupOfVolumes)
{
- list aFamilies;
+ DriverMED_FamilyPtrList aFamilies;
string anAllNodesGroupName = "Group_Of_All_Nodes";
string anAllEdgesGroupName = "Group_Of_All_Edges";
@@ -61,22 +159,23 @@ list DriverMED_Family::MakeFamilies
int aElemFamId = FIRST_ELEM_FAMILY;
// Process sub-meshes
- map::const_iterator aSMIter = theSubMeshes.begin();
+ SMESHDS_SubMeshPtrMap::const_iterator aSMIter = theSubMeshes.begin();
for (; aSMIter != theSubMeshes.end(); aSMIter++)
{
- if ( aSMIter->second->IsComplexSubmesh() )
+ const int anId = aSMIter->first;
+ SMESHDS_SubMesh* aSubMesh = aSMIter->second;
+ if ( aSubMesh->IsComplexSubmesh() )
continue; // submesh containing other submeshs
- list aSMFams = SplitByType((*aSMIter).second, (*aSMIter).first);
- list::iterator aSMFamsIter = aSMFams.begin();
+ DriverMED_FamilyPtrList aSMFams = SplitByType(aSubMesh,anId);
+ DriverMED_FamilyPtrList::iterator aSMFamsIter = aSMFams.begin();
for (; aSMFamsIter != aSMFams.end(); aSMFamsIter++)
{
DriverMED_FamilyPtr aFam2 = (*aSMFamsIter);
-
- list::iterator aFamsIter = aFamilies.begin();
+ DriverMED_FamilyPtrList::iterator aFamsIter = aFamilies.begin();
while (aFamsIter != aFamilies.end())
{
DriverMED_FamilyPtr aFam1 = *aFamsIter;
- list::iterator aCurrIter = aFamsIter++;
+ DriverMED_FamilyPtrList::iterator aCurrIter = aFamsIter++;
if (aFam1->myType == aFam2->myType)
{
DriverMED_FamilyPtr aCommon (new DriverMED_Family);
@@ -89,7 +188,8 @@ list DriverMED_Family::MakeFamilies
{
aFamilies.erase(aCurrIter);
}
- if (aFam2->IsEmpty()) break;
+ if (aFam2->IsEmpty())
+ break;
}
}
// The rest elements of family
@@ -101,30 +201,32 @@ list DriverMED_Family::MakeFamilies
}
// Process groups
- list::const_iterator aGroupsIter = theGroups.begin();
+ SMESHDS_GroupBasePtrList::const_iterator aGroupsIter = theGroups.begin();
for (; aGroupsIter != theGroups.end(); aGroupsIter++)
{
DriverMED_FamilyPtr aFam2 (new DriverMED_Family);
aFam2->Init(*aGroupsIter);
- list::iterator aFamsIter = aFamilies.begin();
+ DriverMED_FamilyPtrList::iterator aFamsIter = aFamilies.begin();
while (aFamsIter != aFamilies.end())
{
DriverMED_FamilyPtr aFam1 = *aFamsIter;
- list::iterator aCurrIter = aFamsIter++;
+ DriverMED_FamilyPtrList::iterator aCurrIter = aFamsIter++;
if (aFam1->myType == aFam2->myType)
{
DriverMED_FamilyPtr aCommon (new DriverMED_Family);
aFam1->Split(aFam2, aCommon);
if (!aCommon->IsEmpty())
{
+ aCommon->SetGroupAttributVal(0);
aFamilies.push_back(aCommon);
}
if (aFam1->IsEmpty())
{
aFamilies.erase(aCurrIter);
}
- if (aFam2->IsEmpty()) break;
+ if (aFam2->IsEmpty())
+ break;
}
}
// The rest elements of group
@@ -134,7 +236,7 @@ list DriverMED_Family::MakeFamilies
}
}
- list::iterator aFamsIter = aFamilies.begin();
+ DriverMED_FamilyPtrList::iterator aFamsIter = aFamilies.begin();
for (; aFamsIter != aFamilies.end(); aFamsIter++)
{
DriverMED_FamilyPtr aFam = *aFamsIter;
@@ -210,33 +312,33 @@ MED::PFamilyInfo
DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper,
const MED::PMeshInfo& theMeshInfo) const
{
- string aValue;
-
ostringstream aStr;
-
aStr << "FAM_" << myId;
set::const_iterator aGrIter = myGroupNames.begin();
- for (; aGrIter != myGroupNames.end(); aGrIter++)
- {
+ for(; aGrIter != myGroupNames.end(); aGrIter++){
aStr << "_" << *aGrIter;
}
- aValue = aStr.str();
- /*
- MED::TStringVector anAttrDescs (1, ""); // 1 attribute with empty description,
- MED::TIntVector anAttrIds (1, myId); // Id=0,
- MED::TIntVector anAttrVals (1, myId); // Value=0
- */
-
- MED::PFamilyInfo anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
- aValue,
- myId,
- myGroupNames);
-/*
- anAttrDescs,
- anAttrIds,
- anAttrVals);
-*/
+ MED::PFamilyInfo anInfo;
+ string aValue = aStr.str();
+ if(myId == 0){
+ anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
+ aValue,
+ myId,
+ myGroupNames);
+ }else{
+ MED::TStringVector anAttrDescs (1, ""); // 1 attribute with empty description,
+ MED::TIntVector anAttrIds (1, myId); // Id=0,
+ MED::TIntVector anAttrVals (1);
+ anAttrVals[0] = myGroupAttributVal != 0? myGroupAttributVal: myId;
+ anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
+ aValue,
+ myId,
+ myGroupNames,
+ anAttrDescs,
+ anAttrIds,
+ anAttrVals);
+ }
// cout << endl;
// cout << "Groups: ";
@@ -279,6 +381,14 @@ void DriverMED_Family::Init (SMESHDS_GroupBase* theGroup)
// Groups list
myGroupNames.clear();
myGroupNames.insert(string(theGroup->GetStoreName()));
+
+ myGroupAttributVal = 0;
+
+ if (theGroup->GetColorGroup()!=0)
+ {
+ myGroupAttributVal = theGroup->GetColorGroup();
+ }
+
}
//=============================================================================
@@ -287,10 +397,12 @@ void DriverMED_Family::Init (SMESHDS_GroupBase* theGroup)
* on the basis of the elements type.
*/
//=============================================================================
-list DriverMED_Family::SplitByType (SMESHDS_SubMesh* theSubMesh,
- const int theId)
+DriverMED_FamilyPtrList
+DriverMED_Family
+::SplitByType (SMESHDS_SubMesh* theSubMesh,
+ const int theId)
{
- list aFamilies;
+ DriverMED_FamilyPtrList aFamilies;
DriverMED_FamilyPtr aNodesFamily (new DriverMED_Family);
DriverMED_FamilyPtr anEdgesFamily (new DriverMED_Family);
DriverMED_FamilyPtr aFacesFamily (new DriverMED_Family);
@@ -361,7 +473,7 @@ void DriverMED_Family::Split (DriverMED_FamilyPtr by,
DriverMED_FamilyPtr common)
{
// Elements
- set::iterator anIter = by->myElements.begin();
+ ElementsSet::iterator anIter = by->myElements.begin();
while ( anIter != by->myElements.end())
{
if (myElements.find(*anIter) != myElements.end())
@@ -378,7 +490,7 @@ void DriverMED_Family::Split (DriverMED_FamilyPtr by,
{
// Groups list
common->myGroupNames = myGroupNames;
- set::iterator aGrNamesIter = by->myGroupNames.begin();
+ MED::TStringSet::iterator aGrNamesIter = by->myGroupNames.begin();
for (; aGrNamesIter != by->myGroupNames.end(); aGrNamesIter++)
{
common->myGroupNames.insert(*aGrNamesIter);
diff --git a/src/DriverMED/DriverMED_Family.h b/src/DriverMED/DriverMED_Family.h
index 1632ccb3b..6a3622755 100644
--- a/src/DriverMED/DriverMED_Family.h
+++ b/src/DriverMED/DriverMED_Family.h
@@ -45,76 +45,92 @@
class DriverMED_Family;
typedef boost::shared_ptr DriverMED_FamilyPtr;
+typedef std::list DriverMED_FamilyPtrList;
+typedef std::map SMESHDS_SubMeshPtrMap;
+typedef std::list SMESHDS_GroupBasePtrList;
+typedef std::set ElementsSet;
class DriverMED_Family
{
public:
- // Methods for groups storing to MED
+ DriverMED_Family();
- static std::list MakeFamilies (const std::map & theSubMeshes,
- const std::list& theGroups,
- const bool doGroupOfNodes,
- const bool doGroupOfEdges,
- const bool doGroupOfFaces,
- const bool doGroupOfVolumes);
- // Split each group from list and each sub-mesh from list
- // on some parts (families) on the basis of the elements membership in other groups
- // from and other sub-meshes from .
- // Resulting families have no common elements.
+ //! Methods for groups storing to MED
+ /*!
+ Split each group from list and each sub-mesh from list
+ on some parts (families) on the basis of the elements membership in other groups
+ from and other sub-meshes from .
+ Resulting families have no common elements.
+ */
+ static
+ DriverMED_FamilyPtrList
+ MakeFamilies (const SMESHDS_SubMeshPtrMap& theSubMeshes,
+ const SMESHDS_GroupBasePtrList& theGroups,
+ const bool doGroupOfNodes,
+ const bool doGroupOfEdges,
+ const bool doGroupOfFaces,
+ const bool doGroupOfVolumes);
- MED::PFamilyInfo GetFamilyInfo (const MED::PWrapper& theWrapper,
- const MED::PMeshInfo& theMeshInfo) const;
- // Create TFamilyInfo for this family
+ //! Create TFamilyInfo for this family
+ MED::PFamilyInfo
+ GetFamilyInfo (const MED::PWrapper& theWrapper,
+ const MED::PMeshInfo& theMeshInfo) const;
- const std::set& GetElements () const { return myElements; }
- // Returns elements of this family
+ //! Returns elements of this family
+ const ElementsSet& GetElements () const;
- int GetId () const { return myId; }
- // Returns a family ID
+ //! Returns a family ID
+ int GetId () const;
+
+ //! Sets a family ID
+ void SetId (const int theId);
public:
// Methods for groups reading from MED
- void AddElement (const SMDS_MeshElement* theElement) { myElements.insert(theElement); }
+ void AddElement(const SMDS_MeshElement* theElement);
- void AddGroupName (std::string theGroupName) { myGroupNames.insert(theGroupName); }
+ const MED::TStringSet& GetGroupNames() const;
+ void AddGroupName(std::string theGroupName);
- void SetType (const SMDSAbs_ElementType theType) { myType = theType; }
- SMDSAbs_ElementType GetType () { return myType; }
+ void SetType(const SMDSAbs_ElementType theType);
+ SMDSAbs_ElementType GetType();
- bool MemberOf (std::string theGroupName) const
- { return (myGroupNames.find(theGroupName) != myGroupNames.end()); }
+ bool MemberOf(std::string theGroupName) const;
- const MED::TStringSet& GetGroupNames () const { return myGroupNames; }
-
- void SetId (const int theId) { myId = theId; }
- // Sets a family ID
+ int GetGroupAttributVal() const;
+ void SetGroupAttributVal( int theValue);
private:
+ //! Initialize the tool by SMESHDS_GroupBase
void Init (SMESHDS_GroupBase* group);
- // Initialize the tool by SMESHDS_GroupBase
- static std::list SplitByType (SMESHDS_SubMesh* theSubMesh,
- const int theId);
- // Split on some parts (families)
- // on the basis of the elements type.
+ //! Split on some parts (families) on the basis of the elements type.
+ static
+ DriverMED_FamilyPtrList
+ SplitByType(SMESHDS_SubMesh* theSubMesh,
+ const int theId);
+
+ /*! Remove from elements, common with ,
+ Remove from elements, common with ,
+ Create family from common elements, with combined groups list.
+ */
void Split (DriverMED_FamilyPtr by,
DriverMED_FamilyPtr common);
- // Remove from elements, common with ,
- // Remove from elements, common with ,
- // Create family from common elements, with combined groups list.
- bool IsEmpty () const { return myElements.empty(); }
- // Check, if this family has empty list of elements
+ //! Check, if this family has empty list of elements
+ bool IsEmpty () const;
+
private:
int myId;
SMDSAbs_ElementType myType;
- std::set myElements;
+ ElementsSet myElements;
MED::TStringSet myGroupNames;
+ int myGroupAttributVal;
};
#endif
diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
index 44e05bf77..49c645f47 100644
--- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
+++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
@@ -41,6 +41,7 @@
#ifdef _DEBUG_
static int MYDEBUG = 0;
+//#define _DEXCEPT_
#else
static int MYDEBUG = 0;
#endif
@@ -69,10 +70,12 @@ DriverMED_R_SMESHDS_Mesh
::Perform()
{
Status aResult = DRS_FAIL;
+#ifndef _DEXCEPT_
try{
+#endif
myFamilies.clear();
if(MYDEBUG) MESSAGE("Perform - myFile : "<GetNbMeshes()){
@@ -195,7 +198,9 @@ DriverMED_R_SMESHDS_Mesh
SMDS_MeshElement* anElement = NULL;
TInt aFamNum = aPolygoneInfo->GetFamNum(iElem);
+#ifndef _DEXCEPT_
try{
+#endif
if(anIsElemNum){
TInt anElemId = aPolygoneInfo->GetElemNum(iElem);
anElement = myMesh->AddPolygonalFaceWithID(aNodeIds,anElemId);
@@ -207,12 +212,13 @@ DriverMED_R_SMESHDS_Mesh
anElement = myMesh->AddPolygonalFace(aNodes);
isRenum = anIsElemNum;
}
+#ifndef _DEXCEPT_
}catch(const std::exception& exc){
aResult = DRS_FAIL;
}catch (...){
aResult = DRS_FAIL;
}
-
+#endif
if(!anElement){
aResult = DRS_WARN_SKIP_ELEM;
}else{
@@ -265,7 +271,9 @@ DriverMED_R_SMESHDS_Mesh
SMDS_MeshElement* anElement = NULL;
TInt aFamNum = aPolyedreInfo->GetFamNum(iElem);
+#ifndef _DEXCEPT_
try{
+#endif
if(anIsElemNum){
TInt anElemId = aPolyedreInfo->GetElemNum(iElem);
anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,anElemId);
@@ -277,12 +285,13 @@ DriverMED_R_SMESHDS_Mesh
anElement = myMesh->AddPolyhedralVolume(aNodes,aQuantities);
isRenum = anIsElemNum;
}
+#ifndef _DEXCEPT_
}catch(const std::exception& exc){
aResult = DRS_FAIL;
}catch(...){
aResult = DRS_FAIL;
}
-
+#endif
if(!anElement){
aResult = DRS_WARN_SKIP_ELEM;
}else{
@@ -302,238 +311,388 @@ DriverMED_R_SMESHDS_Mesh
break;
}
default: {
- PCellInfo aCellInfo = aMed->GetPCellInfo(aMeshInfo,anEntity,aGeom);
- EBooleen anIsElemNum = takeNumbers ? aCellInfo->IsElemNum() : eFAUX;
- TInt aNbElems = aCellInfo->GetNbElem();
- if(MYDEBUG) MESSAGE("Perform - anEntity = "<GetFamNum(iElem);
- try{
- //MESSAGE("Try to create element # " << iElem << " with id = "
- // << aCellInfo->GetElemNum(iElem));
- switch(aGeom){
- case eSEG2:
- case eSEG3:
- if(anIsElemNum)
- anElement = myMesh->AddEdgeWithID(aNodeIds[0],
- aNodeIds[1],
- aCellInfo->GetElemNum(iElem));
- if (!anElement) {
- anElement = myMesh->AddEdge(FindNode(myMesh,aNodeIds[0]),
- FindNode(myMesh,aNodeIds[1]));
- isRenum = anIsElemNum;
- }
- break;
- case eTRIA3:
- case eTRIA6:
- aNbNodes = 3;
- if(anIsElemNum)
- anElement = myMesh->AddFaceWithID(aNodeIds[0],
- aNodeIds[1],
- aNodeIds[2],
- aCellInfo->GetElemNum(iElem));
- if (!anElement) {
- anElement = myMesh->AddFace(FindNode(myMesh,aNodeIds[0]),
- FindNode(myMesh,aNodeIds[1]),
- FindNode(myMesh,aNodeIds[2]));
- isRenum = anIsElemNum;
- }
- break;
- case eQUAD4:
- case eQUAD8:
- aNbNodes = 4;
- // There is some differnce between SMDS and MED
- if(anIsElemNum)
- anElement = myMesh->AddFaceWithID(aNodeIds[0],
- aNodeIds[1],
- aNodeIds[2],
- aNodeIds[3],
- aCellInfo->GetElemNum(iElem));
- if (!anElement) {
- anElement = myMesh->AddFace(FindNode(myMesh,aNodeIds[0]),
- FindNode(myMesh,aNodeIds[1]),
- FindNode(myMesh,aNodeIds[2]),
- FindNode(myMesh,aNodeIds[3]));
- isRenum = anIsElemNum;
- }
- break;
- case eTETRA4:
- case eTETRA10:
- aNbNodes = 4;
- if(anIsElemNum)
- anElement = myMesh->AddVolumeWithID(aNodeIds[0],
- aNodeIds[1],
- aNodeIds[2],
- aNodeIds[3],
- aCellInfo->GetElemNum(iElem));
- if (!anElement) {
- anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
- FindNode(myMesh,aNodeIds[1]),
- FindNode(myMesh,aNodeIds[2]),
- FindNode(myMesh,aNodeIds[3]));
- isRenum = anIsElemNum;
- }
- break;
- case ePYRA5:
- case ePYRA13:
- aNbNodes = 5;
- // There is some differnce between SMDS and MED
- if(anIsElemNum)
- anElement = myMesh->AddVolumeWithID(aNodeIds[0],
- aNodeIds[1],
- aNodeIds[2],
- aNodeIds[3],
- aNodeIds[4],
- aCellInfo->GetElemNum(iElem));
- if (!anElement) {
- anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
- FindNode(myMesh,aNodeIds[1]),
- FindNode(myMesh,aNodeIds[2]),
- FindNode(myMesh,aNodeIds[3]),
- FindNode(myMesh,aNodeIds[4]));
- isRenum = anIsElemNum;
- }
- break;
- case ePENTA6:
- case ePENTA15:
- aNbNodes = 6;
- if(anIsElemNum)
- anElement = myMesh->AddVolumeWithID(aNodeIds[0],
- aNodeIds[1],
- aNodeIds[2],
- aNodeIds[3],
- aNodeIds[4],
- aNodeIds[5],
- aCellInfo->GetElemNum(iElem));
- if (!anElement) {
- anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
- FindNode(myMesh,aNodeIds[1]),
- FindNode(myMesh,aNodeIds[2]),
- FindNode(myMesh,aNodeIds[3]),
- FindNode(myMesh,aNodeIds[4]),
- FindNode(myMesh,aNodeIds[5]));
- isRenum = anIsElemNum;
- }
- break;
- case eHEXA8:
- case eHEXA20:
- aNbNodes = 8;
- if(anIsElemNum)
- anElement = myMesh->AddVolumeWithID(aNodeIds[0],
- aNodeIds[1],
- aNodeIds[2],
- aNodeIds[3],
- aNodeIds[4],
- aNodeIds[5],
- aNodeIds[6],
- aNodeIds[7],
- aCellInfo->GetElemNum(iElem));
- if (!anElement) {
- anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
- FindNode(myMesh,aNodeIds[1]),
- FindNode(myMesh,aNodeIds[2]),
- FindNode(myMesh,aNodeIds[3]),
- FindNode(myMesh,aNodeIds[4]),
- FindNode(myMesh,aNodeIds[5]),
- FindNode(myMesh,aNodeIds[6]),
- FindNode(myMesh,aNodeIds[7]));
- isRenum = anIsElemNum;
- }
- break;
- }
- }catch(const std::exception& exc){
- //INFOS("Follow exception was cought:\n\t"<AddElement(anElement);
- myFamilies[aFamNum]->SetType(anElement->GetType());
- }
- }
- }
- }}
- }
- }
+#ifdef _EDF_NODE_IDS_
+ if(anIsNodeNum)
+ for(int iNode = 0; iNode < aNbNodes; iNode++)
+ aNodeIds[iNode] = aNodeInfo->GetElemNum(aConnSlice[iNode] - 1);
+ else
+ for(int iNode = 0; iNode < aNbNodes; iNode++)
+ aNodeIds[iNode] = aConnSlice[iNode];
+#else
+ for(int iNode = 0; iNode < aNbNodes; iNode++)
+ aNodeIds[iNode] = aConnSlice[iNode];
+#endif
+ anIsValidConnect = true;
+#ifndef _DEXCEPT_
+ }catch(const std::exception& exc){
+ //INFOS("Follow exception was cought:\n\t"<GetFamNum(iElem);
+#ifndef _DEXCEPT_
+ try{
+#endif
+ //MESSAGE("Try to create element # " << iElem << " with id = "
+ // << aCellInfo->GetElemNum(iElem));
+ switch(aGeom){
+ case eSEG2:
+ if(anIsElemNum)
+ anElement = myMesh->AddEdgeWithID(aNodeIds[0],
+ aNodeIds[1],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddEdge(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eSEG3:
+ if(anIsElemNum)
+ anElement = myMesh->AddEdgeWithID(aNodeIds[0],
+ aNodeIds[1],
+ aNodeIds[2],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddEdge(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eTRIA3:
+ aNbNodes = 3;
+ if(anIsElemNum)
+ anElement = myMesh->AddFaceWithID(aNodeIds[0],
+ aNodeIds[1],
+ aNodeIds[2],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddFace(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eTRIA6:
+ aNbNodes = 6;
+ if(anIsElemNum)
+ anElement = myMesh->AddFaceWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aNodeIds[4], aNodeIds[5],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddFace(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eQUAD4:
+ aNbNodes = 4;
+ if(anIsElemNum)
+ anElement = myMesh->AddFaceWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddFace(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eQUAD8:
+ aNbNodes = 8;
+ if(anIsElemNum)
+ anElement = myMesh->AddFaceWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aNodeIds[4], aNodeIds[5],
+ aNodeIds[6], aNodeIds[7],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddFace(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]),
+ FindNode(myMesh,aNodeIds[6]),
+ FindNode(myMesh,aNodeIds[7]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eTETRA4:
+ aNbNodes = 4;
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eTETRA10:
+ aNbNodes = 10;
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aNodeIds[4], aNodeIds[5],
+ aNodeIds[6], aNodeIds[7],
+ aNodeIds[8], aNodeIds[9],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]),
+ FindNode(myMesh,aNodeIds[6]),
+ FindNode(myMesh,aNodeIds[7]),
+ FindNode(myMesh,aNodeIds[8]),
+ FindNode(myMesh,aNodeIds[9]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case ePYRA5:
+ aNbNodes = 5;
+ // There is some differnce between SMDS and MED
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aNodeIds[4],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case ePYRA13:
+ aNbNodes = 13;
+ // There is some differnce between SMDS and MED
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aNodeIds[4], aNodeIds[5],
+ aNodeIds[6], aNodeIds[7],
+ aNodeIds[8], aNodeIds[9],
+ aNodeIds[10], aNodeIds[11],
+ aNodeIds[12],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]),
+ FindNode(myMesh,aNodeIds[6]),
+ FindNode(myMesh,aNodeIds[7]),
+ FindNode(myMesh,aNodeIds[8]),
+ FindNode(myMesh,aNodeIds[9]),
+ FindNode(myMesh,aNodeIds[10]),
+ FindNode(myMesh,aNodeIds[11]),
+ FindNode(myMesh,aNodeIds[12]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case ePENTA6:
+ aNbNodes = 6;
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0],
+ aNodeIds[1],
+ aNodeIds[2],
+ aNodeIds[3],
+ aNodeIds[4],
+ aNodeIds[5],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case ePENTA15:
+ aNbNodes = 15;
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aNodeIds[4], aNodeIds[5],
+ aNodeIds[6], aNodeIds[7],
+ aNodeIds[8], aNodeIds[9],
+ aNodeIds[10], aNodeIds[11],
+ aNodeIds[12], aNodeIds[13],
+ aNodeIds[14],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]),
+ FindNode(myMesh,aNodeIds[6]),
+ FindNode(myMesh,aNodeIds[7]),
+ FindNode(myMesh,aNodeIds[8]),
+ FindNode(myMesh,aNodeIds[9]),
+ FindNode(myMesh,aNodeIds[10]),
+ FindNode(myMesh,aNodeIds[11]),
+ FindNode(myMesh,aNodeIds[12]),
+ FindNode(myMesh,aNodeIds[13]),
+ FindNode(myMesh,aNodeIds[14]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eHEXA8:
+ aNbNodes = 8;
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0],
+ aNodeIds[1],
+ aNodeIds[2],
+ aNodeIds[3],
+ aNodeIds[4],
+ aNodeIds[5],
+ aNodeIds[6],
+ aNodeIds[7],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]),
+ FindNode(myMesh,aNodeIds[6]),
+ FindNode(myMesh,aNodeIds[7]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ case eHEXA20:
+ aNbNodes = 20;
+ if(anIsElemNum)
+ anElement = myMesh->AddVolumeWithID(aNodeIds[0], aNodeIds[1],
+ aNodeIds[2], aNodeIds[3],
+ aNodeIds[4], aNodeIds[5],
+ aNodeIds[6], aNodeIds[7],
+ aNodeIds[8], aNodeIds[9],
+ aNodeIds[10], aNodeIds[11],
+ aNodeIds[12], aNodeIds[13],
+ aNodeIds[14], aNodeIds[15],
+ aNodeIds[16], aNodeIds[17],
+ aNodeIds[18], aNodeIds[19],
+ aCellInfo->GetElemNum(iElem));
+ if (!anElement) {
+ anElement = myMesh->AddVolume(FindNode(myMesh,aNodeIds[0]),
+ FindNode(myMesh,aNodeIds[1]),
+ FindNode(myMesh,aNodeIds[2]),
+ FindNode(myMesh,aNodeIds[3]),
+ FindNode(myMesh,aNodeIds[4]),
+ FindNode(myMesh,aNodeIds[5]),
+ FindNode(myMesh,aNodeIds[6]),
+ FindNode(myMesh,aNodeIds[7]),
+ FindNode(myMesh,aNodeIds[8]),
+ FindNode(myMesh,aNodeIds[9]),
+ FindNode(myMesh,aNodeIds[10]),
+ FindNode(myMesh,aNodeIds[11]),
+ FindNode(myMesh,aNodeIds[12]),
+ FindNode(myMesh,aNodeIds[13]),
+ FindNode(myMesh,aNodeIds[14]),
+ FindNode(myMesh,aNodeIds[15]),
+ FindNode(myMesh,aNodeIds[16]),
+ FindNode(myMesh,aNodeIds[17]),
+ FindNode(myMesh,aNodeIds[18]),
+ FindNode(myMesh,aNodeIds[19]));
+ isRenum = anIsElemNum;
+ }
+ break;
+ }
+#ifndef _DEXCEPT_
+ }catch(const std::exception& exc){
+ //INFOS("Follow exception was cought:\n\t"<AddElement(anElement);
+ myFamilies[aFamNum]->SetType(anElement->GetType());
+ }
+ }
+ }
+ }}
+ }
+ }
}
}
+#ifndef _DEXCEPT_
}catch(const std::exception& exc){
INFOS("Follow exception was cought:\n\t"<first;
const TRecord& aRec = anIter->second;
- if(IsBeam(aRec.fe_descriptor_id)){
- anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
- aRec.node_labels[1],
- aLabel);
- }else if(IsFace(aRec.fe_descriptor_id)){
+ if(IsBeam(aRec.fe_descriptor_id)) {
+ if(aRec.fe_descriptor_id == 11) {
+ // edge with two nodes
+ anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
+ aRec.node_labels[1],
+ aLabel);
+ }
+ else {
+ // quadratic edge (with 3 nodes)
+ anElement = myMesh->AddEdgeWithID(aRec.node_labels[0],
+ aRec.node_labels[1],
+ aRec.node_labels[2],
+ aLabel);
+ }
+ }
+ else if(IsFace(aRec.fe_descriptor_id)) {
switch(aRec.fe_descriptor_id){
case 71: // TRI3
case 72:
@@ -76,18 +87,31 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
case 41: // Plane Stress Linear Triangle - TRI3
case 91: // Thin Shell Linear Triangle - TRI3
-
- case 42: // Plane Stress Quadratic Triangle - TRI6
- case 92: // Thin Shell Quadratic Triangle - TRI6
-
anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
aRec.node_labels[1],
aRec.node_labels[2],
aLabel);
break;
+ case 42: // Plane Stress Quadratic Triangle - TRI6
+ case 92: // Thin Shell Quadratic Triangle - TRI6
+ anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
+ aRec.node_labels[1],
+ aRec.node_labels[2],
+ aRec.node_labels[3],
+ aRec.node_labels[4],
+ aRec.node_labels[5],
+ aLabel);
+ break;
+
case 44: // Plane Stress Linear Quadrilateral - QUAD4
case 94: // Thin Shell Linear Quadrilateral - QUAD4
+ anElement = myMesh->AddFaceWithID(aRec.node_labels[0],
+ aRec.node_labels[1],
+ aRec.node_labels[2],
+ aRec.node_labels[3],
+ aLabel);
+ break;
case 45: // Plane Stress Quadratic Quadrilateral - QUAD8
case 95: // Thin Shell Quadratic Quadrilateral - QUAD8
@@ -95,24 +119,40 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
aRec.node_labels[1],
aRec.node_labels[2],
aRec.node_labels[3],
+ aRec.node_labels[4],
+ aRec.node_labels[5],
+ aRec.node_labels[6],
+ aRec.node_labels[7],
aLabel);
break;
}
- }else if(IsVolume(aRec.fe_descriptor_id)){
+ }
+ else if(IsVolume(aRec.fe_descriptor_id)){
switch(aRec.fe_descriptor_id){
case 111: // Solid Linear Tetrahedron - TET4
- case 118: // Solid Quadratic Tetrahedron - TET10
-
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[2],
aRec.node_labels[1],
aRec.node_labels[3],
aLabel);
break;
+
+ case 118: // Solid Quadratic Tetrahedron - TET10
+ anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+ aRec.node_labels[2],
+ aRec.node_labels[1],
+ aRec.node_labels[3],
+ aRec.node_labels[6],
+ aRec.node_labels[5],
+ aRec.node_labels[4],
+ aRec.node_labels[7],
+ aRec.node_labels[9],
+ aRec.node_labels[8],
+ aLabel);
+ break;
case 112: // Solid Linear Prism - PRISM6
-
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
aRec.node_labels[2],
aRec.node_labels[1],
@@ -123,13 +163,21 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
break;
case 113: // Solid Quadratic Prism - PRISM15
-
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
- aRec.node_labels[4],
aRec.node_labels[2],
- aRec.node_labels[9],
- aRec.node_labels[13],
+ aRec.node_labels[1],
+ aRec.node_labels[3],
+ aRec.node_labels[5],
+ aRec.node_labels[4],
+ aRec.node_labels[8],
+ aRec.node_labels[7],
+ aRec.node_labels[6],
aRec.node_labels[11],
+ aRec.node_labels[10],
+ aRec.node_labels[9],
+ aRec.node_labels[12],
+ aRec.node_labels[14],
+ aRec.node_labels[13],
aLabel);
break;
@@ -146,26 +194,57 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform()
break;
case 116: // Solid Quadratic Brick - HEX20
-
anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
- aRec.node_labels[6],
- aRec.node_labels[4],
+ aRec.node_labels[3],
aRec.node_labels[2],
- aRec.node_labels[12],
- aRec.node_labels[18],
- aRec.node_labels[16],
+ aRec.node_labels[1],
+ aRec.node_labels[4],
+ aRec.node_labels[7],
+ aRec.node_labels[6],
+ aRec.node_labels[5],
+ aRec.node_labels[11],
+ aRec.node_labels[10],
+ aRec.node_labels[9],
+ aRec.node_labels[8],
+ aRec.node_labels[15],
aRec.node_labels[14],
+ aRec.node_labels[13],
+ aRec.node_labels[12],
+ aRec.node_labels[16],
+ aRec.node_labels[19],
+ aRec.node_labels[18],
+ aRec.node_labels[17],
aLabel);
break;
+
+ case 114: // pyramid of 13 nodes (quadratic) - PIRA13
+ anElement = myMesh->AddVolumeWithID(aRec.node_labels[0],
+ aRec.node_labels[3],
+ aRec.node_labels[2],
+ aRec.node_labels[1],
+ aRec.node_labels[4],
+ aRec.node_labels[8],
+ aRec.node_labels[7],
+ aRec.node_labels[6],
+ aRec.node_labels[5],
+ aRec.node_labels[9],
+ aRec.node_labels[12],
+ aRec.node_labels[11],
+ aRec.node_labels[10],
+ aLabel);
+ break;
+
}
}
if(!anElement)
MESSAGE("DriverUNV_R_SMDS_Mesh::Perform - can not add element with ID = "<next();
aRec.node_labels.push_back(aNode->GetID());
}
- aRec.fe_descriptor_id = 11;
+ if(aNbNodes==2)
+ aRec.fe_descriptor_id = 11;
+ else
+ aRec.fe_descriptor_id = 21;
aDataSet2412.insert(TDataSet::value_type(aLabel,aRec));
}
MESSAGE("Perform - aDataSet2412.size() = "<RegisterCellsWithType(VTK_TRIANGLE);
aFilter->RegisterCellsWithType(VTK_POLYGON);
aFilter->RegisterCellsWithType(VTK_QUAD);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
my3DActor = SMESH_DeviceActor::New();
my3DActor->SetUserMatrix(aMatrix);
@@ -164,6 +166,8 @@ SMESH_ActorDef::SMESH_ActorDef()
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_WEDGE);
aFilter->RegisterCellsWithType(VTK_PYRAMID);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
//Definition 1D divice of the actor
@@ -185,6 +189,7 @@ SMESH_ActorDef::SMESH_ActorDef()
aFilter = my1DActor->GetExtractUnstructuredGrid();
aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
aFilter->RegisterCellsWithType(VTK_LINE);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
my1DProp = vtkProperty::New();
my1DProp->DeepCopy(myEdgeProp);
@@ -210,6 +215,7 @@ SMESH_ActorDef::SMESH_ActorDef()
aFilter = my1DExtActor->GetExtractUnstructuredGrid();
aFilter->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
aFilter->RegisterCellsWithType(VTK_LINE);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
//Definition 0D divice of the actor
@@ -263,8 +269,6 @@ SMESH_ActorDef::SMESH_ActorDef()
myHighlitableActor->PickableOff();
myHighlitableActor->SetRepresentation(SMESH_DeviceActor::eWireframe);
- SetShrinkFactor( SMESH::GetFloat( "SMESH:shrink_coeff", 0.75 ) );
-
myName = "";
myIO = NULL;
@@ -748,13 +752,15 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
my2DActor->GetPolygonOffsetParameters(aFactor,aUnits);
my2DActor->SetPolygonOffsetParameters(aFactor,aUnits*0.75);
- //SetIsShrunkable(theGrid->GetNumberOfCells() > 10);
- SetIsShrunkable(true);
-
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
if( !mgr )
return false;
+ //SetIsShrunkable(theGrid->GetNumberOfCells() > 10);
+ SetIsShrunkable(true);
+
+ SetShrinkFactor( SMESH::GetFloat( "SMESH:shrink_coeff", 0.75 ) );
+
int aMode = mgr->integerValue( "SMESH", "display_mode" );
SetRepresentation(-1);
@@ -835,6 +841,8 @@ bool SMESH_ActorDef::IsInfinitive(){
void SMESH_ActorDef::SetIsShrunkable(bool theShrunkable){
+ if ( myIsShrinkable == theShrunkable )
+ return;
myIsShrinkable = theShrunkable;
Modified();
}
@@ -1015,6 +1023,7 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
if(myEntityMode & eEdges){
if (MYDEBUG) MESSAGE("EDGES");
aFilter->RegisterCellsWithType(VTK_LINE);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_EDGE);
}
if(myEntityMode & eFaces){
@@ -1022,6 +1031,8 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
aFilter->RegisterCellsWithType(VTK_TRIANGLE);
aFilter->RegisterCellsWithType(VTK_POLYGON);
aFilter->RegisterCellsWithType(VTK_QUAD);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_TRIANGLE);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_QUAD);
}
if(myEntityMode & eVolumes){
@@ -1031,6 +1042,8 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode){
aFilter->RegisterCellsWithType(VTK_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_WEDGE);
aFilter->RegisterCellsWithType(VTK_PYRAMID);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_TETRA);
+ aFilter->RegisterCellsWithType(VTK_QUADRATIC_HEXAHEDRON);
aFilter->RegisterCellsWithType(VTK_CONVEX_POINT_SET);
}
aFilter->Update();
@@ -1135,6 +1148,8 @@ void SMESH_ActorDef::SetRepresentation(int theMode){
void SMESH_ActorDef::SetPointRepresentation(bool theIsPointsVisible){
+ if ( myIsPointsVisible == theIsPointsVisible )
+ return;
myIsPointsVisible = theIsPointsVisible;
SetRepresentation(GetRepresentation());
}
@@ -1175,12 +1190,16 @@ void SMESH_ActorDef::UpdateHighlight(){
void SMESH_ActorDef::highlight(bool theHighlight){
+ if ( myIsHighlighted == theHighlight )
+ return;
myIsHighlighted = theHighlight;
UpdateHighlight();
}
void SMESH_ActorDef::SetPreSelected(bool thePreselect){
+ if ( myIsPreselected == thePreselect )
+ return;
myIsPreselected = thePreselect;
UpdateHighlight();
}
diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx
index 3548aaefe..28670e6be 100644
--- a/src/OBJECT/SMESH_DeviceActor.cxx
+++ b/src/OBJECT/SMESH_DeviceActor.cxx
@@ -547,14 +547,22 @@ void SMESH_DeviceActor::SetRepresentation(EReperesent theMode){
switch(theMode){
case ePoint:
myGeomFilter->SetInside(true);
+ myGeomFilter->SetWireframeMode(false);
GetProperty()->SetRepresentation(0);
break;
+ case eWireframe:
+ myGeomFilter->SetInside(false);
+ myGeomFilter->SetWireframeMode(true);
+ GetProperty()->SetRepresentation(theMode);
+ break;
case eInsideframe:
myGeomFilter->SetInside(true);
+ myGeomFilter->SetWireframeMode(true);
GetProperty()->SetRepresentation(1);
break;
- default :
+ case eSurface:
myGeomFilter->SetInside(false);
+ myGeomFilter->SetWireframeMode(false);
GetProperty()->SetRepresentation(theMode);
}
myRepresentation = theMode;
@@ -646,6 +654,8 @@ void SMESH_DeviceActor::SetShrinkFactor(float theValue){
void SMESH_DeviceActor::SetHighlited(bool theIsHighlited){
+ if ( myIsHighlited == theIsHighlited )
+ return;
myIsHighlited = theIsHighlited;
Modified();
}
diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx
index 885ee3de3..33aa1b0b6 100644
--- a/src/OBJECT/SMESH_Object.cxx
+++ b/src/OBJECT/SMESH_Object.cxx
@@ -31,8 +31,10 @@
#include "SMDS_Mesh.hxx"
#include "SMESH_Actor.h"
#include "SMESH_ControlsDef.hxx"
-#include
+#include "SalomeApp_Application.h"
+#include "VTKViewer_ExtractUnstructuredGrid.h"
+#include CORBA_SERVER_HEADER(SMESH_Gen)
#include CORBA_SERVER_HEADER(SALOME_Exception)
#include
@@ -69,271 +71,6 @@ static int MYDEBUGWITHFILES = 0;
#endif
-namespace{
-
- inline const SMDS_MeshNode* FindNode(const SMDS_Mesh* theMesh, int theId){
- if(const SMDS_MeshNode* anElem = theMesh->FindNode(theId)) return anElem;
- EXCEPTION(runtime_error,"SMDS_Mesh::FindNode - cannot find a SMDS_MeshNode for ID = "<FindElement(theId)) return anElem;
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot find a SMDS_MeshElement for ID = "<AddNodeWithID(aCoords[aCoordId],
- aCoords[aCoordId+1],
- aCoords[aCoordId+2],
- anIndexes[anElemId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddNodeWithID for ID = "<AddEdgeWithID(anIndexes[anIndexId+1],
- anIndexes[anIndexId+2],
- anIndexes[anIndexId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddEdgeWithID for ID = "<AddFaceWithID(anIndexes[anIndexId+1],
- anIndexes[anIndexId+2],
- anIndexes[anIndexId+3],
- anIndexes[anIndexId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "<AddFaceWithID(anIndexes[anIndexId+1],
- anIndexes[anIndexId+2],
- anIndexes[anIndexId+3],
- anIndexes[anIndexId+4],
- anIndexes[anIndexId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddFaceWithID for ID = "< nodes_ids (aNbNodes);
- for (int i = 0; i < aNbNodes; i++) {
- nodes_ids[i] = anIndexes[anIndexId++];
- }
-
- SMDS_MeshElement* anElem = theMesh->AddPolygonalFaceWithID(nodes_ids, aFaceId);
- if (!anElem)
- EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolygonalFaceWithID for ID = "
- << anElemId);
- }
- }
-
-
- inline void AddTetrasWithID(SMDS_Mesh* theMesh,
- SMESH::log_array_var& theSeq,
- CORBA::Long theId)
- {
- const SMESH::long_array& anIndexes = theSeq[theId].indexes;
- CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
- if(5*aNbElems != anIndexes.length())
- EXCEPTION(runtime_error,"AddEdgeWithID - 5*aNbElems != anIndexes.length()");
- for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
- SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
- anIndexes[anIndexId+2],
- anIndexes[anIndexId+3],
- anIndexes[anIndexId+4],
- anIndexes[anIndexId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1],
- anIndexes[anIndexId+2],
- anIndexes[anIndexId+3],
- anIndexes[anIndexId+4],
- anIndexes[anIndexId+5],
- anIndexes[anIndexId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1],
- anIndexes[anIndexId+2],
- anIndexes[anIndexId+3],
- anIndexes[anIndexId+4],
- anIndexes[anIndexId+5],
- anIndexes[anIndexId+6],
- anIndexes[anIndexId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "<AddVolumeWithID(anIndexes[anIndexId+1],
- anIndexes[anIndexId+2],
- anIndexes[anIndexId+3],
- anIndexes[anIndexId+4],
- anIndexes[anIndexId+5],
- anIndexes[anIndexId+6],
- anIndexes[anIndexId+7],
- anIndexes[anIndexId+8],
- anIndexes[anIndexId]);
- if(!anElem)
- EXCEPTION(runtime_error,"SMDS_Mesh::FindElement - cannot AddVolumeWithID for ID = "< nodes_ids (aNbNodes);
- for (int i = 0; i < aNbNodes; i++) {
- nodes_ids[i] = anIndexes[anIndexId++];
- }
-
- int aNbFaces = anIndexes[anIndexId++];
- std::vector quantities (aNbFaces);
- for (int i = 0; i < aNbFaces; i++) {
- quantities[i] = anIndexes[anIndexId++];
- }
-
- SMDS_MeshElement* anElem =
- theMesh->AddPolyhedralVolumeWithID(nodes_ids, quantities, aFaceId);
- if (!anElem)
- EXCEPTION(runtime_error, "SMDS_Mesh::FindElement - cannot AddPolyhedralVolumeWithID for ID = "
- << anElemId);
- }
- }
-
-
- inline void ChangePolyhedronNodes (SMDS_Mesh* theMesh,
- SMESH::log_array_var& theSeq,
- CORBA::Long theId)
- {
- const SMESH::long_array& anIndexes = theSeq[theId].indexes;
- CORBA::Long iind = 0, aNbElems = theSeq[theId].number;
-
- for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++)
- {
- // find element
- const SMDS_MeshElement* elem = FindElement(theMesh, anIndexes[iind++]);
- // nb nodes
- int nbNodes = anIndexes[iind++];
- // nodes
- std::vector aNodes (nbNodes);
- for (int iNode = 0; iNode < nbNodes; iNode++) {
- aNodes[iNode] = FindNode(theMesh, anIndexes[iind++]);
- }
- // nb faces
- int nbFaces = anIndexes[iind++];
- // quantities
- std::vector quantities (nbFaces);
- for (int iFace = 0; iFace < nbFaces; iFace++) {
- quantities[iFace] = anIndexes[iind++];
- }
- // change
- theMesh->ChangePolyhedronNodes(elem, aNodes, quantities);
- }
- }
-
-
-}
/*
Class : SMESH_VisualObjDef
Description : Base class for all mesh objects to be visuilised
@@ -350,12 +87,16 @@ static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
switch( theType )
{
case SMDSAbs_Edge:
- return theNbNodes == 2 ? VTK_LINE : VTK_EMPTY_CELL;
+ if( theNbNodes == 2 ) return VTK_LINE;
+ else if ( theNbNodes == 3 ) return VTK_QUADRATIC_EDGE;
+ else return VTK_EMPTY_CELL;
case SMDSAbs_Face :
if (thePoly && theNbNodes>2 ) return VTK_POLYGON;
else if ( theNbNodes == 3 ) return VTK_TRIANGLE;
else if ( theNbNodes == 4 ) return VTK_QUAD;
+ else if ( theNbNodes == 6 ) return VTK_QUADRATIC_TRIANGLE;
+ else if ( theNbNodes == 8 ) return VTK_QUADRATIC_QUAD;
else return VTK_EMPTY_CELL;
case SMDSAbs_Volume:
@@ -364,6 +105,15 @@ static inline vtkIdType getCellType( const SMDSAbs_ElementType theType,
else if ( theNbNodes == 5 ) return VTK_PYRAMID;
else if ( theNbNodes == 6 ) return VTK_WEDGE;
else if ( theNbNodes == 8 ) return VTK_HEXAHEDRON;
+ else if ( theNbNodes == 10 ) {
+ return VTK_QUADRATIC_TETRA;
+ }
+ else if ( theNbNodes == 20 ) {
+ return VTK_QUADRATIC_HEXAHEDRON;
+ }
+ else if ( theNbNodes==13 || theNbNodes==15 ) {
+ return VTK_CONVEX_POINT_SET;
+ }
else return VTK_EMPTY_CELL;
default: return VTK_EMPTY_CELL;
@@ -485,42 +235,6 @@ void SMESH_VisualObjDef::buildNodePrs()
aPoints->Delete();
myGrid->SetCells( 0, 0, 0 );
-
- // Create cells
- /*
- int nbPoints = aPoints->GetNumberOfPoints();
- vtkIdList *anIdList = vtkIdList::New();
- anIdList->SetNumberOfIds( 1 );
-
- vtkCellArray *aCells = vtkCellArray::New();
- aCells->Allocate( 2 * nbPoints, 0 );
-
- vtkUnsignedCharArray* aCellTypesArray = vtkUnsignedCharArray::New();
- aCellTypesArray->SetNumberOfComponents( 1 );
- aCellTypesArray->Allocate( nbPoints );
-
- for( vtkIdType aCellId = 0; aCellId < nbPoints; aCellId++ )
- {
- anIdList->SetId( 0, aCellId );
- aCells->InsertNextCell( anIdList );
- aCellTypesArray->InsertNextValue( VTK_VERTEX );
- }
-
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
- aCellLocationsArray->SetNumberOfComponents( 1 );
- aCellLocationsArray->SetNumberOfTuples( nbPoints );
-
- aCells->InitTraversal();
- for( vtkIdType i = 0, *pts, npts; aCells->GetNextCell( npts, pts ); i++ )
- aCellLocationsArray->SetValue( i, aCells->GetTraversalLocation( npts ) );
-
- myGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
-
- aCellLocationsArray->Delete();
- aCellTypesArray->Delete();
- aCells->Delete();
- anIdList->Delete();
- */
}
//=================================================================================
@@ -651,11 +365,34 @@ void SMESH_VisualObjDef::buildElemPrs()
static int anIds[] = {0,1,2,3,4,5};
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
- } else if (aNbNodes == 8) {
+ }
+ else if (aNbNodes == 8) {
static int anIds[] = {0,3,2,1,4,7,6,5};
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
- } else {
+ }
+ else if (aNbNodes == 10) {
+ static int anIds[] = {0,2,1,3,6,5,4,7,9,8};
+ for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
+ }
+ else if (aNbNodes == 13) {
+ static int anIds[] = {0,3,2,1,4,8,7,6,5,9,12,11,10};
+ for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
+ }
+ else if (aNbNodes == 15) {
+ static int anIds[] = {0,2,1,3,5,4,8,7,6,11,10,9,12,14,13};
+ for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
+ //for (int k = 0; k < aNbNodes; k++) {
+ // int nn = aConnectivities[k];
+ // const SMDS_MeshNode* N = static_cast (aConnect[nn]);
+ // cout<<"k="<X()<<","<Y()<<","<Z()<<")"< 0) {
@@ -748,14 +485,11 @@ bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId,
// function : SMESH_MeshObj
// purpose : Constructor
//=================================================================================
-SMESH_MeshObj::SMESH_MeshObj(SMESH::SMESH_Mesh_ptr theMesh)
+SMESH_MeshObj::SMESH_MeshObj(SMESH::SMESH_Mesh_ptr theMesh):
+ myClient(SalomeApp_Application::orb(),theMesh)
{
if ( MYDEBUG )
- MESSAGE("SMESH_MeshObj - theMesh->_is_nil() = "<_is_nil());
-
- myMeshServer = SMESH::SMESH_Mesh::_duplicate( theMesh );
- myMeshServer->Register();
- myMesh = new SMDS_Mesh();
+ MESSAGE("SMESH_MeshObj - this = "<_is_nil() = "<_is_nil());
}
//=================================================================================
@@ -764,8 +498,8 @@ SMESH_MeshObj::SMESH_MeshObj(SMESH::SMESH_Mesh_ptr theMesh)
//=================================================================================
SMESH_MeshObj::~SMESH_MeshObj()
{
- myMeshServer->Destroy();
- delete myMesh;
+ if ( MYDEBUG )
+ MESSAGE("SMESH_MeshObj - this = "<GetLog( theIsClear );
- CORBA::Long aLength = aSeq->length();
-
- if( MYDEBUG ) MESSAGE( "Update: length of the script is "<RemoveNode( FindNode( myMesh, anIndexes[anElemId] ) );
- break;
-
- case SMESH::REMOVE_ELEMENT:
- for( ; anElemId < aNbElems; anElemId++ )
- myMesh->RemoveElement( FindElement( myMesh, anIndexes[anElemId] ) );
- break;
-
- case SMESH::MOVE_NODE:
- for(CORBA::Long aCoordId=0; anElemId < aNbElems; anElemId++, aCoordId+=3)
- {
- SMDS_MeshNode* node =
- const_cast( FindNode( myMesh, anIndexes[anElemId] ));
- node->setXYZ( aCoords[aCoordId], aCoords[aCoordId+1], aCoords[aCoordId+2] );
- }
- break;
-
- case SMESH::CHANGE_ELEMENT_NODES:
- for ( CORBA::Long i = 0; anElemId < aNbElems; anElemId++ )
- {
- // find element
- const SMDS_MeshElement* elem = FindElement( myMesh, anIndexes[i++] );
- // nb nodes
- int nbNodes = anIndexes[i++];
- // nodes
- //ASSERT( nbNodes < 9 );
- const SMDS_MeshNode* aNodes[ nbNodes ];
- for ( int iNode = 0; iNode < nbNodes; iNode++ )
- aNodes[ iNode ] = FindNode( myMesh, anIndexes[i++] );
- // change
- myMesh->ChangeElementNodes( elem, aNodes, nbNodes );
- }
- break;
-
- case SMESH::CHANGE_POLYHEDRON_NODES:
- ChangePolyhedronNodes(myMesh, aSeq, anId);
- break;
- case SMESH::RENUMBER:
- for(CORBA::Long i=0; anElemId < aNbElems; anElemId++, i+=3)
- {
- myMesh->Renumber( anIndexes[i], anIndexes[i+1], anIndexes[i+2] );
- }
- break;
-
- default:;
- }
- }
- }
- catch ( SALOME::SALOME_Exception& exc )
- {
- INFOS("Following exception was cought:\n\t"<NbNodes() = "<NbNodes());
- MESSAGE("Update - myMesh->NbEdges() = "<NbEdges());
- MESSAGE("Update - myMesh->NbFaces() = "<NbFaces());
- MESSAGE("Update - myMesh->NbVolumes() = "<NbVolumes());
- }
-
- // Fill unstructured grid
- buildPrs();
+ if ( myClient.Update(theIsClear) )
+ buildPrs(); // Fill unstructured grid
}
//=================================================================================
@@ -887,7 +519,7 @@ void SMESH_MeshObj::Update( int theIsClear )
//=================================================================================
int SMESH_MeshObj::GetElemDimension( const int theObjId )
{
- const SMDS_MeshElement* anElem = myMesh->FindElement( theObjId );
+ const SMDS_MeshElement* anElem = myClient->FindElement( theObjId );
if ( anElem == 0 )
return 0;
@@ -911,22 +543,22 @@ int SMESH_MeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
{
case SMDSAbs_Node:
{
- return myMesh->NbNodes();
+ return myClient->NbNodes();
}
break;
case SMDSAbs_Edge:
{
- return myMesh->NbEdges();
+ return myClient->NbEdges();
}
break;
case SMDSAbs_Face:
{
- return myMesh->NbFaces();
+ return myClient->NbFaces();
}
break;
case SMDSAbs_Volume:
{
- return myMesh->NbVolumes();
+ return myClient->NbVolumes();
}
break;
default:
@@ -943,25 +575,25 @@ int SMESH_MeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList&
{
case SMDSAbs_Node:
{
- SMDS_NodeIteratorPtr anIter = myMesh->nodesIterator();
+ SMDS_NodeIteratorPtr anIter = myClient->nodesIterator();
while ( anIter->more() ) theObjs.push_back( anIter->next() );
}
break;
case SMDSAbs_Edge:
{
- SMDS_EdgeIteratorPtr anIter = myMesh->edgesIterator();
+ SMDS_EdgeIteratorPtr anIter = myClient->edgesIterator();
while ( anIter->more() ) theObjs.push_back( anIter->next() );
}
break;
case SMDSAbs_Face:
{
- SMDS_FaceIteratorPtr anIter = myMesh->facesIterator();
+ SMDS_FaceIteratorPtr anIter = myClient->facesIterator();
while ( anIter->more() ) theObjs.push_back( anIter->next() );
}
break;
case SMDSAbs_Volume:
{
- SMDS_VolumeIteratorPtr anIter = myMesh->volumesIterator();
+ SMDS_VolumeIteratorPtr anIter = myClient->volumesIterator();
while ( anIter->more() ) theObjs.push_back( anIter->next() );
}
break;
@@ -987,7 +619,7 @@ void SMESH_MeshObj::UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor
//=================================================================================
bool SMESH_MeshObj::IsNodePrs() const
{
- return myMesh->NbEdges() == 0 &&myMesh->NbFaces() == 0 &&myMesh->NbVolumes() == 0 ;
+ return myClient->NbEdges() == 0 &&myClient->NbFaces() == 0 && myClient->NbVolumes() == 0 ;
}
@@ -1256,15 +888,3 @@ bool SMESH_subMeshObj::IsNodePrs() const
{
return mySubMeshServer->GetNumberOfElements() == 0;
}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/OBJECT/SMESH_ObjectDef.h b/src/OBJECT/SMESH_ObjectDef.h
index 134b47b10..f45f14a63 100644
--- a/src/OBJECT/SMESH_ObjectDef.h
+++ b/src/OBJECT/SMESH_ObjectDef.h
@@ -29,6 +29,10 @@
#ifndef SMESH_OBJECTDEF_H
#define SMESH_OBJECTDEF_H
+#include "SMESH_Controls.hxx"
+#include "SMESH_Object.h"
+#include "SMESH_Client.hxx"
+
// IDL Headers
#include
#include CORBA_SERVER_HEADER(SMESH_Mesh)
@@ -37,9 +41,6 @@
#include