mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-26 23:00:32 +05:00
SALOME PAL V1_4_1
This commit is contained in:
parent
5980f7c6cc
commit
9313a9353c
8
INSTALL
8
INSTALL
@ -1,6 +1,6 @@
|
||||
This is SMESH V1_4_0
|
||||
This is SMESH V1_4_1
|
||||
|
||||
Compatible with :
|
||||
GEOM V1_4_0
|
||||
KERNEL V1_4_0
|
||||
MED V1_4_0
|
||||
GEOM V1_4_1
|
||||
KERNEL V1_4_1
|
||||
MED V1_4_1
|
||||
|
17
Makefile.in
17
Makefile.in
@ -14,7 +14,7 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
SUBDIRS = idl src
|
||||
SUBDIRS = idl src doc
|
||||
|
||||
RESOURCES_FILES = \
|
||||
delete.png \
|
||||
@ -40,6 +40,8 @@ mesh_hypo_volume.png \
|
||||
mesh_info.png \
|
||||
mesh_init.png \
|
||||
mesh_length.png \
|
||||
mesh_free_edges.png \
|
||||
mesh_multi_edges.png \
|
||||
mesh_line_n.png \
|
||||
mesh_line.png \
|
||||
mesh_move_node.png \
|
||||
@ -71,6 +73,7 @@ mesh_tree_hypo.png \
|
||||
mesh_tree_hypo_segment.png \
|
||||
mesh_tree_hypo_volume.png \
|
||||
mesh_tree_mesh.png \
|
||||
mesh_tree_importedmesh.png \
|
||||
mesh_tree_mesh_warn.png \
|
||||
mesh_triangle_n.png \
|
||||
mesh_triangle.png \
|
||||
@ -78,10 +81,16 @@ mesh_update.png \
|
||||
mesh_vertex_n.png \
|
||||
mesh_vertex.png \
|
||||
mesh_wireframe.png \
|
||||
mesh_points.png \
|
||||
mesh_wrap.png \
|
||||
mesh_tree_group.png \
|
||||
mesh_edit_group.png \
|
||||
mesh_make_group.png \
|
||||
ModuleMesh.png \
|
||||
select1.png \
|
||||
SMESH_en.xml \
|
||||
SMESH.config \
|
||||
StdMeshers.xml \
|
||||
SMESHCatalog.xml \
|
||||
flight_solid.brep
|
||||
|
||||
@ -104,10 +113,10 @@ include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
|
||||
# test if SALOMEconfig.h has changed (contents)
|
||||
salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
|
||||
@if ! [ -a $@ ]; then \
|
||||
cp -p $< $@; \
|
||||
cp -p -f $< $@; \
|
||||
fi; \
|
||||
if ! cmp $< $@; then \
|
||||
cp -p $< $@; \
|
||||
cp -p -f $< $@; \
|
||||
fi; \
|
||||
|
||||
include/salome/sstream: salome_adm/unix/sstream
|
||||
@ -131,7 +140,7 @@ install-include: $(include_list)
|
||||
$(INSTALL) -d $(includedir)
|
||||
@for f in X $(include_list); do \
|
||||
if test $$f != X; then \
|
||||
($(INSTALL_DATA) $$f $(includedir)/. || exit 1); \
|
||||
($(INSTALL_DATA) -p $$f $(includedir)/. || exit 1); \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
@ -45,7 +45,7 @@ if test -f ${MED_DIR}/bin/salome/libMEDMEM_Swig.py ; then
|
||||
AC_SUBST(MED_ROOT_DIR)
|
||||
|
||||
else
|
||||
AC_MSG_WARN("Cannot find compiled Med module distribution")
|
||||
AC_MSG_WARN("Cannot find Med module sources")
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT(for Med: $Med_ok)
|
||||
|
@ -34,6 +34,10 @@ CXX = @CXX@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@
|
||||
|
||||
# BOOST Library
|
||||
|
||||
BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
|
||||
|
||||
# JAVA
|
||||
|
||||
JAVA_INCLUDES = @JAVA_INCLUDES@
|
||||
@ -127,7 +131,8 @@ OMNIORB_CXXFLAGS = @OMNIORB_CXXFLAGS@
|
||||
|
||||
OMNIORB_IDL = @OMNIORB_IDL@
|
||||
OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
|
||||
OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome
|
||||
OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl/salome \
|
||||
-I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome
|
||||
|
||||
OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@
|
||||
OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
|
||||
@ -144,7 +149,8 @@ CORBA_INCLUDES = @CORBA_INCLUDES@
|
||||
CORBA_LIBS = @CORBA_LIBS@
|
||||
CORBA_CXXFLAGS = @CORBA_CXXFLAGS@
|
||||
|
||||
IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome
|
||||
IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl/salome \
|
||||
-I$(KERNEL_ROOT_DIR)/idl/salome -I$(GEOM_ROOT_DIR)/idl/salome -I$(MED_ROOT_DIR)/idl/salome
|
||||
IDLPYFLAGS = @IDLPYFLAGS@
|
||||
|
||||
IDL = @IDL@
|
||||
@ -195,13 +201,13 @@ datadir=@datadir@/salome
|
||||
idldir=$(prefix)/idl/salome
|
||||
sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
|
||||
|
||||
docdir=$(datadir)/doc
|
||||
docdir=${prefix}/doc/salome
|
||||
|
||||
#
|
||||
# begin of package rules
|
||||
#
|
||||
|
||||
.PHONY: all lib bin inc resources tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
|
||||
.PHONY: all lib bin inc resources docs tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
|
||||
|
||||
.SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm
|
||||
|
||||
@ -243,11 +249,7 @@ ac_cxx_namespaces.m4 check_omniorb.m4 pyembed.m4 \
|
||||
ac_cxx_partial_specialization.m4 check_opengl.m4 python.m4 \
|
||||
ac_cxx_typename.m4 check_pthreads.m4 check_cas.m4 \
|
||||
ac_cc_warnings.m4 check_qt.m4 check_med2.m4 \
|
||||
check_swig.m4
|
||||
|
||||
#ifeq (@WITHNETGEN@,yes)
|
||||
# ACLOCAL_SRC += check_Netgen.m4
|
||||
#endif
|
||||
check_swig.m4 check_boost.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
|
||||
|
@ -1,2 +1,2 @@
|
||||
THIS IS SALOME - SMESH VERSION: 1.4.0
|
||||
THIS IS SALOME - SMESH VERSION: 1.4.1
|
||||
|
||||
|
@ -113,6 +113,14 @@ dnl
|
||||
|
||||
AC_CXX_HAVE_SSTREAM
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo BOOST Library
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_BOOST
|
||||
|
||||
dnl
|
||||
dnl ---------------------------------------------
|
||||
dnl testing MPICH
|
||||
@ -273,14 +281,6 @@ echo
|
||||
|
||||
CHECK_MED
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Testing Netgen
|
||||
echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
CHECK_NETGEN
|
||||
|
||||
echo
|
||||
echo ---------------------------------------------
|
||||
echo Summary
|
||||
@ -288,7 +288,7 @@ echo ---------------------------------------------
|
||||
echo
|
||||
|
||||
echo Configure
|
||||
variables="cc_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok Netgen_ok"
|
||||
variables="cc_ok boost_ok lex_yacc_ok python_ok swig_ok threads_ok OpenGL_ok qt_ok vtk_ok hdf5_ok med2_ok omniORB_ok occ_ok doxygen_ok graphviz_ok Kernel_ok Geom_ok Med_ok"
|
||||
|
||||
for var in $variables
|
||||
do
|
||||
@ -318,7 +318,7 @@ else
|
||||
fi
|
||||
|
||||
# make other build directories
|
||||
for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources share/salome/doc idl
|
||||
for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl
|
||||
do
|
||||
# if test ! -d $rep ; then
|
||||
# eval mkdir $rep
|
||||
@ -351,14 +351,15 @@ dnl copy shells and utilities contained in the bin directory
|
||||
dnl excluding .in files (treated in AC-OUTPUT below) and CVS
|
||||
dnl directory
|
||||
|
||||
cd bin
|
||||
mkdir -p bin/salome
|
||||
cd bin/salome
|
||||
for i in $ROOT_SRCDIR/bin/*
|
||||
do
|
||||
local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
|
||||
case "$local_bin" in
|
||||
*.in | *~) ;;
|
||||
./bin/CVS) ;;
|
||||
*) ln -fs $i; echo $local_bin ;;
|
||||
./bin/CVS | ./bin/salome) ;;
|
||||
*) /usr/bin/install -C $i .; echo $local_bin ;;
|
||||
esac
|
||||
done
|
||||
cd $ROOT_BUILDDIR
|
||||
|
@ -11,9 +11,11 @@ top_builddir=..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@
|
||||
|
||||
SUBDIRS=html
|
||||
SUBDIRS= salome
|
||||
|
||||
doc:
|
||||
@COMMENCE@
|
||||
|
||||
docs:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
(cd $$d && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
@ -31,3 +33,8 @@ install:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
(cd $$d && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
|
||||
uninstall:
|
||||
@@SETX@; for d in $(SUBDIRS); do \
|
||||
(cd $$d && $(MAKE) $@) || exit 1; \
|
||||
done
|
||||
|
@ -6,7 +6,7 @@
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
|
||||
VPATH=.:${KERNEL_ROOT_DIR}/idl/salome:${GEOM_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
@ -14,16 +14,21 @@ IDL_FILES = \
|
||||
SMESH_Gen.idl \
|
||||
SMESH_Mesh.idl \
|
||||
SMESH_Hypothesis.idl \
|
||||
SMESH_BasicHypothesis.idl
|
||||
SMESH_BasicHypothesis.idl \
|
||||
SMESH_Filter.idl \
|
||||
SMESH_Group.idl
|
||||
|
||||
PY_CLIENT_IDL = $(IDL_FILES)
|
||||
|
||||
# we copy all idl file in $(top_builddir)/idl
|
||||
inc: $(IDL_FILES:%=$(top_builddir)/idl/%)
|
||||
inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
|
||||
|
||||
$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:%
|
||||
$(top_builddir)/idl/salome:
|
||||
mkdir $@
|
||||
|
||||
$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
|
||||
# $(CP) $< $@
|
||||
cp -f $< $@
|
||||
cp -f $^ $(top_builddir)/idl/salome
|
||||
|
||||
|
||||
lib: pyidl
|
||||
@ -35,7 +40,7 @@ pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
|
||||
$(PYTHON_BUILD_SITE):
|
||||
$(INSTALL) -d $@
|
||||
|
||||
$(PYTHON_BUILD_SITE)/%_idl.py: %.idl
|
||||
$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
|
||||
$(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
|
||||
|
||||
|
||||
@ -43,12 +48,12 @@ $(PYTHON_BUILD_SITE)/%_idl.py: %.idl
|
||||
install: install-pyidl install-idl
|
||||
|
||||
# create directory $(idldir) and copy idl files into it
|
||||
install-idl: $(IDL_FILES)
|
||||
install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
|
||||
$(INSTALL) -d $(idldir)
|
||||
$(INSTALL_DATA) $^ $(idldir)
|
||||
|
||||
|
||||
install-pyidl: $(IDL_FILES)
|
||||
install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
|
||||
$(INSTALL) -d $(PYTHON_SITE_INSTALL)
|
||||
@for file in $^ dummy; do \
|
||||
if [ $$file != "dummy" ]; then \
|
||||
@ -63,6 +68,6 @@ cleandep:
|
||||
|
||||
distclean:
|
||||
-$(RM) *.py
|
||||
-$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%)
|
||||
-$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
|
||||
-$(RM) Makefile
|
||||
|
||||
|
@ -30,67 +30,142 @@
|
||||
#include "SMESH_Hypothesis.idl"
|
||||
|
||||
|
||||
module SMESH
|
||||
/*!
|
||||
* StdMeshers: interfaces to standard hypotheses and algorithms
|
||||
*/
|
||||
module StdMeshers
|
||||
{
|
||||
interface SMESH_LocalLength : SMESH_Hypothesis
|
||||
/*!
|
||||
* StdMeshers_LocalLength: interface of "Average length" hypothesis
|
||||
*/
|
||||
interface StdMeshers_LocalLength : SMESH::SMESH_Hypothesis
|
||||
{
|
||||
/*!
|
||||
* Sets <length> parameter value
|
||||
*/
|
||||
void SetLength(in double length)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Returns <length> parameter value
|
||||
*/
|
||||
double GetLength();
|
||||
};
|
||||
|
||||
interface SMESH_NumberOfSegments : SMESH_Hypothesis
|
||||
/*!
|
||||
* StdMeshers_NumberOfSegments: interface of "Nb. Segments" hypothesis
|
||||
*/
|
||||
interface StdMeshers_NumberOfSegments : SMESH::SMESH_Hypothesis
|
||||
{
|
||||
/*!
|
||||
* Sets <number of segments> parameter value
|
||||
*/
|
||||
void SetNumberOfSegments(in long segmentsNumber)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Returns <number of segments> parameter value
|
||||
*/
|
||||
long GetNumberOfSegments();
|
||||
|
||||
/*!
|
||||
* Sets <scale factor> parameter value
|
||||
*/
|
||||
void SetScaleFactor(in double scaleFactor)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Returns <scale factor> parameter value
|
||||
*/
|
||||
double GetScaleFactor();
|
||||
};
|
||||
|
||||
interface SMESH_MaxElementArea : SMESH_Hypothesis
|
||||
/*!
|
||||
* StdMeshers_MaxElementArea: interface of "Max. Triangle Area" hypothesis
|
||||
*/
|
||||
interface StdMeshers_MaxElementArea : SMESH::SMESH_Hypothesis
|
||||
{
|
||||
/*!
|
||||
* Sets <maximum element area> parameter value
|
||||
*/
|
||||
void SetMaxElementArea(in double area)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Returns <maximum element area> parameter value
|
||||
*/
|
||||
double GetMaxElementArea();
|
||||
};
|
||||
|
||||
interface SMESH_LengthFromEdges : SMESH_Hypothesis
|
||||
/*!
|
||||
* StdMeshers_LengthFromEdges: interface of "Length From Edges (2D Hyp. for Triangulator)" hypothesis
|
||||
*/
|
||||
interface StdMeshers_LengthFromEdges : SMESH::SMESH_Hypothesis
|
||||
{
|
||||
/*!
|
||||
* Sets <mode> parameter value
|
||||
*/
|
||||
void SetMode(in long mode)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Returns <mode> parameter value
|
||||
*/
|
||||
long GetMode();
|
||||
};
|
||||
|
||||
interface SMESH_MaxElementVolume : SMESH_Hypothesis
|
||||
/*!
|
||||
* StdMeshers_MaxElementVolume: interface of "Max. Hexahedron or Tetrahedron Volume" hypothesis
|
||||
*/
|
||||
interface StdMeshers_MaxElementVolume : SMESH::SMESH_Hypothesis
|
||||
{
|
||||
/*!
|
||||
* Sets <maximum element volume> parameter value
|
||||
*/
|
||||
void SetMaxElementVolume(in double volume)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Returns <maximum element volume> parameter value
|
||||
*/
|
||||
double GetMaxElementVolume();
|
||||
};
|
||||
|
||||
interface SMESH_Regular_1D : SMESH_1D_Algo
|
||||
/*!
|
||||
* StdMeshers_NotConformAllowed: interface of "Not Conform Mesh Allowed" hypothesis.
|
||||
* Presence of this hypothesis permits to algorithm generation of not conform mesh.
|
||||
*/
|
||||
interface StdMeshers_NotConformAllowed : SMESH::SMESH_Hypothesis
|
||||
{
|
||||
};
|
||||
|
||||
interface SMESH_MEFISTO_2D : SMESH_2D_Algo
|
||||
/*!
|
||||
* StdMeshers_Regular_1D: interface of "Wire discretisation" algorithm
|
||||
*/
|
||||
interface StdMeshers_Regular_1D : SMESH::SMESH_1D_Algo
|
||||
{
|
||||
};
|
||||
|
||||
interface SMESH_Quadrangle_2D : SMESH_2D_Algo
|
||||
/*!
|
||||
* StdMeshers_MEFISTO_2D: interface of "Triangle (Mefisto)" algorithm
|
||||
*/
|
||||
interface StdMeshers_MEFISTO_2D : SMESH::SMESH_2D_Algo
|
||||
{
|
||||
};
|
||||
|
||||
interface SMESH_Hexa_3D : SMESH_3D_Algo
|
||||
/*!
|
||||
* StdMeshers_Quadrangle_2D: interface of "Quadrangle (Mapping)" algorithm
|
||||
*/
|
||||
interface StdMeshers_Quadrangle_2D : SMESH::SMESH_2D_Algo
|
||||
{
|
||||
};
|
||||
|
||||
#ifdef HAVE_NETGEN
|
||||
interface SMESH_NETGEN_3D : SMESH_3D_Algo
|
||||
/*!
|
||||
* StdMeshers_Hexa_3D: interface of "Hexahedron (i,j,k)" algorithm
|
||||
*/
|
||||
interface StdMeshers_Hexa_3D : SMESH::SMESH_3D_Algo
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@ -39,18 +39,34 @@
|
||||
module SMESH
|
||||
{
|
||||
typedef sequence<GEOM::GEOM_Shape> shape_array;
|
||||
typedef sequence<SMESH_Mesh> mesh_array;
|
||||
|
||||
interface FilterManager;
|
||||
|
||||
interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
|
||||
{
|
||||
|
||||
FilterManager CreateFilterManager();
|
||||
|
||||
/*!
|
||||
* Create an hypothesis that can be shared by differents parts of the mesh.
|
||||
Set the current study
|
||||
*/
|
||||
void SetCurrentStudy( in SALOMEDS::Study theStudy );
|
||||
|
||||
/*!
|
||||
Get the current study
|
||||
*/
|
||||
SALOMEDS::Study GetCurrentStudy();
|
||||
|
||||
/*!
|
||||
* Create a hypothesis that can be shared by differents parts of the mesh.
|
||||
* An hypothesis is either:
|
||||
* - a method used to generate or modify a part of the mesh (algorithm).
|
||||
* - a parameter or a law used by an algorithm.
|
||||
* Algorithms are 1D, 2D or 3D.
|
||||
*/
|
||||
SMESH_Hypothesis CreateHypothesis( in string anHyp,
|
||||
in long studyId)
|
||||
SMESH_Hypothesis CreateHypothesis( in string theHypName,
|
||||
in string theLibName )
|
||||
raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
@ -60,16 +76,20 @@ module SMESH
|
||||
* of TopoDS_Shapes and bind CORBA references of shape & subshapes
|
||||
* with TopoDS_Shapes
|
||||
*/
|
||||
SMESH_Mesh Init(in GEOM::GEOM_Gen geomEngine,
|
||||
in long studyId,
|
||||
in GEOM::GEOM_Shape aShape)
|
||||
SMESH_Mesh CreateMesh( in GEOM::GEOM_Shape theShape )
|
||||
raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
* Create Mesh object(s) importing data from given MED file
|
||||
*/
|
||||
mesh_array CreateMeshesFromMED( in string theFileName,
|
||||
out SMESH::DriverMED_ReadStatus theStatus )
|
||||
raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
* Create a Mesh object, without a geometry shape reference
|
||||
*/
|
||||
// SMESH_Mesh NewEmpty(in GEOM::GEOM_Gen geomEngine,
|
||||
// in long studyId)
|
||||
// SMESH_Mesh NewEmpty()
|
||||
// raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
@ -77,31 +97,29 @@ module SMESH
|
||||
* First, verify list of hypothesis associated with the subShape,
|
||||
* return NOK if hypothesis are not sufficient
|
||||
*/
|
||||
boolean Compute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape)
|
||||
boolean Compute( in SMESH_Mesh theMesh,
|
||||
in GEOM::GEOM_Shape theSubShape )
|
||||
raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
|
||||
boolean IsReadyToCompute(in SMESH_Mesh aMesh, in GEOM::GEOM_Shape aSubShape)
|
||||
boolean IsReadyToCompute( in SMESH_Mesh theMesh,
|
||||
in GEOM::GEOM_Shape theSubShape )
|
||||
raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
long_array GetSubShapesId(in GEOM::GEOM_Gen geomEngine,
|
||||
in long studyId,
|
||||
in GEOM::GEOM_Shape mainShape,
|
||||
in shape_array listOfSubShape)
|
||||
long_array GetSubShapesId( in GEOM::GEOM_Shape theMainShape,
|
||||
in shape_array theListOfSubShape )
|
||||
raises ( SALOME::SALOME_Exception );
|
||||
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
// long_array GetSubMeshesState(in GEOM::GEOM_Gen geomEngine,
|
||||
// in long studyId,
|
||||
// in shape_array listOfSubShape)
|
||||
// long_array GetSubMeshesState( in shape_array theListOfSubShape )
|
||||
// raises ( SALOME::SALOME_Exception );
|
||||
|
||||
|
||||
|
@ -27,27 +27,30 @@
|
||||
#define _SMESH_HYPOTHESIS_IDL_
|
||||
|
||||
#include "SALOME_Exception.idl"
|
||||
#include "SALOME_GenericObj.idl"
|
||||
|
||||
module SMESH
|
||||
{
|
||||
interface SMESH_Hypothesis;
|
||||
|
||||
typedef sequence<SMESH_Hypothesis> ListOfHypothesis;
|
||||
typedef sequence<string> ListOfHypothesisName;
|
||||
|
||||
interface SMESH_Hypothesis
|
||||
interface SMESH_Hypothesis : SALOME::GenericObj
|
||||
{
|
||||
/*!
|
||||
* Get the Hypothesis typeName
|
||||
*/
|
||||
string GetName();
|
||||
|
||||
/*!
|
||||
* Get the Hypothesis plugin library Name
|
||||
*/
|
||||
string GetLibName();
|
||||
|
||||
/*!
|
||||
* Get the internal Id
|
||||
*/
|
||||
long GetId();
|
||||
};
|
||||
|
||||
typedef sequence<string> ListOfHypothesisName;
|
||||
|
||||
interface SMESH_Algo : SMESH_Hypothesis
|
||||
{
|
||||
/*!
|
||||
|
@ -27,13 +27,30 @@
|
||||
#define _SMESH_MESH_IDL_
|
||||
|
||||
#include "SALOME_Exception.idl"
|
||||
#include "SMESH_Hypothesis.idl"
|
||||
//#include "SMESH_Hypothesis.idl"
|
||||
|
||||
#include "SALOME_GenericObj.idl"
|
||||
//#include "GEOM_Shape.idl"
|
||||
//#include "MED.idl"
|
||||
|
||||
module GEOM
|
||||
{
|
||||
interface GEOM_Shape;
|
||||
};
|
||||
|
||||
|
||||
module SALOME_MED
|
||||
{
|
||||
interface MESH;
|
||||
interface FAMILY;
|
||||
};
|
||||
|
||||
#include "GEOM_Shape.idl"
|
||||
#include "MED.idl"
|
||||
|
||||
module SMESH
|
||||
{
|
||||
interface SMESH_Hypothesis;
|
||||
typedef sequence<SMESH_Hypothesis> ListOfHypothesis;
|
||||
|
||||
typedef sequence<double> double_array ;
|
||||
typedef sequence<long> long_array ;
|
||||
typedef sequence<string> string_array ;
|
||||
@ -60,11 +77,55 @@ module SMESH
|
||||
long_array indexes;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* Enumeration for element type, like in SMDS
|
||||
*/
|
||||
enum ElementType
|
||||
{
|
||||
ALL,
|
||||
NODE,
|
||||
EDGE,
|
||||
FACE,
|
||||
VOLUME
|
||||
};
|
||||
|
||||
/*!
|
||||
* Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods)
|
||||
*/
|
||||
enum Hypothesis_Status // in the order of severity
|
||||
{
|
||||
HYP_OK,
|
||||
HYP_MISSING, // algo misses a hypothesis
|
||||
HYP_CONCURENT, // several applicable hypotheses
|
||||
HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
|
||||
HYP_UNKNOWN_FATAL,// --- all statuses below should be considered as fatal
|
||||
// for Add/RemoveHypothesis operations
|
||||
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
|
||||
};
|
||||
|
||||
/*!
|
||||
* Enumeration for DriverMED read status (used by ImportMEDFile() method)
|
||||
*/
|
||||
enum DriverMED_ReadStatus // in the order of severity
|
||||
{
|
||||
DRS_OK,
|
||||
DRS_EMPTY, // a MED file contains no mesh with the given name
|
||||
DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers,
|
||||
// so the numbers from the file are ignored
|
||||
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
||||
DRS_FAIL // general failure (exception etc.)
|
||||
};
|
||||
|
||||
typedef sequence<log_block> log_array;
|
||||
|
||||
interface SMESH_Group;
|
||||
interface SMESH_subMesh;
|
||||
interface SMESH_MeshEditor;
|
||||
interface SMESH_Mesh
|
||||
interface SMESH_Mesh : SALOME::GenericObj
|
||||
{
|
||||
/*!
|
||||
* Associate a Shape to a Mesh created with NewEmpty
|
||||
@ -79,7 +140,7 @@ module SMESH
|
||||
* SubMesh will be used instead of SubShape in a next idl version to
|
||||
* adress a specific subMesh...
|
||||
*/
|
||||
SMESH_subMesh GetElementsOnShape(in GEOM::GEOM_Shape aSubShape)
|
||||
SMESH_subMesh GetSubMesh(in GEOM::GEOM_Shape aSubShape, in string name)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
@ -88,6 +149,25 @@ module SMESH
|
||||
// SMESH_subMesh NewEmpty()
|
||||
// raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Remove a submesh
|
||||
*/
|
||||
void RemoveSubMesh(in SMESH_subMesh aSubMesh)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Create a group
|
||||
*/
|
||||
SMESH_Group CreateGroup( in ElementType elem_type,
|
||||
in string name )
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Remove a group
|
||||
*/
|
||||
void RemoveGroup(in SMESH_Group aGroup)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
* Add hypothesis to the mesh, under a particular subShape
|
||||
* (or the main shape itself)
|
||||
@ -105,7 +185,8 @@ module SMESH
|
||||
* (or one previous hypothesis on the subShape)
|
||||
* raises exception if hypothesis has not been created
|
||||
*/
|
||||
boolean AddHypothesis(in GEOM::GEOM_Shape aSubShape, in SMESH_Hypothesis anHyp)
|
||||
Hypothesis_Status AddHypothesis(in GEOM::GEOM_Shape aSubShape,
|
||||
in SMESH_Hypothesis anHyp)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
// boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
|
||||
// raises (SALOME::SALOME_Exception);
|
||||
@ -114,7 +195,7 @@ module SMESH
|
||||
/*!
|
||||
* Remove an hypothesis previouly added with AddHypothesis.
|
||||
*/
|
||||
boolean RemoveHypothesis(in GEOM::GEOM_Shape aSubShape,
|
||||
Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Shape aSubShape,
|
||||
in SMESH_Hypothesis anHyp)
|
||||
raises (SALOME::SALOME_Exception);
|
||||
// boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
|
||||
@ -165,7 +246,7 @@ module SMESH
|
||||
*/
|
||||
void ExportDAT( in string file )
|
||||
raises (SALOME::SALOME_Exception);
|
||||
void ExportMED( in string file )
|
||||
void ExportMED( in string file, in boolean auto_groups )
|
||||
raises (SALOME::SALOME_Exception);
|
||||
void ExportUNV( in string file )
|
||||
raises (SALOME::SALOME_Exception);
|
||||
@ -200,11 +281,19 @@ module SMESH
|
||||
long NbHexas()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long NbPyramids()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long NbPrisms()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
long NbSubMesh()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
string Dump();
|
||||
};
|
||||
|
||||
interface SMESH_subMesh
|
||||
interface SMESH_subMesh : SALOME::GenericObj
|
||||
{
|
||||
/*!
|
||||
*
|
||||
@ -224,6 +313,12 @@ module SMESH
|
||||
long_array GetElementsId()
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
long_array GetElementsByType( in ElementType theType )
|
||||
raises (SALOME::SALOME_Exception);
|
||||
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
|
@ -17,7 +17,7 @@
|
||||
<submenu label-id="Import" item-id="11" pos-id="8">
|
||||
<popup-item item-id="111" pos-id="" label-id="DAT file" icon-id="" tooltip-id="" accel-id="Ctrl+B" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="112" pos-id="" label-id="UNV File" icon-id="" tooltip-id="" accel-id="Ctrl+I" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="113" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="113" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="Ctrl+M" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<submenu label-id="Export" item-id="12" pos-id="9">
|
||||
@ -37,34 +37,31 @@
|
||||
|
||||
<!-- ************************** Hypothesis (menubar) ************************************ -->
|
||||
<menu-item label-id="Hypotheses" item-id="50" pos-id="3">
|
||||
<popup-item item-id="5030" pos-id="" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5031" pos-id="" label-id="Nb. Segments" icon-id="mesh_hypo_segment.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5032" pos-id="" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5033" pos-id="" label-id="Max. Hexahedron or Tetrahedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5034" pos-id="" label-id="Length From Edges (2D Hyp. for Triangulator)" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="5000" pos-id="" label-id="Wire discretisation" icon-id="mesh_algo_regular.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5010" pos-id="" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5011" pos-id="" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5020" pos-id="" label-id="Hexahedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5021" pos-id="" label-id="Tetrahedron (Netgen)" icon-id="mesh_algo_tetra.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5000" pos-id="" label-id="Create Hypotheses" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5010" pos-id="" label-id="Create Algorithms" icon-id="mesh_algo_mefisto.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ************************** Mesh (menubar) ************************************ -->
|
||||
<menu-item label-id="Mesh" item-id="70" pos-id="4">
|
||||
<popup-item item-id="703" pos-id="" label-id="Global Hyp." icon-id="mesh_init.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="702" pos-id="" label-id="Local Hyp." icon-id="mesh_add_sub.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="704" pos-id="" label-id="Edit Hyp." icon-id="mesh_edit.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="703" pos-id="" label-id="Global Hypothesis" icon-id="mesh_init.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="702" pos-id="" label-id="Local Hypothesis" icon-id="mesh_add_sub.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="704" pos-id="" label-id="Edit Hypothesis" icon-id="mesh_edit.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="801" pos-id="" label-id="Create Group" icon-id="mesh_tree_group.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="802" pos-id="" label-id="Construct Group" icon-id="mesh_make_group.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="803" pos-id="" label-id="Edit Group" icon-id="mesh_edit_group.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Mesh Infos" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ************************** Control (menubar) ************************************ -->
|
||||
<menu-item label-id="Controls" item-id="60" pos-id="5">
|
||||
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6002" pos-id="" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<!-- popup-item item-id="6002" pos-id="" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/ -->
|
||||
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
@ -90,30 +87,28 @@
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="405" pos-id="" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="806" pos-id="" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="807" pos-id="" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ************************** Numbering (menubar) ************************************ -->
|
||||
<menu-item label-id="Numbering" item-id="80" pos-id="7">
|
||||
<popup-item item-id="9010" pos-id="" label-id="Display Nodes #" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="9011" pos-id="" label-id="Display Elements #" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="406" pos-id="" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="407" pos-id="" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ********************************* Settings (menubar) ********************************* -->
|
||||
<menu-item label-id="Preferences" item-id="4" pos-id="">
|
||||
<submenu label-id="Mesh" item-id="100" pos-id="-1">
|
||||
<submenu label-id="Display Mode" item-id="1000" pos-id="">
|
||||
<popup-item item-id="10001" pos-id="" label-id="Wireframe" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="10002" pos-id="" label-id="Shading" icon-id="" tooltip-id=""accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="10003" pos-id="" label-id="Shrink" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="10001" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<popup-item item-id="10002" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id=""accel-id="" toggle-id="true" execute-action=""/>
|
||||
<popup-item item-id="10004" pos-id="" label-id="Nodes" icon-id="mesh_points.png" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="10003" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="1001" pos-id="" label-id="Automatic Update" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1003" pos-id="" label-id="Colors - Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1003" pos-id="" label-id="Colors / Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1005" pos-id="" label-id="Scalars Bar" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1005" pos-id="" label-id="Scalar Bar" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1006" pos-id="" label-id="Selection" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id="-1"/>
|
||||
@ -121,12 +116,6 @@
|
||||
|
||||
<!-- ********************************* View (menubar) ********************************* -->
|
||||
<menu-item label-id="View" item-id="2" pos-id="">
|
||||
<submenu label-id="Display Mode" item-id="21" pos-id="">
|
||||
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
@ -134,83 +123,210 @@
|
||||
<!-- ################################# POPUP MENU ################################# -->
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Mesh">
|
||||
<popup-item item-id="705" pos-id="" label-id="Edit Global Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="705" pos-id="" label-id="Edit Global Hypothesis" icon-id="mesh_edit.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Show Info" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="801" pos-id="" label-id="Create Group" icon-id="mesh_tree_group.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="122" pos-id="" label-id="Export to MED" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="SubMesh">
|
||||
<popup-item item-id="706" pos-id="" label-id="Edit Local Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="706" pos-id="" label-id="Edit Local Hypothesis" icon-id="mesh_edit.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Show Info" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="802" pos-id="" label-id="Construct Group" icon-id="mesh_make_group.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="33" pos-id="" label-id="Delete" icon-id="delete.png" tooltip-id="" accel-id="" toggle-id="" execute-action="" />
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Group">
|
||||
<popup-item item-id="803" pos-id="" label-id="Edit" icon-id="mesh_edit_group.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Show Info" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="33" pos-id="" label-id="Delete" icon-id="delete.png" tooltip-id="" accel-id="" toggle-id="" execute-action="" />
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Hypothesis">
|
||||
<popup-item item-id="1100" pos-id="" label-id="Edit" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1102" pos-id="" label-id="Unassign Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Algorithm">
|
||||
<popup-item item-id="1102" pos-id="" label-id="Unassign Algo." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1102" pos-id="" label-id="Unassign Hypothesis" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Algorithm">
|
||||
<popup-item item-id="1102" pos-id="" label-id="Unassign Algorithm" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
|
||||
<popupmenu label-id="Popup for Viewer" context-id="" parent-id="Viewer" object-id="Mesh">
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Show Info" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Numbering" item-id="114" pos-id="">
|
||||
<popup-item item-id="9010" pos-id="" label-id="Display Nodes #" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="9011" pos-id="" label-id="Display Elements #" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Properties" item-id="113" pos-id="">
|
||||
<submenu label-id="Display Mode" item-id="1131" pos-id="">
|
||||
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="215" pos-id="" label-id="Nodes" icon-id="mesh_points.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="1132" pos-id="" label-id="Colors / Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1133" pos-id="" label-id="Transparency" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Control" item-id="2000" pos-id="">
|
||||
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<!-- popup-item item-id="6002" pos-id="" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/ -->
|
||||
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6014" pos-id="" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6015" pos-id="" label-id="Warp" icon-id="mesh_wrap.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6016" pos-id="" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="200" pos-id="" label-id="Reset" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="201" pos-id="" label-id="Scalar Bar Properties" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1132" pos-id="" label-id="Colors - Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1133" pos-id="" label-id="Transparency" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="ScalarBar" context-id="" parent-id="Viewer" object-id="ScalarBar">
|
||||
<popup-item item-id="200" pos-id="" label-id="Erase" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="201" pos-id="" label-id="Edit" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="202" pos-id="" label-id="Update View" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popupmenu label-id="Popup for Viewer" context-id="" parent-id="Viewer" object-id="SubMesh">
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Show Info" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Numbering" item-id="114" pos-id="">
|
||||
<popup-item item-id="9010" pos-id="" label-id="Display Nodes #" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="9011" pos-id="" label-id="Display Elements #" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Display Mode" item-id="1131" pos-id="">
|
||||
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="215" pos-id="" label-id="Nodes" icon-id="mesh_points.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="1132" pos-id="" label-id="Colors / Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1133" pos-id="" label-id="Transparency" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Control" item-id="2000" pos-id="">
|
||||
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<!-- popup-item item-id="6002" pos-id="" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/ -->
|
||||
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6014" pos-id="" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6015" pos-id="" label-id="Warp" icon-id="mesh_wrap.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6016" pos-id="" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="200" pos-id="" label-id="Reset" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="201" pos-id="" label-id="Scalar Bar Properties" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for Viewer" context-id="" parent-id="Viewer" object-id="Group">
|
||||
<popup-item item-id="803" pos-id="" label-id="Edit" icon-id="mesh_edit_group.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Show Info" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Numbering" item-id="114" pos-id="">
|
||||
<popup-item item-id="9010" pos-id="" label-id="Display Nodes #" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="9011" pos-id="" label-id="Display Elements #" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Display Mode" item-id="1131" pos-id="">
|
||||
<popup-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id=""accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="215" pos-id="" label-id="Nodes" icon-id="mesh_points.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="1132" pos-id="" label-id="Colors / Size" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1133" pos-id="" label-id="Transparency" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<submenu label-id="Control" item-id="2000" pos-id="">
|
||||
<popup-item item-id="6001" pos-id="" label-id="Length" icon-id="mesh_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6003" pos-id="" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6004" pos-id="" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<!-- popup-item item-id="6002" pos-id="" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/ -->
|
||||
<popup-item item-id="6011" pos-id="" label-id="Area" icon-id="mesh_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6012" pos-id="" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6013" pos-id="" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6014" pos-id="" label-id="Minimum angle" icon-id="mesh_angle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6015" pos-id="" label-id="Warp" icon-id="mesh_wrap.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="6016" pos-id="" label-id="Skew" icon-id="mesh_skew.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="200" pos-id="" label-id="Reset" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="201" pos-id="" label-id="Scalar Bar Properties" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<separator pos-id=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Elements" context-id="" parent-id="Viewer" object-id="Elements">
|
||||
<popup-item item-id="804" pos-id="" label-id="Add" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="805" pos-id="" label-id="Remove" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
</menubar>
|
||||
|
||||
<!-- ///////////////////////////////////// TOOLBARS ////////////////////////////////////// -->
|
||||
<toolbar label-id="Mesh Toolbar">
|
||||
<toolbutton-item item-id="703" pos-id="" label-id="Init" icon-id="mesh_init.png" tooltip-id="Global Hyp." accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="702" pos-id="" label-id="Add SubMesh" icon-id="mesh_add_sub.png" tooltip-id="Local Hyp." accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="704" pos-id="" label-id="Edit" icon-id="mesh_edit.png" tooltip-id="Edit Hyp." accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="703" pos-id="" label-id="Init" icon-id="mesh_init.png" tooltip-id="Global Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="702" pos-id="" label-id="Add SubMesh" icon-id="mesh_add_sub.png" tooltip-id="Local Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="704" pos-id="" label-id="Edit" icon-id="mesh_edit.png" tooltip-id="Edit Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="Compute" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="801" pos-id="" label-id="Create Group" icon-id="mesh_tree_group.png" tooltip-id="Create Group" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="802" pos-id="" label-id="Construct Group" icon-id="mesh_make_group.png" tooltip-id="Construct Group" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="803" pos-id="" label-id="Edit Group" icon-id="mesh_edit_group.png" tooltip-id="Edit Group" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="900" pos-id="" label-id="Mesh Infos" icon-id="mesh_info.png" tooltip-id="Mesh Infos" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Hypotheses Toolbar">
|
||||
<toolbutton-item item-id="5030" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="Avreage length Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5031" label-id="Segments" icon-id="mesh_hypo_segment.png" tooltip-id="Nb. Segments Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5032" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="Max. Triangle Area Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5033" label-id="Max. Hexahedron or Tetrahedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="Max. Hexahedron or Tetrahedron Volume Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5034" label-id="Length From Edges (2D Hyp. for Triangulator)" icon-id="mesh_hypo_length.png" tooltip-id="Length From Edges Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="5000" label-id="Wire Discretisation" icon-id="mesh_algo_regular.png" tooltip-id="Wire Discratisation Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5010" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="Triangle (Mefisto) Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5011" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="Quadrangle (Mapping) Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5020" label-id="Hexahedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="Hexahedron (i,j,k) Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5021" label-id="Tetrahedron (Netgen)" icon-id="mesh_algo_hexa.png" tooltip-id="Tetrahedron (Netgen) Delaunay Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5000" label-id="Create Hypotheses" icon-id="mesh_hypo_length.png" tooltip-id="Create Hypotheses" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5010" label-id="Create Algorithms" icon-id="mesh_algo_mefisto.png" tooltip-id="Create Algorithms" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Controls toolbar">
|
||||
<toolbutton-item item-id="6001" label-id="Length" icon-id="mesh_length.png" tooltip-id="Length" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="6002" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="Connectivity" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="6003" label-id="Free borders" icon-id="mesh_free_edges.png" tooltip-id="Free borders" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="6004" label-id="Borders at multi-connection" icon-id="mesh_multi_edges.png" tooltip-id="Borders at multi-connection" accel-id="" toggle-id="" execute-action=""/>
|
||||
<!--<toolbutton-item item-id="6002" label-id="Connectivity" icon-id="mesh_connectivity.png" tooltip-id="Connectivity" accel-id="" toggle-id="" execute-action=""/>-->
|
||||
<toolbutton-item item-id="6011" label-id="Area" icon-id="mesh_area.png" tooltip-id="Area" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="6012" label-id="Taper" icon-id="mesh_taper.png" tooltip-id="Taper" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="6013" label-id="Aspect Ratio" icon-id="mesh_aspect.png" tooltip-id="Aspect Ratio" accel-id="" toggle-id="" execute-action=""/>
|
||||
@ -233,16 +349,12 @@
|
||||
|
||||
<toolbar label-id="Modification toolbar">
|
||||
<toolbutton-item item-id="405" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="Move Node" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="806" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="Orientation" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="807" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="Diagonal Inversion" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="406" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="Orientation" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="407" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="Diagonal Inversion" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Display Mode Toolbar">
|
||||
<toolbutton-item item-id="214" pos-id="" label-id="Update" icon-id="mesh_update.png" tooltip-id="Update View" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="211" pos-id="" label-id="Wireframe" icon-id="mesh_wireframe.png" tooltip-id="Wireframe" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="212" pos-id="" label-id="Shading" icon-id="mesh_shading.png" tooltip-id="shading" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="213" pos-id="" label-id="Shrink" icon-id="mesh_shrink.png" tooltip-id="shrink" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
</desktop>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<submenu label-id="Import" item-id="11" pos-id="8">
|
||||
<popup-item item-id="111" pos-id="" label-id="DAT file" icon-id="" tooltip-id="" accel-id="Ctrl+B" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="112" pos-id="" label-id="UNV File" icon-id="" tooltip-id="" accel-id="Ctrl+I" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="113" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="113" pos-id="" label-id="MED File" icon-id="" tooltip-id="" accel-id="Ctrl+M" toggle-id="" execute-action=""/>
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<submenu label-id="Export" item-id="12" pos-id="9">
|
||||
@ -37,17 +37,8 @@
|
||||
|
||||
<!-- ************************** Hypothesis (menubar) ************************************ -->
|
||||
<menu-item label-id="Hypotheses" item-id="50" pos-id="3">
|
||||
<popup-item item-id="5030" pos-id="" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5031" pos-id="" label-id="Nb. Segments" icon-id="mesh_hypo_segment.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5032" pos-id="" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5033" pos-id="" label-id="Max. Hexahedron or Tetrahedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5034" pos-id="" label-id="Length From Edges (2D Hyp. for Triangulator)" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="5000" pos-id="" label-id="Wire discretisation" icon-id="mesh_algo_regular.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5010" pos-id="" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5011" pos-id="" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5020" pos-id="" label-id="Hexahedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5021" pos-id="" label-id="Tetrahedron (Netgen)" icon-id="mesh_algo_tetra.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5000" pos-id="" label-id="Create Hypothesis" icon-id="mesh_hypo_length.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="5010" pos-id="" label-id="Create Algorithm" icon-id="mesh_algo_mefisto.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ************************** Mesh (menubar) ************************************ -->
|
||||
@ -58,6 +49,8 @@
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="mesh_compute.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="801" pos-id="" label-id="Create Group" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="900" pos-id="" label-id="Mesh Infos" icon-id="mesh_info.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
@ -90,8 +83,8 @@
|
||||
</submenu>
|
||||
<endsubmenu />
|
||||
<popup-item item-id="405" pos-id="" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="806" pos-id="" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="807" pos-id="" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="406" pos-id="" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="407" pos-id="" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</menu-item>
|
||||
|
||||
<!-- ************************** Numbering (menubar) ************************************ -->
|
||||
@ -139,11 +132,15 @@
|
||||
<popup-item item-id="701" pos-id="" label-id="Compute" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="801" pos-id="" label-id="Create Group" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="SubMesh">
|
||||
<popup-item item-id="706" pos-id="" label-id="Edit Local Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
<popup-item item-id="802" pos-id="" label-id="Construct Group" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Hypothesis">
|
||||
@ -151,13 +148,13 @@
|
||||
<popup-item item-id="1102" pos-id="" label-id="Unassign Hyp." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
<popupmenu label-id="Popup for ObjectBrowser" context-id="" parent-id="ObjectBrowser" object-id="Algorithm">
|
||||
<popup-item item-id="1102" pos-id="" label-id="Unassign Algo." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<popup-item item-id="1101" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
</popupmenu>
|
||||
|
||||
|
||||
|
||||
<popupmenu label-id="Popup for Viewer" context-id="" parent-id="Viewer" object-id="Mesh">
|
||||
<popup-item item-id="214" pos-id="" label-id="Update" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separator pos-id=""/>
|
||||
@ -195,17 +192,8 @@
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Hypotheses Toolbar">
|
||||
<toolbutton-item item-id="5030" label-id="Average length" icon-id="mesh_hypo_length.png" tooltip-id="Avreage length Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5031" label-id="Segments" icon-id="mesh_hypo_segment.png" tooltip-id="Nb. Segments Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5032" label-id="Max. Triangle Area" icon-id="mesh_hypo_area.png" tooltip-id="Max. Triangle Area Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5033" label-id="Max. Hexahedron or Tetrahedron Volume" icon-id="mesh_hypo_volume.png" tooltip-id="Max. Hexahedron or Tetrahedron Volume Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5034" label-id="Length From Edges (2D Hyp. for Triangulator)" icon-id="mesh_hypo_length.png" tooltip-id="Length From Edges Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<separatorTB/>
|
||||
<toolbutton-item item-id="5000" label-id="Wire Discretisation" icon-id="mesh_algo_regular.png" tooltip-id="Wire Discratisation Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5010" label-id="Triangle (Mefisto)" icon-id="mesh_algo_mefisto.png" tooltip-id="Triangle (Mefisto) Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5011" label-id="Quadrangle (Mapping)" icon-id="mesh_algo_quad.png" tooltip-id="Quadrangle (Mapping) Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5020" label-id="Hexahedron (i,j,k)" icon-id="mesh_algo_hexa.png" tooltip-id="Hexahedron (i,j,k) Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5021" label-id="Tetrahedron (Netgen)" icon-id="mesh_algo_hexa.png" tooltip-id="Tetrahedron (Netgen) Delaunay Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5000" label-id="Create Hypothesis" icon-id="mesh_hypo_length.png" tooltip-id="Create Hypothesis" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="5010" label-id="Create Algorithm" icon-id="mesh_algo_mefisto.png" tooltip-id="Create Algorithm" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Controls toolbar">
|
||||
@ -233,8 +221,8 @@
|
||||
|
||||
<toolbar label-id="Modification toolbar">
|
||||
<toolbutton-item item-id="405" label-id="Move Node" icon-id="mesh_move_node.png" tooltip-id="Move Node" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="806" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="Orientation" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="807" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="Diagonal Inversion" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="406" label-id="Orientation" icon-id="mesh_orientation.png" tooltip-id="Orientation" accel-id="" toggle-id="" execute-action=""/>
|
||||
<toolbutton-item item-id="407" label-id="Diagonal Inversion" icon-id="mesh_diagonal.png" tooltip-id="Diagonal Inversion" accel-id="" toggle-id="" execute-action=""/>
|
||||
</toolbar>
|
||||
|
||||
<toolbar label-id="Display Mode Toolbar">
|
||||
|
@ -46,7 +46,7 @@ LIB_CLIENT_IDL =
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += $(OCC_CXXFLAGS) $(MED2_INCLUDES) -rdynamic -ldl -I${KERNEL_ROOT_DIR}/include/salome
|
||||
|
||||
LDFLAGS += $(MED2_LIBS) -lSMESHDS -lSMDS
|
||||
|
@ -111,7 +111,7 @@ void DriverDAT_W_SMDS_Mesh::Write()
|
||||
fprintf(stdout, "(* NOEUDS DU MAILLAGE : *)\n");
|
||||
fprintf(stdout, "(************************)\n");
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * itNodes=myMesh->nodesIterator();
|
||||
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
|
||||
while(itNodes->more())
|
||||
{
|
||||
const SMDS_MeshNode * node = itNodes->next();
|
||||
@ -127,7 +127,7 @@ void DriverDAT_W_SMDS_Mesh::Write()
|
||||
fprintf(stdout, "(**************************)");
|
||||
/* Ecriture des connectivites, noms, numeros des mailles */
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshEdge *> * itEdges=myMesh->edgesIterator();
|
||||
SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
|
||||
while(itEdges->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itEdges->next();
|
||||
@ -146,13 +146,13 @@ void DriverDAT_W_SMDS_Mesh::Write()
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * it=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr it=elem->nodesIterator();
|
||||
while(it->more()) fprintf(myFileId, "%d ", it->next()->GetID());
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshFace *> * itFaces=myMesh->facesIterator();
|
||||
SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
|
||||
while(itFaces->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itFaces->next();
|
||||
@ -176,13 +176,13 @@ void DriverDAT_W_SMDS_Mesh::Write()
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * it=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr it=elem->nodesIterator();
|
||||
while(it->more()) fprintf(myFileId, "%d ", it->next()->GetID());
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshVolume *> * itVolumes=myMesh->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator();
|
||||
while(itVolumes->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itVolumes->next();
|
||||
@ -196,7 +196,7 @@ void DriverDAT_W_SMDS_Mesh::Write()
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * it=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr it=elem->nodesIterator();
|
||||
while(it->more()) fprintf(myFileId, "%d ", it->next()->GetID());
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
|
@ -125,14 +125,13 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
|
||||
fprintf(stdout, "(* NOEUDS DU MAILLAGE : *)\n");
|
||||
fprintf(stdout, "(************************)\n");
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * itNodes=myMesh->nodesIterator();
|
||||
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
|
||||
while(itNodes->more())
|
||||
{
|
||||
const SMDS_MeshNode * node = itNodes->next();
|
||||
fprintf(myFileId, "%d %e %e %e\n", node->GetID(), node->X(),
|
||||
node->Y(), node->Z());
|
||||
}
|
||||
delete itNodes;
|
||||
|
||||
/****************************************************************************
|
||||
* ECRITURE DES ELEMENTS *
|
||||
@ -142,7 +141,7 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
|
||||
fprintf(stdout, "(**************************)");
|
||||
/* Ecriture des connectivites, noms, numeros des mailles */
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshEdge*> * itEdges=myMesh->edgesIterator();
|
||||
SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
|
||||
while(itEdges->more())
|
||||
{
|
||||
const SMDS_MeshEdge * elem = itEdges->next();
|
||||
@ -161,15 +160,14 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itNodes=elem->nodesIterator();
|
||||
while(itNodes->more())
|
||||
fprintf(myFileId, "%d ", itNodes->next()->GetID());
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
delete itEdges;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshFace *> * itFaces=myMesh->facesIterator();
|
||||
SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
|
||||
while(itFaces->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itFaces->next();
|
||||
@ -193,16 +191,14 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itNodes=elem->nodesIterator();
|
||||
while(itNodes->more())
|
||||
fprintf(myFileId, "%d ", itNodes->next()->GetID());
|
||||
delete itNodes;
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
delete itFaces;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshVolume*> * itVolumes=myMesh->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator();
|
||||
while(itVolumes->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itVolumes->next();
|
||||
@ -216,14 +212,12 @@ void DriverDAT_W_SMESHDS_Mesh::Add()
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * itNodes=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itNodes=elem->nodesIterator();
|
||||
while(itNodes->more())
|
||||
fprintf(myFileId, "%d ", itNodes->next()->GetID());
|
||||
delete itNodes;
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
delete itVolumes;
|
||||
|
||||
fclose(myFileId);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ LIB_CLIENT_IDL =
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += $(OCC_CXXFLAGS) $(MED2_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
LDFLAGS += $(MED2_LIBS) -lMeshDriver
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -29,34 +29,60 @@
|
||||
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "Mesh_Reader.h"
|
||||
#include "DriverMED_Family.h"
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
extern "C"
|
||||
{
|
||||
#include <med.h>
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
|
||||
class SMESHDS_Group;
|
||||
class SMESHDS_SubMesh;
|
||||
|
||||
class DriverMED_R_SMESHDS_Mesh:public Mesh_Reader
|
||||
{
|
||||
public:
|
||||
|
||||
public:DriverMED_R_SMESHDS_Mesh();
|
||||
DriverMED_R_SMESHDS_Mesh();
|
||||
~DriverMED_R_SMESHDS_Mesh();
|
||||
|
||||
enum ReadStatus {
|
||||
DRS_OK,
|
||||
DRS_EMPTY, // a MED file contains no mesh with the given name
|
||||
DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers,
|
||||
// so the numbers from the file are ignored
|
||||
DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
|
||||
DRS_FAIL // general failure (exception etc.)
|
||||
};
|
||||
|
||||
void Read();
|
||||
void ReadMySelf();
|
||||
ReadStatus ReadMySelf();
|
||||
void Add();
|
||||
|
||||
list<string> GetGroupNames();
|
||||
void GetGroup(SMESHDS_Group* theGroup);
|
||||
void CreateAllSubMeshes();
|
||||
void GetSubMesh(SMESHDS_SubMesh* theSubMesh, const int theId);
|
||||
|
||||
list<string> GetMeshNames();
|
||||
|
||||
void SetMesh(SMDS_Mesh * aMesh);
|
||||
void SetFile(string);
|
||||
void SetFileId(med_idt);
|
||||
void SetMeshId(int);
|
||||
void SetMeshName(string theMeshName);
|
||||
|
||||
void LinkMeshToShape(string, string, vector < int >);
|
||||
private:
|
||||
|
||||
private: SMDS_Mesh * myMesh;
|
||||
SMDS_Mesh * myMesh;
|
||||
string myFile;
|
||||
med_idt myFileId;
|
||||
int myMeshId;
|
||||
string myMeshName;
|
||||
map<int, DriverMED_FamilyPtr> myFamilies;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -207,7 +207,7 @@ void DriverMED_W_SMDS_Mesh::Write()
|
||||
for (i = 0; i < MED_NBR_GEOMETRIE_MAILLE; i++)
|
||||
nmailles[i] = 0;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshFace *> * itFaces=myMesh->facesIterator();
|
||||
SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
|
||||
int nb_of_nodes, nb_of_faces;
|
||||
nb_of_faces = myMesh->NbFaces();
|
||||
//SCRUTE(nb_of_faces);
|
||||
@ -251,7 +251,7 @@ void DriverMED_W_SMDS_Mesh::Write()
|
||||
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshVolume*> * itVolumes=myMesh->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator();
|
||||
while(itVolumes->more())
|
||||
{
|
||||
const SMDS_MeshVolume * elem = itVolumes->next();
|
||||
@ -295,7 +295,7 @@ void DriverMED_W_SMDS_Mesh::Write()
|
||||
nomnoe = "";
|
||||
|
||||
i = 0;
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * itNodes=myMesh->nodesIterator();
|
||||
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
|
||||
while(itNodes->more())
|
||||
{
|
||||
const SMDS_MeshNode * node = itNodes->next();
|
||||
@ -370,8 +370,7 @@ void DriverMED_W_SMDS_Mesh::Write()
|
||||
//elem_id=*(numele+j);
|
||||
//fprintf(stdout,"%d \n",myId);
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * itNode=
|
||||
elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itNode= elem->nodesIterator();
|
||||
|
||||
while(itNode->more())
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,32 +31,66 @@
|
||||
#include "Mesh_Writer.h"
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <med.h>
|
||||
}
|
||||
|
||||
using namespace std;
|
||||
|
||||
class SMESHDS_Group;
|
||||
class SMESHDS_SubMesh;
|
||||
|
||||
class DriverMED_W_SMESHDS_Mesh:public Mesh_Writer
|
||||
{
|
||||
public:
|
||||
|
||||
public:DriverMED_W_SMESHDS_Mesh();
|
||||
DriverMED_W_SMESHDS_Mesh();
|
||||
~DriverMED_W_SMESHDS_Mesh();
|
||||
|
||||
void Add();
|
||||
void Write();
|
||||
void SetMesh(SMDS_Mesh * aMesh);
|
||||
/*! sets file name; only for usage with Add(), not Write()
|
||||
*/
|
||||
void SetFile(string);
|
||||
void AddGroupOfNodes();
|
||||
void AddGroupOfEdges();
|
||||
void AddGroupOfFaces();
|
||||
void AddGroupOfVolumes();
|
||||
|
||||
void SetFileId(med_idt);
|
||||
/*! functions to prepare adding one mesh
|
||||
*/
|
||||
void SetMesh(SMDS_Mesh * aMesh);
|
||||
void SetMeshId(int);
|
||||
void SetMeshName(string theMeshName);
|
||||
void AddGroup(SMESHDS_Group* theGroup);
|
||||
void AddAllSubMeshes();
|
||||
void AddSubMesh(SMESHDS_SubMesh* theSubMesh, int theID);
|
||||
|
||||
void CreateFamily(char *, char *, int, med_int);
|
||||
/*! add one mesh
|
||||
*/
|
||||
void Add();
|
||||
|
||||
private: SMDS_Mesh * myMesh;
|
||||
/*! functions to write via DriverMED_W_SMDS_Mesh (no groups)
|
||||
*/
|
||||
void SetFileId(med_idt);
|
||||
void Write();
|
||||
|
||||
private:
|
||||
|
||||
SMDS_Mesh * myMesh;
|
||||
string myFile;
|
||||
med_idt myFileId;
|
||||
int myMeshId;
|
||||
|
||||
string myMeshName;
|
||||
list<SMESHDS_Group*> myGroups;
|
||||
bool myAllSubMeshes;
|
||||
map<int,SMESHDS_SubMesh*> mySubMeshes;
|
||||
bool myDoGroupOfNodes;
|
||||
bool myDoGroupOfEdges;
|
||||
bool myDoGroupOfFaces;
|
||||
bool myDoGroupOfVolumes;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -35,7 +35,10 @@ VPATH=.:@srcdir@
|
||||
@COMMENCE@
|
||||
|
||||
# header files
|
||||
EXPORT_HEADERS= DriverMED_R_SMDS_Mesh.h DriverMED_R_SMESHDS_Mesh.h DriverMED_R_SMESHDS_Document.h DriverMED_W_SMDS_Mesh.h DriverMED_W_SMESHDS_Mesh.h DriverMED_W_SMESHDS_Document.h
|
||||
EXPORT_HEADERS = \
|
||||
DriverMED_R_SMDS_Mesh.h DriverMED_R_SMESHDS_Mesh.h DriverMED_R_SMESHDS_Document.h \
|
||||
DriverMED_W_SMDS_Mesh.h DriverMED_W_SMESHDS_Mesh.h DriverMED_W_SMESHDS_Document.h \
|
||||
DriverMED_Family.h
|
||||
|
||||
# Libraries targets
|
||||
LIB = libMeshDriverMED.la
|
||||
@ -45,15 +48,16 @@ LIB_SRC = \
|
||||
DriverMED_R_SMESHDS_Document.cxx \
|
||||
DriverMED_W_SMDS_Mesh.cxx \
|
||||
DriverMED_W_SMESHDS_Document.cxx \
|
||||
DriverMED_W_SMESHDS_Mesh.cxx
|
||||
DriverMED_W_SMESHDS_Mesh.cxx \
|
||||
DriverMED_Family.cxx
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(OCC_INCLUDES) $(QT_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CPPFLAGS += $(OCC_INCLUDES) $(QT_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += $(OCC_CXXFLAGS) $(MED2_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
LDFLAGS += $(MED2_LIBS) -lMeshDriver -lmed
|
||||
LDFLAGS += $(MED2_LIBS) -lMeshDriver -L${KERNEL_ROOT_DIR}/lib/salome -lMEDWrapper
|
||||
|
||||
%_moc.cxx: %.h
|
||||
$(MOC) $< -o $@
|
||||
|
@ -101,7 +101,7 @@ void DriverUNV_W_SMDS_Mesh::Write()
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
fprintf(myFileId, "%s\n", sNODE_UNV_ID);
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * itNodes=myMesh->nodesIterator();
|
||||
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
|
||||
while(itNodes->more())
|
||||
{
|
||||
const SMDS_MeshNode * node = itNodes->next();
|
||||
@ -110,7 +110,6 @@ void DriverUNV_W_SMDS_Mesh::Write()
|
||||
fprintf(myFileId, "%25.16E%25.16E%25.16E\n", node->X(), node->Y(),
|
||||
node->Z());
|
||||
}
|
||||
delete itNodes;
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
|
||||
/****************************************************************************
|
||||
@ -124,11 +123,11 @@ void DriverUNV_W_SMDS_Mesh::Write()
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
fprintf(myFileId, "%s\n", sELT_UNV_ID);
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshEdge *> * itEdges=myMesh->edgesIterator();
|
||||
SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
|
||||
while(itEdges->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itEdges->next();
|
||||
SMDS_Iterator<const SMDS_MeshElement*> *itn=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itn=elem->nodesIterator();
|
||||
|
||||
switch (elem->NbNodes())
|
||||
{
|
||||
@ -149,11 +148,9 @@ void DriverUNV_W_SMDS_Mesh::Write()
|
||||
|
||||
break;
|
||||
}
|
||||
delete itn;
|
||||
}
|
||||
delete itEdges;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshFace*> * itFaces=myMesh->facesIterator();
|
||||
SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
|
||||
while(itFaces->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itFaces->next();
|
||||
@ -184,15 +181,13 @@ void DriverUNV_W_SMDS_Mesh::Write()
|
||||
fprintf(myFileId, "element not registered\n");
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement*> *itn=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itn=elem->nodesIterator();
|
||||
while(itn->more()) fprintf(myFileId, "%10d", itn->next()->GetID());
|
||||
delete itn;
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
delete itFaces;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshVolume*> * itVolumes=myMesh->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator();
|
||||
while(itVolumes->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itVolumes->next();
|
||||
@ -216,13 +211,11 @@ void DriverUNV_W_SMDS_Mesh::Write()
|
||||
break;
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement*> *itn=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itn=elem->nodesIterator();
|
||||
while(itn->more()) fprintf(myFileId, "%10d", itn->next()->GetID());
|
||||
delete itn;
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
delete itVolumes;
|
||||
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
|
||||
|
@ -112,7 +112,7 @@ void DriverUNV_W_SMESHDS_Mesh::Add()
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
fprintf(myFileId, "%s\n", sNODE_UNV_ID);
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * itNodes=myMesh->nodesIterator();
|
||||
SMDS_NodeIteratorPtr itNodes=myMesh->nodesIterator();
|
||||
while(itNodes->more())
|
||||
{
|
||||
const SMDS_MeshNode * node = itNodes->next();
|
||||
@ -121,7 +121,6 @@ void DriverUNV_W_SMESHDS_Mesh::Add()
|
||||
fprintf(myFileId, "%25.16E%25.16E%25.16E\n", node->X(), node->Y(),
|
||||
node->Z());
|
||||
}
|
||||
delete itNodes;
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
|
||||
/****************************************************************************
|
||||
@ -135,11 +134,11 @@ void DriverUNV_W_SMESHDS_Mesh::Add()
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
fprintf(myFileId, "%s\n", sELT_UNV_ID);
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshEdge *> * itEdges=myMesh->edgesIterator();
|
||||
SMDS_EdgeIteratorPtr itEdges=myMesh->edgesIterator();
|
||||
while(itEdges->more())
|
||||
{
|
||||
const SMDS_MeshEdge * elem = itEdges->next();
|
||||
SMDS_Iterator<const SMDS_MeshElement*> *itn=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itn=elem->nodesIterator();
|
||||
|
||||
switch (elem->NbNodes())
|
||||
{
|
||||
@ -159,11 +158,9 @@ void DriverUNV_W_SMESHDS_Mesh::Add()
|
||||
itn->next()->GetID(), itn->next()->GetID());
|
||||
break;
|
||||
}
|
||||
delete itn;
|
||||
}
|
||||
delete itEdges;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshFace*> * itFaces=myMesh->facesIterator();
|
||||
SMDS_FaceIteratorPtr itFaces=myMesh->facesIterator();
|
||||
while(itFaces->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itFaces->next();
|
||||
@ -194,15 +191,13 @@ void DriverUNV_W_SMESHDS_Mesh::Add()
|
||||
fprintf(myFileId, "element not registered\n");
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement*> *itn=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itn=elem->nodesIterator();
|
||||
while(itn->more()) fprintf(myFileId, "%10d", itn->next()->GetID());
|
||||
delete itn;
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
delete itFaces;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshVolume*> * itVolumes=myMesh->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr itVolumes=myMesh->volumesIterator();
|
||||
while(itVolumes->more())
|
||||
{
|
||||
const SMDS_MeshElement * elem = itVolumes->next();
|
||||
@ -226,13 +221,11 @@ void DriverUNV_W_SMESHDS_Mesh::Add()
|
||||
break;
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement*> *itn=elem->nodesIterator();
|
||||
SMDS_ElemIteratorPtr itn=elem->nodesIterator();
|
||||
while(itn->more()) fprintf(myFileId, "%10d", itn->next()->GetID());
|
||||
delete itn;
|
||||
|
||||
fprintf(myFileId, "\n");
|
||||
}
|
||||
delete itVolumes;
|
||||
fprintf(myFileId, "%s\n", sUNV_SEPARATOR);
|
||||
|
||||
fclose(myFileId);
|
||||
|
@ -53,7 +53,7 @@ LIB_CLIENT_IDL =
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += $(OCC_CXXFLAGS) $(MED2_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
LDFLAGS += $(MED2_LIBS) -lMeshDriver
|
||||
|
||||
|
@ -31,14 +31,9 @@ VPATH=.:@srcdir@
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
SUBDIRS = OBJECT SMDS SMESHDS Driver DriverMED DriverDAT DriverUNV MEFISTO2 \
|
||||
SMESH SMESH_I SMESHFiltersSelection SMESHGUI \
|
||||
SMESH_SWIG
|
||||
|
||||
ifeq (@WITHNETGEN@,yes)
|
||||
SUBDIRS = OBJECT SMDS SMESHDS Driver DriverMED DriverDAT DriverUNV MEFISTO2 \
|
||||
NETGEN SMESH SMESH_I SMESHFiltersSelection SMESHGUI \
|
||||
SMESH_SWIG
|
||||
endif
|
||||
SUBDIRS = \
|
||||
SMDS SMESHDS Driver DriverMED DriverDAT DriverUNV \
|
||||
SMESH SMESH_I OBJECT SMESHFiltersSelection SMESHGUI SMESH_SWIG \
|
||||
MEFISTO2 StdMeshers StdMeshers_I StdMeshersGUI
|
||||
|
||||
@MODULE@
|
||||
|
@ -27,31 +27,32 @@
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=../..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
EXPORT_HEADERS = SMESH_Actor.h \
|
||||
SMESH_Grid.h
|
||||
EXPORT_HEADERS = SMESH_Actor.h SMESH_Object.h
|
||||
|
||||
|
||||
# Libraries targets
|
||||
|
||||
LIB = libSMESHObject.la
|
||||
LIB_SRC = SMESH_Actor.cxx \
|
||||
SMESH_Grid.cxx
|
||||
LIB_SRC = SMESH_Object.cxx SMESH_DeviceActor.cxx SMESH_Actor.cxx
|
||||
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl \
|
||||
SALOME_GenericObj.idl \
|
||||
SMESH_Mesh.idl \
|
||||
SMESH_Filter.idl \
|
||||
SMESH_Group.idl
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
|
||||
# Executables targets
|
||||
BIN =
|
||||
BIN_SRC =
|
||||
|
||||
CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
LDFLAGS+=$(QT_MT_LIBS) $(OCC_KERNEL_LIBS) $(VTK_LIBS) $(OGL_LIBS) $(PYTHON_LIBS) -lSalomeObject -L${KERNEL_ROOT_DIR}/lib/salome
|
||||
|
||||
%_moc.cxx: %.h
|
||||
$(MOC) $< -o $@
|
||||
|
||||
CPPFLAGS+=$(OCC_INCLUDES) $(VTK_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome \
|
||||
$(BOOST_CPPFLAGS) $(QT_INCLUDES)
|
||||
LDFLAGS+=$(OCC_KERNEL_LIBS) $(VTK_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome -lSMDS \
|
||||
-lSalomeGUI -lSalomeObject -lOpUtil
|
||||
|
||||
@CONCLUDE@
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,126 +30,205 @@
|
||||
#define SMESH_ACTOR_H
|
||||
|
||||
#include "SALOME_Actor.h"
|
||||
#include "SMESH_Object.h"
|
||||
|
||||
// VTK Includes
|
||||
#include <vtkActor.h>
|
||||
#include <vtkDataSetMapper.h>
|
||||
#include <vtkUnstructuredGridReader.h>
|
||||
class vtkProperty;
|
||||
class vtkShrinkFilter;
|
||||
class vtkPolyDataMapper;
|
||||
class vtkUnstructuredGrid;
|
||||
class vtkMergeFilter;
|
||||
class vtkPolyData;
|
||||
|
||||
// Open CASCADE Includes
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
#include <TColStd_DataMapOfIntegerInteger.hxx>
|
||||
class vtkMapper;
|
||||
class vtkActor2D;
|
||||
class vtkMaskPoints;
|
||||
class vtkLabeledDataMapper;
|
||||
class vtkSelectVisiblePoints;
|
||||
|
||||
class vtkScalarBarActor;
|
||||
class vtkLookupTable;
|
||||
|
||||
class SMESH_DeviceActor;
|
||||
class SALOME_ExtractUnstructuredGrid;
|
||||
|
||||
typedef struct rgbStruct
|
||||
{
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
} RGBStruct;
|
||||
|
||||
class SMESH_Actor : public SALOME_Actor{
|
||||
friend class SMESH_VisualObj;
|
||||
|
||||
public:
|
||||
vtkTypeMacro(SMESH_Actor,SALOME_Actor);
|
||||
static SMESH_Actor* New(TVisualObjPtr theVisualObj,
|
||||
SMESH::FilterManager_ptr theFilterMgr,
|
||||
const char* theEntry,
|
||||
const char* theName,
|
||||
int theIsClear);
|
||||
|
||||
static SMESH_Actor* New();
|
||||
virtual void ReleaseGraphicsResources(vtkWindow *renWin);
|
||||
virtual int RenderOpaqueGeometry(vtkViewport *viewport);
|
||||
virtual int RenderTranslucentGeometry(vtkViewport *viewport);
|
||||
virtual void Render(vtkRenderer *ren);
|
||||
|
||||
// Description:
|
||||
// This causes the actor to be rendered. It, in turn, will render the actor`s
|
||||
// property and then mapper.
|
||||
virtual void Render(vtkRenderer *, vtkMapper *);
|
||||
virtual void AddToRender(vtkRenderer* theRenderer);
|
||||
virtual void RemoveFromRender(vtkRenderer* theRenderer);
|
||||
|
||||
// Description:
|
||||
// This method is used internally by the rendering process.
|
||||
// We overide the superclass method to properly set the estimated render time.
|
||||
int RenderOpaqueGeometry(vtkViewport *viewport);
|
||||
|
||||
void ShallowCopy(vtkProp *prop);
|
||||
|
||||
void setReader(vtkUnstructuredGridReader* r) ;
|
||||
vtkUnstructuredGridReader* getReader();
|
||||
|
||||
// Highlight
|
||||
virtual bool hasHighlight() { return true; }
|
||||
virtual void highlight(Standard_Boolean highlight);
|
||||
virtual void SetPreSelected(Standard_Boolean presel = Standard_False);
|
||||
|
||||
vtkMapper* getMapper();
|
||||
virtual bool IsInfinitive();
|
||||
|
||||
void setDisplayMode(int);
|
||||
virtual void SetOpacity(float theValue);
|
||||
virtual float GetOpacity();
|
||||
|
||||
void SetColor(float r,float g,float b);
|
||||
void GetColor(float& r,float& g,float& b);
|
||||
void SetHighlightColor(float r,float g,float b);
|
||||
void GetHighlightColor(float& r,float& g,float& b);
|
||||
void SetPreselectedColor(float r,float g,float b);
|
||||
void GetPreselectedColor(float& r,float& g,float& b);
|
||||
void SetSufaceColor(float r,float g,float b);
|
||||
void GetSufaceColor(float& r,float& g,float& b);
|
||||
|
||||
void SetBackSufaceColor(float r,float g,float b);
|
||||
void GetBackSufaceColor(float& r,float& g,float& b);
|
||||
|
||||
void SetEdgeColor(float r,float g,float b);
|
||||
void GetEdgeColor(float& r,float& g,float& b);
|
||||
void SetEdgeHighlightColor(float r,float g,float b);
|
||||
void GetEdgeHighlightColor(float& r,float& g,float& b);
|
||||
void SetEdgePreselectedColor(float r,float g,float b);
|
||||
void GetEdgePreselectedColor(float& r,float& g,float& b);
|
||||
|
||||
void SetNodeColor(float r,float g,float b);
|
||||
void GetNodeColor(float& r,float& g,float& b);
|
||||
|
||||
void SetNodeSize(int size) ;
|
||||
int GetNodeSize() ;
|
||||
void SetHighlightColor(float r,float g,float b);
|
||||
void GetHighlightColor(float& r,float& g,float& b);
|
||||
|
||||
void SetPreHighlightColor(float r,float g,float b);
|
||||
void GetPreHighlightColor(float& r,float& g,float& b);
|
||||
|
||||
void ClearNode();
|
||||
void ClearElement();
|
||||
float GetLineWidth();
|
||||
void SetLineWidth(float theVal);
|
||||
|
||||
void RemoveNode(int idSMESHDSnode);
|
||||
void RemoveElement(int idSMESHDSelement);
|
||||
void SetNodeSize(float size) ;
|
||||
float GetNodeSize() ;
|
||||
|
||||
void AddNode(int idSMESHDSnode, int idVTKnode);
|
||||
void AddElement(int idSMESHDSelement, int idVTKelement);
|
||||
virtual int GetObjId(int theVtkID);
|
||||
virtual TVectorId GetVtkId(int theObjID);
|
||||
|
||||
int GetIdVTKNode(int idSMESHDSnode);
|
||||
int GetIdVTKElement(int idSMESHDSelement);
|
||||
virtual int GetNodeObjId(int theVtkID);
|
||||
virtual TVectorId GetNodeVtkId(int theObjID);
|
||||
|
||||
int GetIdSMESHDSNode(int idVTKnode);
|
||||
int GetIdSMESHDSElement(int idVTKelement);
|
||||
virtual int GetElemObjId(int theVtkID);
|
||||
virtual TVectorId GetElemVtkId(int theObjID);
|
||||
|
||||
void SetIdsVTKNode(const TColStd_DataMapOfIntegerInteger& mapVTK);
|
||||
void SetIdsSMESHDSNode(const TColStd_DataMapOfIntegerInteger& mapSMESHDS);
|
||||
virtual int GetObjDimension( const int theObjId );
|
||||
|
||||
void SetIdsVTKElement(const TColStd_DataMapOfIntegerInteger& mapVTK);
|
||||
void SetIdsSMESHDSElement(const TColStd_DataMapOfIntegerInteger& mapSMESHDS);
|
||||
virtual void SetVisibility(int theMode);
|
||||
|
||||
vtkDataSet* DataSource;
|
||||
vtkActor* EdgeDevice;
|
||||
vtkActor* EdgeShrinkDevice;
|
||||
enum EReperesent { ePoint, eEdge, eSurface};
|
||||
virtual void SetRepresentation(int theMode);
|
||||
void SetPointRepresentation(int theIsPointsVisible);
|
||||
bool GetPointRepresentation(){ return myIsPointsVisible;}
|
||||
|
||||
virtual vtkPolyData* GetPolyDataInput();
|
||||
virtual void SetTransform(SALOME_Transform* theTransform);
|
||||
|
||||
vtkUnstructuredGrid* GetUnstructuredGrid();
|
||||
virtual vtkMapper* GetMapper();
|
||||
|
||||
float GetShrinkFactor();
|
||||
void SetShrinkFactor(float value );
|
||||
|
||||
void GetChildActors(vtkActorCollection*);
|
||||
bool IsShrunkable() { return myIsShrinkable;}
|
||||
bool IsShrunk() { return myIsShrunk;}
|
||||
void SetShrink();
|
||||
void UnShrink();
|
||||
|
||||
void SetVisibility(bool visibility);
|
||||
void SetPointsLabeled(bool theIsPointsLabeled);
|
||||
bool GetPointsLabeled(){ return myIsPointsLabeled;}
|
||||
|
||||
void SetCellsLabeled(bool theIsCellsLabeled);
|
||||
bool GetCellsLabeled(){ return myIsCellsLabeled;}
|
||||
|
||||
enum eControl{eNone, eLengthEdges, eFreeBorders, eMultiConnection,
|
||||
eArea, eTaper, eAspectRatio, eMinimumAngle, eWarping, eSkew};
|
||||
void SetControlMode(eControl theMode);
|
||||
eControl GetControlMode(){ return myColorMode;}
|
||||
|
||||
enum e1DControl{e1DNone, e1DColored, e1DHighlited};
|
||||
e1DControl Get1DControlMode(){ return my1DColorMode;}
|
||||
|
||||
vtkScalarBarActor* GetScalarBarActor(){ return myScalarBarActor;}
|
||||
|
||||
TVisualObjPtr GetObject() { return myVisualObj;}
|
||||
|
||||
protected:
|
||||
TVisualObjPtr myVisualObj;
|
||||
|
||||
SMESH::FilterManager_var myFilterMgr;
|
||||
vtkScalarBarActor* myScalarBarActor;
|
||||
vtkLookupTable* myLookupTable;
|
||||
|
||||
vtkProperty* mySurfaceProp;
|
||||
vtkProperty* myBackSurfaceProp;
|
||||
vtkProperty* myEdgeProp;
|
||||
vtkProperty* myNodeProp;
|
||||
|
||||
SMESH_DeviceActor* myBaseActor;
|
||||
SMESH_DeviceActor* myNodeActor;
|
||||
SMESH_DeviceActor* myPickableActor;
|
||||
|
||||
vtkProperty* myHighlightProp;
|
||||
vtkProperty* myPreselectProp;
|
||||
SMESH_DeviceActor* myHighlitableActor;
|
||||
|
||||
eControl myColorMode;
|
||||
SMESH_DeviceActor* my2DActor;
|
||||
SMESH_DeviceActor* my3DActor;
|
||||
SMESH_DeviceActor* myControlActor;
|
||||
|
||||
e1DControl my1DColorMode;
|
||||
vtkProperty* my1DProp;
|
||||
SMESH_DeviceActor* my1DActor;
|
||||
vtkProperty* my1DExtProp;
|
||||
SMESH_DeviceActor* my1DExtActor;
|
||||
|
||||
bool myIsPointsVisible;
|
||||
|
||||
bool myIsShrinkable;
|
||||
bool myIsShrunk;
|
||||
|
||||
bool myIsPointsLabeled;
|
||||
vtkUnstructuredGrid* myPointsNumDataSet;
|
||||
vtkActor2D *myPointLabels;
|
||||
vtkMaskPoints* myPtsMaskPoints;
|
||||
vtkLabeledDataMapper* myPtsLabeledDataMapper;
|
||||
vtkSelectVisiblePoints* myPtsSelectVisiblePoints;
|
||||
|
||||
bool myIsCellsLabeled;
|
||||
vtkUnstructuredGrid* myCellsNumDataSet;
|
||||
vtkActor2D *myCellsLabels;
|
||||
vtkMaskPoints* myClsMaskPoints;
|
||||
vtkCellCenters* myCellCenters;
|
||||
vtkLabeledDataMapper* myClsLabeledDataMapper;
|
||||
vtkSelectVisiblePoints* myClsSelectVisiblePoints;
|
||||
|
||||
SMESH_Actor();
|
||||
~SMESH_Actor();
|
||||
SMESH_Actor(const SMESH_Actor&) {};
|
||||
void operator=(const SMESH_Actor&) {};
|
||||
|
||||
vtkUnstructuredGridReader* myReader;
|
||||
void Init(TVisualObjPtr theVisualObj,
|
||||
SMESH::FilterManager_ptr theFilterMgr,
|
||||
const char* theEntry,
|
||||
const char* theName,
|
||||
int theIsClear);
|
||||
|
||||
float myShrinkFactor;
|
||||
void SetUnstructuredGrid(vtkUnstructuredGrid* theGrid);
|
||||
void SetIsShrunkable(bool theShrunkable);
|
||||
void UpdateHighlight();
|
||||
|
||||
RGBStruct edgeColor;
|
||||
RGBStruct edgeHighlightColor;
|
||||
RGBStruct edgePreselectedColor;
|
||||
|
||||
RGBStruct actorColor;
|
||||
RGBStruct actorHighlightColor;
|
||||
RGBStruct actorPreselectedColor;
|
||||
|
||||
RGBStruct actorNodeColor; // LPN
|
||||
int actorNodeSize; // LPN
|
||||
private:
|
||||
// hide the two parameter Render() method from the user and the compiler.
|
||||
virtual void Render(vtkRenderer *, vtkMapper *) {};
|
||||
virtual void ShallowCopy(vtkProp *prop);
|
||||
virtual void SetMapper(vtkMapper *);
|
||||
static SMESH_Actor* New();
|
||||
|
||||
// Not implemented.
|
||||
SMESH_Actor(const SMESH_Actor&);
|
||||
void operator=(const SMESH_Actor&);
|
||||
};
|
||||
|
||||
|
||||
#endif //SMESH_ACTOR_H
|
||||
|
@ -123,7 +123,7 @@ EXPORT_HEADERS= \
|
||||
#SMDS_MeshNodeIDFactory.hxx
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CPPFLAGS += -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
|
||||
LDFLAGS += -L${KERNEL_ROOT_DIR}/lib/salome
|
||||
|
||||
|
@ -38,7 +38,6 @@ class SMDS_EdgePosition:public SMDS_Position
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
void SetUParameter(double aUparam);
|
||||
double GetUParameter() const;
|
||||
~SMDS_EdgePosition();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -55,16 +55,13 @@ SMDSAbs_ElementType SMDS_FaceOfEdges::GetType() const
|
||||
return SMDSAbs_Face;
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_FaceOfEdges::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
class MyIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
class SMDS_FaceOfEdges_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
const vector<const SMDS_MeshEdge*>& mySet;
|
||||
int index;
|
||||
public:
|
||||
MyIterator(const vector<const SMDS_MeshEdge*>& s):mySet(s),index(0)
|
||||
{}
|
||||
SMDS_FaceOfEdges_MyIterator(const vector<const SMDS_MeshEdge*>& s):
|
||||
mySet(s),index(0) {}
|
||||
|
||||
bool more()
|
||||
{
|
||||
@ -77,17 +74,25 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_FaceOfEdges::
|
||||
return mySet[index-1];
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_FaceOfEdges::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case SMDSAbs_Face:return SMDS_MeshElement::elementsIterator(SMDSAbs_Face);
|
||||
case SMDSAbs_Edge:return new MyIterator(myEdges);
|
||||
default:return new SMDS_IteratorOfElements(this,type,new MyIterator(myEdges));
|
||||
case SMDSAbs_Face:
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Face);
|
||||
case SMDSAbs_Edge:
|
||||
return SMDS_ElemIteratorPtr(new SMDS_FaceOfEdges_MyIterator(myEdges));
|
||||
default:
|
||||
return SMDS_ElemIteratorPtr
|
||||
(new SMDS_IteratorOfElements
|
||||
(this,type, SMDS_ElemIteratorPtr(new SMDS_FaceOfEdges_MyIterator(myEdges))));
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_FaceOfEdges::SMDS_FaceOfEdges(SMDS_MeshEdge* edge1, SMDS_MeshEdge* edge2,
|
||||
SMDS_MeshEdge* edge3)
|
||||
SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge2,
|
||||
const SMDS_MeshEdge* edge3)
|
||||
{
|
||||
myEdges.resize(3);
|
||||
myEdges[0]=edge1;
|
||||
@ -95,8 +100,10 @@ SMDS_FaceOfEdges::SMDS_FaceOfEdges(SMDS_MeshEdge* edge1, SMDS_MeshEdge* edge2,
|
||||
myEdges[2]=edge3;
|
||||
}
|
||||
|
||||
SMDS_FaceOfEdges::SMDS_FaceOfEdges(SMDS_MeshEdge* edge1, SMDS_MeshEdge* edge2,
|
||||
SMDS_MeshEdge* edge3, SMDS_MeshEdge* edge4)
|
||||
SMDS_FaceOfEdges::SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge2,
|
||||
const SMDS_MeshEdge* edge3,
|
||||
const SMDS_MeshEdge* edge4)
|
||||
{
|
||||
myEdges.resize(4);
|
||||
myEdges[0]=edge1;
|
||||
@ -108,7 +115,7 @@ SMDS_FaceOfEdges::SMDS_FaceOfEdges(SMDS_MeshEdge* edge1, SMDS_MeshEdge* edge2,
|
||||
/*bool operator<(const SMDS_FaceOfEdges& f1, const SMDS_FaceOfEdges& f2)
|
||||
{
|
||||
set<SMDS_MeshNode> set1,set2;
|
||||
SMDS_Iterator<const SMDS_MeshElement*> * it;
|
||||
SMDS_ElemIteratorPtr it;
|
||||
const SMDS_MeshNode * n;
|
||||
|
||||
it=f1.nodesIterator();
|
||||
|
@ -31,10 +31,13 @@ class SMDS_FaceOfEdges:public SMDS_MeshFace
|
||||
{
|
||||
public:
|
||||
void Print(ostream & OS) const;
|
||||
SMDS_FaceOfEdges(SMDS_MeshEdge* edge1, SMDS_MeshEdge* edge2,
|
||||
SMDS_MeshEdge* edge3);
|
||||
SMDS_FaceOfEdges(SMDS_MeshEdge* edge1, SMDS_MeshEdge* edge2,
|
||||
SMDS_MeshEdge* edge3, SMDS_MeshEdge* edge4);
|
||||
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge2,
|
||||
const SMDS_MeshEdge* edge3);
|
||||
SMDS_FaceOfEdges(const SMDS_MeshEdge* edge1,
|
||||
const SMDS_MeshEdge* edge2,
|
||||
const SMDS_MeshEdge* edge3,
|
||||
const SMDS_MeshEdge* edge4);
|
||||
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
int NbEdges() const;
|
||||
@ -42,7 +45,7 @@ class SMDS_FaceOfEdges:public SMDS_MeshFace
|
||||
// friend bool operator<(const SMDS_FaceOfEdges& e1, const SMDS_FaceOfEdges& e2);
|
||||
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
private:
|
||||
|
@ -56,16 +56,13 @@ void SMDS_FaceOfNodes::Print(ostream & OS) const
|
||||
OS << myNodes[i] << ") " << endl;
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_FaceOfNodes::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
class MyIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
class SMDS_FaceOfNodes_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
const vector<const SMDS_MeshNode*>& mySet;
|
||||
int index;
|
||||
public:
|
||||
MyIterator(const vector<const SMDS_MeshNode*>& s):mySet(s),index(0)
|
||||
{}
|
||||
SMDS_FaceOfNodes_MyIterator(const vector<const SMDS_MeshNode*>& s):
|
||||
mySet(s),index(0) {}
|
||||
|
||||
bool more()
|
||||
{
|
||||
@ -78,20 +75,28 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_FaceOfNodes::
|
||||
return mySet[index-1];
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_FaceOfNodes::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case SMDSAbs_Face:return SMDS_MeshElement::elementsIterator(SMDSAbs_Face);
|
||||
case SMDSAbs_Node:return new MyIterator(myNodes);
|
||||
case SMDSAbs_Face:
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Face);
|
||||
case SMDSAbs_Node:
|
||||
return SMDS_ElemIteratorPtr(new SMDS_FaceOfNodes_MyIterator(myNodes));
|
||||
case SMDSAbs_Edge:
|
||||
MESSAGE("Error : edge iterator for SMDS_FaceOfNodes not implemented");
|
||||
break;
|
||||
default:return new SMDS_IteratorOfElements(this,type,new MyIterator(myNodes));
|
||||
default:
|
||||
return SMDS_ElemIteratorPtr
|
||||
(new SMDS_IteratorOfElements
|
||||
(this,type,SMDS_ElemIteratorPtr(new SMDS_FaceOfNodes_MyIterator(myNodes))));
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_FaceOfNodes::SMDS_FaceOfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
SMDS_MeshNode* node3)
|
||||
SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3)
|
||||
{
|
||||
myNodes.resize(3);
|
||||
myNodes[0]=node1;
|
||||
@ -99,8 +104,10 @@ SMDS_FaceOfNodes::SMDS_FaceOfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
myNodes[2]=node3;
|
||||
}
|
||||
|
||||
SMDS_FaceOfNodes::SMDS_FaceOfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
SMDS_MeshNode* node3, SMDS_MeshNode* node4)
|
||||
SMDS_FaceOfNodes::SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3,
|
||||
const SMDS_MeshNode* node4)
|
||||
{
|
||||
myNodes.resize(4);
|
||||
myNodes[0]=node1;
|
||||
@ -112,7 +119,7 @@ SMDS_FaceOfNodes::SMDS_FaceOfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
/*bool operator<(const SMDS_FaceOfNodes& f1, const SMDS_FaceOfNodes& f2)
|
||||
{
|
||||
set<SMDS_MeshNode> set1,set2;
|
||||
SMDS_Iterator<const SMDS_MeshElement*> * it;
|
||||
SMDS_ElemIteratorPtr it;
|
||||
const SMDS_MeshNode * n;
|
||||
|
||||
it=f1.nodesIterator();
|
||||
|
@ -31,16 +31,19 @@ class SMDS_FaceOfNodes:public SMDS_MeshFace
|
||||
{
|
||||
public:
|
||||
void Print(ostream & OS) const;
|
||||
SMDS_FaceOfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
SMDS_MeshNode* node3);
|
||||
SMDS_FaceOfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
SMDS_MeshNode* node3, SMDS_MeshNode* node4);
|
||||
SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3);
|
||||
SMDS_FaceOfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3,
|
||||
const SMDS_MeshNode* node4);
|
||||
|
||||
int NbEdges() const;
|
||||
int NbFaces() const;
|
||||
int NbNodes() const;
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
private:
|
||||
|
@ -29,14 +29,14 @@
|
||||
/// 5,1 and 7,3 are an edges.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_HexahedronOfNodes::SMDS_HexahedronOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5,
|
||||
SMDS_MeshNode * node6,
|
||||
SMDS_MeshNode * node7,
|
||||
SMDS_MeshNode * node8)
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6,
|
||||
const SMDS_MeshNode * node7,
|
||||
const SMDS_MeshNode * node8)
|
||||
{
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
@ -75,7 +75,7 @@ int SMDS_HexahedronOfNodes::NbEdges() const
|
||||
return 12;
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_HexahedronOfNodes::
|
||||
SMDS_ElemIteratorPtr SMDS_HexahedronOfNodes::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
@ -83,8 +83,8 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_HexahedronOfNodes::
|
||||
case SMDSAbs_Volume:
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Volume);
|
||||
case SMDSAbs_Node:
|
||||
return new SMDS_IteratorOfArray<const SMDS_MeshElement *, 8,
|
||||
const SMDS_MeshNode*>(myNodes);
|
||||
return SMDS_ElemIteratorPtr (new SMDS_IteratorOfArray<const SMDS_MeshElement *, 8,
|
||||
const SMDS_MeshNode*>(myNodes));
|
||||
default: MESSAGE("ERROR : Iterator not implemented");
|
||||
}
|
||||
}
|
||||
|
@ -36,14 +36,14 @@ class SMDS_HexahedronOfNodes:public SMDS_MeshVolume
|
||||
|
||||
public:
|
||||
SMDS_HexahedronOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5,
|
||||
SMDS_MeshNode * node6,
|
||||
SMDS_MeshNode * node7,
|
||||
SMDS_MeshNode * node8);
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6,
|
||||
const SMDS_MeshNode * node7,
|
||||
const SMDS_MeshNode * node8);
|
||||
|
||||
void Print(ostream & OS) const;
|
||||
int NbFaces() const;
|
||||
@ -51,7 +51,7 @@ class SMDS_HexahedronOfNodes:public SMDS_MeshVolume
|
||||
int NbEdges() const;
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
const SMDS_MeshNode * myNodes[8];
|
||||
};
|
||||
|
@ -36,7 +36,11 @@ template<typename VALUE> class SMDS_Iterator
|
||||
virtual VALUE next()=0;
|
||||
|
||||
/// Delete the current element and step to the next one
|
||||
virtual void remove(){};
|
||||
virtual void remove(){}
|
||||
|
||||
/// Provide virtual destructor just for case if some derived iterator
|
||||
/// must have a destructor
|
||||
virtual ~SMDS_Iterator(){}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,6 @@ bool SMDS_IteratorOfElements::subMore()
|
||||
{
|
||||
if(t1Iterator->more())
|
||||
{
|
||||
if(t2Iterator!=NULL) delete t2Iterator;
|
||||
t2Iterator=t1Iterator->next()->elementsIterator(myType);
|
||||
return subMore();
|
||||
}
|
||||
@ -39,13 +38,8 @@ bool SMDS_IteratorOfElements::subMore()
|
||||
const SMDS_MeshElement * SMDS_IteratorOfElements::subNext()
|
||||
{
|
||||
if((t2Iterator==NULL)||(!t2Iterator->more()))
|
||||
{
|
||||
if(t1Iterator->more())
|
||||
{
|
||||
if(t2Iterator!=NULL) delete t2Iterator;
|
||||
t2Iterator=t1Iterator->next()->elementsIterator(myType);
|
||||
}
|
||||
}
|
||||
return t2Iterator->next();
|
||||
}
|
||||
|
||||
@ -54,8 +48,11 @@ const SMDS_MeshElement * SMDS_IteratorOfElements::subNext()
|
||||
/// to the element element. it is the iterator to get connectivity of element
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_IteratorOfElements::SMDS_IteratorOfElements(const SMDS_MeshElement * element,
|
||||
SMDSAbs_ElementType type, SMDS_Iterator<const SMDS_MeshElement *>* it)
|
||||
:t1Iterator(it), t2Iterator(NULL), myType(type), myElement(element),
|
||||
SMDSAbs_ElementType type,
|
||||
const SMDS_ElemIteratorPtr& it)
|
||||
: t1Iterator(it),
|
||||
t2Iterator(SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL)),
|
||||
myType(type), myElement(element),
|
||||
myProxyElement(NULL)
|
||||
{
|
||||
while(subMore())
|
||||
@ -81,7 +78,7 @@ bool SMDS_IteratorOfElements::more()
|
||||
|
||||
if(myReverseIteration)
|
||||
{
|
||||
SMDS_Iterator<const SMDS_MeshElement*> * it=
|
||||
SMDS_ElemIteratorPtr it=
|
||||
myProxyElement->elementsIterator(myElement->GetType());
|
||||
while(it->more())
|
||||
{
|
||||
@ -103,9 +100,3 @@ const SMDS_MeshElement * SMDS_IteratorOfElements::next()
|
||||
myProxyElement=NULL;
|
||||
return e;
|
||||
}
|
||||
|
||||
SMDS_IteratorOfElements::~SMDS_IteratorOfElements()
|
||||
{
|
||||
delete t1Iterator;
|
||||
if(t2Iterator!=NULL) delete t2Iterator;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
class SMDS_IteratorOfElements:public SMDS_Iterator<const SMDS_MeshElement *>
|
||||
class SMDS_IteratorOfElements:public SMDS_ElemIterator
|
||||
{
|
||||
public:
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -33,14 +33,14 @@ class SMDS_IteratorOfElements:public SMDS_Iterator<const SMDS_MeshElement *>
|
||||
/// to the element element. it is the iterator to get connectivity of element
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_IteratorOfElements(const SMDS_MeshElement * element,
|
||||
SMDSAbs_ElementType type, SMDS_Iterator<const SMDS_MeshElement *>* it);
|
||||
SMDSAbs_ElementType type,
|
||||
const SMDS_ElemIteratorPtr& it);
|
||||
bool more();
|
||||
const SMDS_MeshElement * next();
|
||||
~SMDS_IteratorOfElements();
|
||||
|
||||
private:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * t2Iterator;
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * t1Iterator;
|
||||
SMDS_ElemIteratorPtr t2Iterator;
|
||||
SMDS_ElemIteratorPtr t1Iterator;
|
||||
SMDSAbs_ElementType myType;
|
||||
const SMDS_MeshElement * myProxyElement;
|
||||
const SMDS_MeshElement * myElement;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -34,59 +34,132 @@
|
||||
#include "SMDS_MeshElementIDFactory.hxx"
|
||||
#include "SMDS_Iterator.hxx"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <set>
|
||||
#include <list>
|
||||
|
||||
class SMDSControl_BoundaryEdges;
|
||||
|
||||
class SMDS_Mesh:public SMDS_MeshObject
|
||||
{
|
||||
typedef SMDS_Iterator<const SMDS_MeshNode *> SMDS_NodeIterator;
|
||||
typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshNode *> > SMDS_NodeIteratorPtr;
|
||||
typedef SMDS_Iterator<const SMDS_MeshEdge *> SMDS_EdgeIterator;
|
||||
typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshEdge *> > SMDS_EdgeIteratorPtr;
|
||||
typedef SMDS_Iterator<const SMDS_MeshFace *> SMDS_FaceIterator;
|
||||
typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshFace *> > SMDS_FaceIteratorPtr;
|
||||
typedef SMDS_Iterator<const SMDS_MeshVolume *> SMDS_VolumeIterator;
|
||||
typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshVolume *> > SMDS_VolumeIteratorPtr;
|
||||
|
||||
class SMDS_Mesh:public SMDS_MeshObject{
|
||||
public:
|
||||
|
||||
SMDS_Mesh();
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshNode *> * nodesIterator() const;
|
||||
SMDS_Iterator<const SMDS_MeshEdge *> * edgesIterator() const;
|
||||
SMDS_Iterator<const SMDS_MeshFace *> * facesIterator() const;
|
||||
SMDS_Iterator<const SMDS_MeshVolume *> * volumesIterator() const;
|
||||
SMDS_NodeIteratorPtr nodesIterator() const;
|
||||
SMDS_EdgeIteratorPtr edgesIterator() const;
|
||||
SMDS_FaceIteratorPtr facesIterator() const;
|
||||
SMDS_VolumeIteratorPtr volumesIterator() const;
|
||||
|
||||
SMDS_Mesh *AddSubMesh();
|
||||
virtual SMDS_MeshNode* AddNode(double x, double y, double z);
|
||||
virtual SMDS_MeshNode* AddNodeWithID(double x, double y, double z, int ID);
|
||||
|
||||
virtual SMDS_MeshEdge* AddEdge(
|
||||
const SMDS_MeshNode * n1,
|
||||
virtual SMDS_MeshNode* AddNodeWithID(double x, double y, double z, int ID);
|
||||
virtual SMDS_MeshNode* AddNode(double x, double y, double z);
|
||||
|
||||
virtual SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int ID);
|
||||
virtual SMDS_MeshEdge* AddEdgeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
int ID);
|
||||
virtual SMDS_MeshEdge* AddEdge(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2);
|
||||
virtual SMDS_MeshFace* AddFace(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int ID);
|
||||
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
int ID);
|
||||
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3);
|
||||
virtual SMDS_MeshFace* AddFace(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4, int ID);
|
||||
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
int ID);
|
||||
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4);
|
||||
virtual SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshEdge * e1,
|
||||
const SMDS_MeshEdge * e2,
|
||||
const SMDS_MeshEdge * e3, int ID);
|
||||
virtual SMDS_MeshFace* AddFace(const SMDS_MeshEdge * e1,
|
||||
const SMDS_MeshEdge * e2,
|
||||
const SMDS_MeshEdge * e3);
|
||||
|
||||
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshEdge * e1,
|
||||
const SMDS_MeshEdge * e2,
|
||||
const SMDS_MeshEdge * e3,
|
||||
const SMDS_MeshEdge * e4, int ID);
|
||||
virtual SMDS_MeshFace* AddFace(const SMDS_MeshEdge * e1,
|
||||
const SMDS_MeshEdge * e2,
|
||||
const SMDS_MeshEdge * e3,
|
||||
const SMDS_MeshEdge * e4);
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4);
|
||||
virtual SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
||||
int n5, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5);
|
||||
virtual SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
||||
int n5, int n6, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6);
|
||||
virtual SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
||||
int n5, int n6, int n7, int n8, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6,
|
||||
const SMDS_MeshNode * n7,
|
||||
const SMDS_MeshNode * n8,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
@ -95,61 +168,44 @@ class SMDS_Mesh:public SMDS_MeshObject
|
||||
const SMDS_MeshNode * n7,
|
||||
const SMDS_MeshNode * n8);
|
||||
|
||||
SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int ID);
|
||||
SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int ID);
|
||||
SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4,
|
||||
int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
||||
int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
||||
int n5, int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
||||
int n5, int n6, int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4,
|
||||
int n5, int n6, int n7, int n8, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshFace * f1,
|
||||
const SMDS_MeshFace * f2,
|
||||
const SMDS_MeshFace * f3,
|
||||
const SMDS_MeshFace * f4, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshFace * f1,
|
||||
const SMDS_MeshFace * f2,
|
||||
const SMDS_MeshFace * f3,
|
||||
const SMDS_MeshFace * f4);
|
||||
|
||||
SMDS_MeshEdge* AddEdgeWithID(
|
||||
const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2, int ID);
|
||||
SMDS_MeshFace* AddFaceWithID(
|
||||
const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3, int ID);
|
||||
SMDS_MeshFace* AddFaceWithID(
|
||||
const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4, int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(
|
||||
const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4, int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(
|
||||
const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5, int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(
|
||||
const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6, int ID);
|
||||
SMDS_MeshVolume* AddVolumeWithID(
|
||||
const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6,
|
||||
const SMDS_MeshNode * n7,
|
||||
const SMDS_MeshNode * n8, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshFace * f1,
|
||||
const SMDS_MeshFace * f2,
|
||||
const SMDS_MeshFace * f3,
|
||||
const SMDS_MeshFace * f4,
|
||||
const SMDS_MeshFace * f5, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshFace * f1,
|
||||
const SMDS_MeshFace * f2,
|
||||
const SMDS_MeshFace * f3,
|
||||
const SMDS_MeshFace * f4,
|
||||
const SMDS_MeshFace * f5);
|
||||
|
||||
virtual void RemoveElement(const SMDS_MeshElement * elem, const bool removenodes =
|
||||
false);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshFace * f1,
|
||||
const SMDS_MeshFace * f2,
|
||||
const SMDS_MeshFace * f3,
|
||||
const SMDS_MeshFace * f4,
|
||||
const SMDS_MeshFace * f5,
|
||||
const SMDS_MeshFace * f6, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshFace * f1,
|
||||
const SMDS_MeshFace * f2,
|
||||
const SMDS_MeshFace * f3,
|
||||
const SMDS_MeshFace * f4,
|
||||
const SMDS_MeshFace * f5,
|
||||
const SMDS_MeshFace * f6);
|
||||
|
||||
virtual void RemoveElement(const SMDS_MeshElement * elem,
|
||||
list<const SMDS_MeshElement *>& removedElems,
|
||||
list<const SMDS_MeshElement *>& removedNodes,
|
||||
const bool removenodes = false);
|
||||
virtual void RemoveElement(const SMDS_MeshElement * elem, const bool removenodes = false);
|
||||
virtual void RemoveNode(const SMDS_MeshNode * node);
|
||||
virtual void RemoveEdge(const SMDS_MeshEdge * edge);
|
||||
virtual void RemoveFace(const SMDS_MeshFace * face);
|
||||
@ -184,39 +240,63 @@ class SMDS_Mesh:public SMDS_MeshObject
|
||||
void setConstructionFaces(bool);
|
||||
void setInverseElements(bool);
|
||||
|
||||
private:
|
||||
SMDS_Mesh(SMDS_Mesh * parent);
|
||||
SMDS_MeshFace * createTriangle(SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2, SMDS_MeshNode * node3);
|
||||
SMDS_MeshFace * createQuadrangle(SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2, SMDS_MeshNode * node3, SMDS_MeshNode * node4);
|
||||
const SMDS_MeshEdge* FindEdge(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2) const;
|
||||
SMDS_MeshEdge* FindEdgeOrCreate(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2);
|
||||
SMDS_MeshFace* FindFaceOrCreate(
|
||||
const SMDS_MeshNode *n1,
|
||||
const SMDS_MeshNode *n2,
|
||||
const SMDS_MeshNode *n3);
|
||||
const SMDS_MeshFace* FindFace(
|
||||
const SMDS_MeshNode *n1,
|
||||
const SMDS_MeshNode *n2,
|
||||
const SMDS_MeshNode *n3,
|
||||
const SMDS_MeshNode *n4) const;
|
||||
SMDS_MeshFace* FindFaceOrCreate(
|
||||
const SMDS_MeshNode *n1,
|
||||
const SMDS_MeshNode *n2,
|
||||
const SMDS_MeshNode *n3,
|
||||
const SMDS_MeshNode *n4);
|
||||
void addChildrenWithNodes(set<const SMDS_MeshElement*>& setOfChildren,
|
||||
const SMDS_MeshElement * element, set<const SMDS_MeshElement*>& nodes);
|
||||
/*!
|
||||
* Checks if the element is present in mesh.
|
||||
* Useful to determine dead pointers.
|
||||
* Use this function for debug purpose only! Do not check in the code
|
||||
* using it even in _DEBUG_ mode
|
||||
*/
|
||||
bool Contains (const SMDS_MeshElement* elem) const;
|
||||
|
||||
// Fields PRIVATE
|
||||
typedef set<SMDS_MeshNode *> SetOfNodes;
|
||||
typedef set<SMDS_MeshEdge *> SetOfEdges;
|
||||
typedef set<SMDS_MeshFace *> SetOfFaces;
|
||||
typedef set<SMDS_MeshVolume *> SetOfVolumes;
|
||||
|
||||
private:
|
||||
SMDS_Mesh(SMDS_Mesh * parent);
|
||||
|
||||
SMDS_MeshFace * createTriangle(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3);
|
||||
|
||||
SMDS_MeshFace * createQuadrangle(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4);
|
||||
|
||||
bool registerElement(int ID, SMDS_MeshElement * element);
|
||||
|
||||
const SMDS_MeshEdge* FindEdge(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2) const;
|
||||
|
||||
SMDS_MeshEdge* FindEdgeOrCreate(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2);
|
||||
|
||||
const SMDS_MeshFace* FindFace(const SMDS_MeshNode *n1,
|
||||
const SMDS_MeshNode *n2,
|
||||
const SMDS_MeshNode *n3) const;
|
||||
|
||||
SMDS_MeshFace* FindFaceOrCreate(const SMDS_MeshNode *n1,
|
||||
const SMDS_MeshNode *n2,
|
||||
const SMDS_MeshNode *n3);
|
||||
|
||||
const SMDS_MeshFace* FindFace(const SMDS_MeshNode *n1,
|
||||
const SMDS_MeshNode *n2,
|
||||
const SMDS_MeshNode *n3,
|
||||
const SMDS_MeshNode *n4) const;
|
||||
|
||||
SMDS_MeshFace* FindFaceOrCreate(const SMDS_MeshNode *n1,
|
||||
const SMDS_MeshNode *n2,
|
||||
const SMDS_MeshNode *n3,
|
||||
const SMDS_MeshNode *n4);
|
||||
|
||||
void addChildrenWithNodes(set<const SMDS_MeshElement*>& setOfChildren,
|
||||
const SMDS_MeshElement * element,
|
||||
set<const SMDS_MeshElement*>& nodes);
|
||||
|
||||
// Fields PRIVATE
|
||||
|
||||
SetOfNodes myNodes;
|
||||
SetOfEdges myEdges;
|
||||
SetOfFaces myFaces;
|
||||
|
@ -36,7 +36,8 @@
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMDS_MeshEdge::SMDS_MeshEdge(SMDS_MeshNode * node1, SMDS_MeshNode * node2)
|
||||
SMDS_MeshEdge::SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2)
|
||||
{
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
@ -68,16 +69,13 @@ SMDSAbs_ElementType SMDS_MeshEdge::GetType() const
|
||||
return SMDSAbs_Edge;
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshEdge::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
class SMDS_MeshEdge_MyNodeIterator:public SMDS_ElemIterator
|
||||
{
|
||||
class MyNodeIterator:public SMDS_Iterator<const SMDS_MeshElement *>
|
||||
{
|
||||
SMDS_MeshNode *const* myNodes;
|
||||
const SMDS_MeshNode *const* myNodes;
|
||||
int myIndex;
|
||||
public:
|
||||
MyNodeIterator(SMDS_MeshNode * const* nodes):myNodes(nodes),myIndex(0)
|
||||
{}
|
||||
SMDS_MeshEdge_MyNodeIterator(const SMDS_MeshNode * const* nodes):
|
||||
myNodes(nodes),myIndex(0) {}
|
||||
|
||||
bool more()
|
||||
{
|
||||
@ -91,13 +89,20 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshEdge::
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_MeshEdge::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case SMDSAbs_Edge:return SMDS_MeshElement::elementsIterator(SMDSAbs_Edge);
|
||||
case SMDSAbs_Node:return new MyNodeIterator(myNodes);
|
||||
default: return new SMDS_IteratorOfElements(this,type, nodesIterator());
|
||||
case SMDSAbs_Edge:
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Edge);
|
||||
case SMDSAbs_Node:
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshEdge_MyNodeIterator(myNodes));
|
||||
default:
|
||||
return SMDS_ElemIteratorPtr
|
||||
(new SMDS_IteratorOfElements
|
||||
(this,type, SMDS_ElemIteratorPtr(new SMDS_MeshEdge_MyNodeIterator(myNodes))));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool operator<(const SMDS_MeshEdge & e1, const SMDS_MeshEdge & e2)
|
||||
|
@ -34,7 +34,8 @@ class SMDS_MeshEdge:public SMDS_MeshElement
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_MeshEdge(SMDS_MeshNode * node1, SMDS_MeshNode * node2);
|
||||
SMDS_MeshEdge(const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2);
|
||||
void Print(ostream & OS) const;
|
||||
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
@ -42,11 +43,11 @@ class SMDS_MeshEdge:public SMDS_MeshElement
|
||||
int NbEdges() const;
|
||||
friend bool operator<(const SMDS_MeshEdge& e1, const SMDS_MeshEdge& e2);
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
private:
|
||||
SMDS_MeshNode* myNodes[2];
|
||||
const SMDS_MeshNode* myNodes[2];
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -45,7 +45,7 @@ ostream & operator <<(ostream & OS, const SMDS_MeshElement * ME)
|
||||
/// Create an iterator which iterate on nodes owned by the element.
|
||||
/// This method call elementsIterator().
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::nodesIterator() const
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::nodesIterator() const
|
||||
{
|
||||
return elementsIterator(SMDSAbs_Node);
|
||||
}
|
||||
@ -54,7 +54,7 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::nodesIterator() cons
|
||||
/// Create an iterator which iterate on edges linked with or owned by the element.
|
||||
/// This method call elementsIterator().
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::edgesIterator() const
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::edgesIterator() const
|
||||
{
|
||||
return elementsIterator(SMDSAbs_Edge);
|
||||
}
|
||||
@ -63,7 +63,7 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::edgesIterator() cons
|
||||
/// Create an iterator which iterate on faces linked with or owned by the element.
|
||||
/// This method call elementsIterator().
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::facesIterator() const
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::facesIterator() const
|
||||
{
|
||||
return elementsIterator(SMDSAbs_Face);
|
||||
}
|
||||
@ -74,13 +74,12 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::facesIterator() cons
|
||||
int SMDS_MeshElement::NbNodes() const
|
||||
{
|
||||
int nbnodes=0;
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * it=nodesIterator();
|
||||
SMDS_ElemIteratorPtr it=nodesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbnodes++;
|
||||
}
|
||||
delete it;
|
||||
return nbnodes;
|
||||
}
|
||||
|
||||
@ -90,13 +89,12 @@ int SMDS_MeshElement::NbNodes() const
|
||||
int SMDS_MeshElement::NbEdges() const
|
||||
{
|
||||
int nbedges=0;
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * it=edgesIterator();
|
||||
SMDS_ElemIteratorPtr it=edgesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbedges++;
|
||||
}
|
||||
delete it;
|
||||
return nbedges;
|
||||
}
|
||||
|
||||
@ -106,37 +104,27 @@ int SMDS_MeshElement::NbEdges() const
|
||||
int SMDS_MeshElement::NbFaces() const
|
||||
{
|
||||
int nbfaces=0;
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * it=facesIterator();
|
||||
SMDS_ElemIteratorPtr it=facesIterator();
|
||||
while(it->more())
|
||||
{
|
||||
it->next();
|
||||
nbfaces++;
|
||||
}
|
||||
delete it;
|
||||
return nbfaces;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///Create and iterator which iterate on elements linked with the current element.
|
||||
///The iterator must be free by the caller (call delete myIterator).
|
||||
///Create an iterator which iterate on elements linked with the current element.
|
||||
///@param type The of elements on which you want to iterate
|
||||
///@return An iterator, that you must free when you no longer need it
|
||||
///@return A smart pointer to iterator, you are not to take care of freeing memory
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
/** @todo Check that iterator in the child classes return elements
|
||||
in the same order for each different implementation (i.e: SMDS_VolumeOfNodes
|
||||
and SMDS_VolumeOfFaces */
|
||||
class MyIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
class SMDS_MeshElement_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
const SMDS_MeshElement * myElement;
|
||||
bool myMore;
|
||||
public:
|
||||
MyIterator(const SMDS_MeshElement * element):
|
||||
myElement(element),myMore(true)
|
||||
{
|
||||
}
|
||||
SMDS_MeshElement_MyIterator(const SMDS_MeshElement * element):
|
||||
myElement(element),myMore(true) {}
|
||||
|
||||
bool more()
|
||||
{
|
||||
@ -149,12 +137,19 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshElement::
|
||||
return myElement;
|
||||
}
|
||||
};
|
||||
SMDS_ElemIteratorPtr SMDS_MeshElement::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
/** @todo Check that iterator in the child classes return elements
|
||||
in the same order for each different implementation (i.e: SMDS_VolumeOfNodes
|
||||
and SMDS_VolumeOfFaces */
|
||||
|
||||
if(type==GetType()) return new MyIterator(this);
|
||||
if(type==GetType())
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshElement_MyIterator(this));
|
||||
else
|
||||
{
|
||||
MESSAGE("Iterator not implemented");
|
||||
return NULL;
|
||||
return SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "SMDS_Iterator.hxx"
|
||||
#include "SMDS_MeshElementIDFactory.hxx"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
@ -39,6 +40,10 @@ using namespace std;
|
||||
class SMDS_MeshNode;
|
||||
class SMDS_MeshEdge;
|
||||
class SMDS_MeshFace;
|
||||
class SMDS_MeshElement;
|
||||
|
||||
typedef SMDS_Iterator<const SMDS_MeshElement *> SMDS_ElemIterator;
|
||||
typedef boost::shared_ptr<SMDS_Iterator<const SMDS_MeshElement *> > SMDS_ElemIteratorPtr;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Base class for elements
|
||||
@ -47,10 +52,10 @@ class SMDS_MeshElement:public SMDS_MeshObject
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * nodesIterator() const;
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * edgesIterator() const;
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * facesIterator() const;
|
||||
virtual SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr nodesIterator() const;
|
||||
SMDS_ElemIteratorPtr edgesIterator() const;
|
||||
SMDS_ElemIteratorPtr facesIterator() const;
|
||||
virtual SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
virtual int NbNodes() const;
|
||||
|
@ -58,3 +58,27 @@ SMDS_MeshElement* SMDS_MeshElementIDFactory::MeshElement(int ID)
|
||||
map<int, SMDS_MeshElement*>::iterator it=myIDElements.find(ID);
|
||||
if(it==myIDElements.end()) return NULL; else return (*it).second;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : GetFreeID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
int SMDS_MeshElementIDFactory::GetFreeID()
|
||||
{
|
||||
int ID;
|
||||
do {
|
||||
ID = SMDS_MeshIDFactory::GetFreeID();
|
||||
} while (myIDElements.find(ID) != myIDElements.end());
|
||||
return ID;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReleaseID
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMDS_MeshElementIDFactory::ReleaseID(const int ID)
|
||||
{
|
||||
myIDElements.erase(ID);
|
||||
SMDS_MeshIDFactory::ReleaseID(ID);
|
||||
}
|
||||
|
@ -28,7 +28,6 @@
|
||||
#define _SMDS_MeshElementIDFactory_HeaderFile
|
||||
|
||||
#include "SMDS_MeshIDFactory.hxx"
|
||||
#include <SMDS_Iterator.hxx>
|
||||
|
||||
#include <map>
|
||||
using namespace std;
|
||||
@ -41,6 +40,8 @@ class SMDS_MeshElementIDFactory:public SMDS_MeshIDFactory
|
||||
SMDS_MeshElementIDFactory();
|
||||
bool BindID(int ID, SMDS_MeshElement * elem);
|
||||
SMDS_MeshElement * MeshElement(int ID);
|
||||
virtual int GetFreeID();
|
||||
virtual void ReleaseID(int ID);
|
||||
private:
|
||||
map<int, SMDS_MeshElement *> myIDElements;
|
||||
|
||||
|
@ -32,8 +32,9 @@ using namespace std;
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * aMesh)
|
||||
:myMesh(aMesh),myType(SMDSAbs_All), myParent(NULL)
|
||||
SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh,
|
||||
const SMDSAbs_ElementType theType)
|
||||
:myMesh(theMesh),myType(theType), myParent(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,8 +43,9 @@ SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * aMesh)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * parent)
|
||||
:myMesh(parent->myMesh),myType(SMDSAbs_All), myParent(parent)
|
||||
SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * theParent,
|
||||
const SMDSAbs_ElementType theType)
|
||||
:myMesh(theParent->myMesh),myType(theType), myParent(theParent)
|
||||
{
|
||||
}
|
||||
|
||||
@ -52,9 +54,10 @@ SMDS_MeshGroup::SMDS_MeshGroup(SMDS_MeshGroup * parent)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup()
|
||||
const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup
|
||||
(const SMDSAbs_ElementType theType)
|
||||
{
|
||||
const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this);
|
||||
const SMDS_MeshGroup * subgroup = new SMDS_MeshGroup(this,theType);
|
||||
myChildren.insert(myChildren.end(),subgroup);
|
||||
return subgroup;
|
||||
}
|
||||
@ -64,14 +67,14 @@ const SMDS_MeshGroup *SMDS_MeshGroup::AddSubGroup()
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * aGroup)
|
||||
bool SMDS_MeshGroup::RemoveSubGroup(const SMDS_MeshGroup * theGroup)
|
||||
{
|
||||
bool found = false;
|
||||
list<const SMDS_MeshGroup*>::iterator itgroup;
|
||||
for(itgroup=myChildren.begin(); itgroup!=myChildren.end(); itgroup++)
|
||||
{
|
||||
const SMDS_MeshGroup* subgroup=*itgroup;
|
||||
if (subgroup == aGroup)
|
||||
if (subgroup == theGroup)
|
||||
{
|
||||
found = true;
|
||||
myChildren.erase(itgroup);
|
||||
@ -106,39 +109,19 @@ void SMDS_MeshGroup::Clear()
|
||||
myType = SMDSAbs_All;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
bool SMDS_MeshGroup::IsEmpty() const
|
||||
{
|
||||
return myElements.empty();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Extent
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
int SMDS_MeshGroup::Extent() const
|
||||
{
|
||||
return myElements.size();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Add
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void SMDS_MeshGroup::Add(const SMDS_MeshElement * ME)
|
||||
void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
|
||||
{
|
||||
// the type of the group is determined by the first element added
|
||||
if (myElements.empty()) myType = ME->GetType();
|
||||
else if (ME->GetType() != myType)
|
||||
if (myElements.empty()) myType = theElem->GetType();
|
||||
else if (theElem->GetType() != myType)
|
||||
MESSAGE("SMDS_MeshGroup::Add : Type Mismatch");
|
||||
|
||||
myElements.insert(ME);
|
||||
myElements.insert(theElem);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -146,28 +129,29 @@ void SMDS_MeshGroup::Add(const SMDS_MeshElement * ME)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void SMDS_MeshGroup::Remove(const SMDS_MeshElement * ME)
|
||||
void SMDS_MeshGroup::Remove(const SMDS_MeshElement * theElem)
|
||||
{
|
||||
myElements.erase(ME);
|
||||
myElements.erase(theElem);
|
||||
if (myElements.empty()) myType = SMDSAbs_All;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Type
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMDSAbs_ElementType SMDS_MeshGroup::Type() const
|
||||
{
|
||||
return myType;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Contains
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * ME) const
|
||||
bool SMDS_MeshGroup::Contains(const SMDS_MeshElement * theElem) const
|
||||
{
|
||||
return myElements.find(ME)!=myElements.end();
|
||||
return myElements.find(theElem)!=myElements.end();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetType
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void SMDS_MeshGroup::SetType(const SMDSAbs_ElementType theType)
|
||||
{
|
||||
if (IsEmpty())
|
||||
myType = theType;
|
||||
}
|
||||
|
@ -33,25 +33,44 @@ using namespace std;
|
||||
class SMDS_MeshGroup:public SMDS_MeshObject
|
||||
{
|
||||
public:
|
||||
SMDS_MeshGroup(const SMDS_Mesh * aMesh);
|
||||
const SMDS_MeshGroup * AddSubGroup();
|
||||
virtual bool RemoveSubGroup(const SMDS_MeshGroup* aGroup);
|
||||
SMDS_MeshGroup(const SMDS_Mesh * theMesh,
|
||||
const SMDSAbs_ElementType theType = SMDSAbs_All);
|
||||
const SMDS_MeshGroup * AddSubGroup
|
||||
(const SMDSAbs_ElementType theType = SMDSAbs_All);
|
||||
virtual bool RemoveSubGroup(const SMDS_MeshGroup* theGroup);
|
||||
virtual bool RemoveFromParent();
|
||||
void Clear();
|
||||
void Add(const SMDS_MeshElement * ME);
|
||||
void Remove(const SMDS_MeshElement * ME);
|
||||
bool IsEmpty() const;
|
||||
int Extent() const;
|
||||
SMDSAbs_ElementType Type() const;
|
||||
bool Contains(const SMDS_MeshElement * ME) const;
|
||||
|
||||
~SMDS_MeshGroup();
|
||||
const SMDS_Mesh* GetMesh() const { return myMesh; }
|
||||
|
||||
void SetType (const SMDSAbs_ElementType theType);
|
||||
void Clear();
|
||||
void Add(const SMDS_MeshElement * theElem);
|
||||
void Remove(const SMDS_MeshElement * theElem);
|
||||
bool IsEmpty() const { return myElements.empty(); }
|
||||
int Extent() const { return myElements.size(); }
|
||||
|
||||
SMDSAbs_ElementType GetType() const { return myType; }
|
||||
|
||||
bool Contains(const SMDS_MeshElement * theElem) const;
|
||||
|
||||
void InitIterator() const
|
||||
{ const_cast<iterator&>(myIterator) = myElements.begin(); }
|
||||
|
||||
bool More() const { return myIterator != myElements.end(); }
|
||||
|
||||
const SMDS_MeshElement* Next() const
|
||||
{ return *(const_cast<iterator&>(myIterator))++; }
|
||||
|
||||
private:
|
||||
SMDS_MeshGroup(SMDS_MeshGroup* parent);
|
||||
SMDS_MeshGroup(SMDS_MeshGroup* theParent,
|
||||
const SMDSAbs_ElementType theType = SMDSAbs_All);
|
||||
|
||||
typedef set<const SMDS_MeshElement *>::iterator iterator;
|
||||
const SMDS_Mesh * myMesh;
|
||||
SMDSAbs_ElementType myType;
|
||||
set<const SMDS_MeshElement *> myElements;
|
||||
SMDS_MeshGroup * myParent;
|
||||
list<const SMDS_MeshGroup*> myChildren;
|
||||
iterator myIterator;
|
||||
};
|
||||
#endif
|
||||
|
@ -54,5 +54,5 @@ int SMDS_MeshIDFactory::GetFreeID()
|
||||
//=======================================================================
|
||||
void SMDS_MeshIDFactory::ReleaseID(const int ID)
|
||||
{
|
||||
if (ID < myMaxID) myPoolOfID.push(ID);
|
||||
if (ID > 0 && ID < myMaxID) myPoolOfID.push(ID);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ void SMDS_MeshNode::Print(ostream & OS) const
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void SMDS_MeshNode::SetPosition(SMDS_Position * aPos)
|
||||
void SMDS_MeshNode::SetPosition(const SMDS_PositionPtr& aPos)
|
||||
{
|
||||
myPosition = aPos;
|
||||
}
|
||||
@ -71,26 +71,18 @@ void SMDS_MeshNode::SetPosition(SMDS_Position * aPos)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
SMDS_Position *SMDS_MeshNode::GetPosition()
|
||||
const SMDS_PositionPtr& SMDS_MeshNode::GetPosition() const
|
||||
{
|
||||
return myPosition;
|
||||
}
|
||||
|
||||
const SMDS_Position *SMDS_MeshNode::GetPosition() const
|
||||
{
|
||||
return myPosition;
|
||||
}
|
||||
/**
|
||||
*/
|
||||
SMDS_Iterator<const SMDS_MeshElement*> * SMDS_MeshNode::
|
||||
GetInverseElementIterator() const
|
||||
{
|
||||
class SMDS_InverseElementIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
class SMDS_MeshNode_MyInvIterator:public SMDS_ElemIterator
|
||||
{
|
||||
const set<const SMDS_MeshElement*>& mySet;
|
||||
set<const SMDS_MeshElement*>::iterator myIterator;
|
||||
public:
|
||||
SMDS_InverseElementIterator(const set<const SMDS_MeshElement*>& s):mySet(s)
|
||||
SMDS_MeshNode_MyInvIterator(const set<const SMDS_MeshElement*>& s):
|
||||
mySet(s)
|
||||
{
|
||||
myIterator=mySet.begin();
|
||||
}
|
||||
@ -107,20 +99,21 @@ SMDS_Iterator<const SMDS_MeshElement*> * SMDS_MeshNode::
|
||||
return current;
|
||||
}
|
||||
};
|
||||
return new SMDS_InverseElementIterator(myInverseElements);
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
GetInverseElementIterator() const
|
||||
{
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(myInverseElements));
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshNode::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
// Same as GetInverseElementIterator but the create iterator only return
|
||||
// wanted type elements.
|
||||
class MyIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
class SMDS_MeshNode_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
set<const SMDS_MeshElement*> mySet;
|
||||
set<const SMDS_MeshElement*>::iterator myIterator;
|
||||
public:
|
||||
MyIterator(SMDSAbs_ElementType type,
|
||||
SMDS_MeshNode_MyIterator(SMDSAbs_ElementType type,
|
||||
const set<const SMDS_MeshElement*>& s)
|
||||
{
|
||||
const SMDS_MeshElement * e;
|
||||
@ -154,11 +147,16 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_MeshNode::
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
if(type==SMDSAbs_Node)
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Node);
|
||||
else
|
||||
return new SMDS_IteratorOfElements(this,type,
|
||||
new MyIterator(type, myInverseElements));
|
||||
return SMDS_ElemIteratorPtr
|
||||
(new SMDS_IteratorOfElements
|
||||
(this,type,
|
||||
SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyIterator(type, myInverseElements))));
|
||||
}
|
||||
|
||||
int SMDS_MeshNode::NbNodes() const
|
||||
|
@ -46,22 +46,21 @@ class SMDS_MeshNode:public SMDS_MeshElement
|
||||
void RemoveInverseElement(const SMDS_MeshElement * parent);
|
||||
void ClearInverseElements();
|
||||
bool emptyInverseElements();
|
||||
SMDS_Iterator<const SMDS_MeshElement*> * GetInverseElementIterator() const;
|
||||
void SetPosition(SMDS_Position * aPos);
|
||||
SMDS_Position *GetPosition();
|
||||
const SMDS_Position *GetPosition() const;
|
||||
SMDS_ElemIteratorPtr GetInverseElementIterator() const;
|
||||
void SetPosition(const SMDS_PositionPtr& aPos);
|
||||
const SMDS_PositionPtr& GetPosition() const;
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
int NbNodes() const;
|
||||
void setXYZ(double x, double y, double z);
|
||||
friend bool operator<(const SMDS_MeshNode& e1, const SMDS_MeshNode& e2);
|
||||
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
private:
|
||||
double myX, myY, myZ;
|
||||
SMDS_Position *myPosition;
|
||||
SMDS_PositionPtr myPosition;
|
||||
set<const SMDS_MeshElement*> myInverseElements;
|
||||
};
|
||||
|
||||
|
@ -30,5 +30,6 @@
|
||||
class SMDS_MeshObject
|
||||
{
|
||||
public:
|
||||
virtual ~SMDS_MeshObject() {}
|
||||
};
|
||||
#endif
|
||||
|
@ -28,6 +28,10 @@
|
||||
#define _SMDS_Position_HeaderFile
|
||||
|
||||
#include "SMDS_TypeOfPosition.hxx"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
class SMDS_Position;
|
||||
typedef boost::shared_ptr<SMDS_Position> SMDS_PositionPtr;
|
||||
|
||||
class SMDS_Position
|
||||
{
|
||||
@ -37,7 +41,7 @@ class SMDS_Position
|
||||
virtual inline SMDS_TypeOfPosition GetTypeOfPosition() const = 0;
|
||||
void SetShapeId(int aShapeId);
|
||||
int GetShapeId() const;
|
||||
~SMDS_Position();
|
||||
virtual ~SMDS_Position() {}
|
||||
|
||||
protected:
|
||||
SMDS_Position(int aShapeId);
|
||||
|
@ -52,8 +52,8 @@ const double * SMDS_SpacePosition::Coords() const
|
||||
return myCoords;
|
||||
}
|
||||
|
||||
SMDS_SpacePosition * SMDS_SpacePosition::originSpacePosition()
|
||||
SMDS_PositionPtr SMDS_SpacePosition::originSpacePosition()
|
||||
{
|
||||
static SMDS_SpacePosition * staticpos=new SMDS_SpacePosition();
|
||||
static SMDS_PositionPtr staticpos (new SMDS_SpacePosition());
|
||||
return staticpos;
|
||||
}
|
||||
|
@ -37,8 +37,7 @@ class SMDS_SpacePosition:public SMDS_Position
|
||||
const virtual double * Coords() const;
|
||||
virtual inline SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
inline void SetCoords(const double x, const double y, const double z);
|
||||
~SMDS_SpacePosition();
|
||||
static SMDS_SpacePosition * originSpacePosition();
|
||||
static SMDS_PositionPtr originSpacePosition();
|
||||
private:
|
||||
double myCoords[3];
|
||||
};
|
||||
|
@ -56,16 +56,13 @@ void SMDS_Tria3OfNodes::Print(ostream & OS) const
|
||||
OS << myNodes[i] << ") " << endl;
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_Tria3OfNodes::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
class MyIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
class SMDS_Tria3OfNodes_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
const SMDS_MeshNode * const* mySet;
|
||||
int index;
|
||||
public:
|
||||
MyIterator(const SMDS_MeshNode * const* s):mySet(s),index(0)
|
||||
{}
|
||||
SMDS_Tria3OfNodes_MyIterator(const SMDS_MeshNode * const* s):
|
||||
mySet(s),index(0) {}
|
||||
|
||||
bool more()
|
||||
{
|
||||
@ -79,19 +76,28 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_Tria3OfNodes::
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_Tria3OfNodes::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case SMDSAbs_Face:return SMDS_MeshElement::elementsIterator(SMDSAbs_Face);
|
||||
case SMDSAbs_Node:return new MyIterator(myNodes);
|
||||
case SMDSAbs_Face:
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Face);
|
||||
case SMDSAbs_Node:
|
||||
return SMDS_ElemIteratorPtr(new SMDS_Tria3OfNodes_MyIterator(myNodes));
|
||||
case SMDSAbs_Edge:
|
||||
MESSAGE("Error : edge iterator for SMDS_FaceOfNodes not implemented");
|
||||
break;
|
||||
default:return new SMDS_IteratorOfElements(this,type,new MyIterator(myNodes));
|
||||
default:
|
||||
return SMDS_ElemIteratorPtr
|
||||
(new SMDS_IteratorOfElements
|
||||
(this,type,SMDS_ElemIteratorPtr(new SMDS_Tria3OfNodes_MyIterator(myNodes))));
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Tria3OfNodes::SMDS_Tria3OfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
SMDS_MeshNode* node3)
|
||||
SMDS_Tria3OfNodes::SMDS_Tria3OfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3)
|
||||
{
|
||||
myNodes[0]=node1;
|
||||
myNodes[1]=node2;
|
||||
|
@ -31,14 +31,15 @@ class SMDS_Tria3OfNodes:public SMDS_MeshFace
|
||||
{
|
||||
public:
|
||||
void Print(ostream & OS) const;
|
||||
SMDS_Tria3OfNodes(SMDS_MeshNode* node1, SMDS_MeshNode* node2,
|
||||
SMDS_MeshNode* node3);
|
||||
SMDS_Tria3OfNodes(const SMDS_MeshNode* node1,
|
||||
const SMDS_MeshNode* node2,
|
||||
const SMDS_MeshNode* node3);
|
||||
|
||||
int NbEdges() const;
|
||||
int NbFaces() const;
|
||||
int NbNodes() const;
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
|
||||
private:
|
||||
|
@ -36,7 +36,6 @@ class SMDS_VertexPosition:public SMDS_Position
|
||||
SMDS_TypeOfPosition GetTypeOfPosition() const;
|
||||
SMDS_VertexPosition(int aVertexId=0);
|
||||
const double *Coords() const;
|
||||
~SMDS_VertexPosition();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -21,7 +21,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMDS_MeshVolume.cxx
|
||||
// File : SMDS_VolumeOfFaces.cxx
|
||||
// Author : Jean-Michel BOULCOURT
|
||||
// Module : SMESH
|
||||
|
||||
@ -46,16 +46,13 @@ int SMDS_VolumeOfFaces::NbFaces() const
|
||||
return myFaces.size();
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_VolumeOfFaces::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
class SMDS_VolumeOfFaces_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
class MyIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
{
|
||||
const vector<SMDS_MeshFace*>& mySet;
|
||||
const vector<const SMDS_MeshFace*>& mySet;
|
||||
int index;
|
||||
public:
|
||||
MyIterator(const vector<SMDS_MeshFace*>& s):mySet(s),index(0)
|
||||
{}
|
||||
SMDS_VolumeOfFaces_MyIterator(const vector<const SMDS_MeshFace*>& s):
|
||||
mySet(s),index(0) {}
|
||||
|
||||
bool more()
|
||||
{
|
||||
@ -69,16 +66,26 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_VolumeOfFaces::
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_VolumeOfFaces::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case SMDSAbs_Volume:return SMDS_MeshElement::elementsIterator(SMDSAbs_Volume);
|
||||
case SMDSAbs_Face:return new MyIterator(myFaces);
|
||||
default:return new SMDS_IteratorOfElements(this,type,new MyIterator(myFaces));
|
||||
case SMDSAbs_Volume:
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Volume);
|
||||
case SMDSAbs_Face:
|
||||
return SMDS_ElemIteratorPtr(new SMDS_VolumeOfFaces_MyIterator(myFaces));
|
||||
default:
|
||||
return SMDS_ElemIteratorPtr
|
||||
(new SMDS_IteratorOfElements
|
||||
(this,type,SMDS_ElemIteratorPtr(new SMDS_VolumeOfFaces_MyIterator(myFaces))));
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * face2,
|
||||
SMDS_MeshFace * face3, SMDS_MeshFace * face4)
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4)
|
||||
{
|
||||
myFaces.resize(4);
|
||||
myFaces[0]=face1;
|
||||
@ -87,9 +94,11 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * fa
|
||||
myFaces[3]=face4;
|
||||
}
|
||||
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * face2,
|
||||
SMDS_MeshFace * face3, SMDS_MeshFace * face4,
|
||||
SMDS_MeshFace * face5)
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4,
|
||||
const SMDS_MeshFace * face5)
|
||||
{
|
||||
myFaces.resize(5);
|
||||
myFaces[0]=face1;
|
||||
@ -99,9 +108,12 @@ SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * fa
|
||||
myFaces[4]=face5;
|
||||
}
|
||||
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * face2,
|
||||
SMDS_MeshFace * face3, SMDS_MeshFace * face4,
|
||||
SMDS_MeshFace * face5,SMDS_MeshFace * face6)
|
||||
SMDS_VolumeOfFaces::SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4,
|
||||
const SMDS_MeshFace * face5,
|
||||
const SMDS_MeshFace * face6)
|
||||
{
|
||||
myFaces.resize(6);
|
||||
myFaces[0]=face1;
|
||||
|
@ -21,7 +21,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
// File : SMDS_MeshVolume.hxx
|
||||
// File : SMDS_VolumeOfFaces.hxx
|
||||
// Module : SMESH
|
||||
|
||||
#ifndef _SMDS_VolumeOfFaces_HeaderFile
|
||||
@ -38,22 +38,29 @@ class SMDS_VolumeOfFaces:public SMDS_MeshVolume
|
||||
{
|
||||
|
||||
public:
|
||||
SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * face2,
|
||||
SMDS_MeshFace * face3, SMDS_MeshFace * face4);
|
||||
SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * face2,
|
||||
SMDS_MeshFace * face3, SMDS_MeshFace * face4,
|
||||
SMDS_MeshFace * face5);
|
||||
SMDS_VolumeOfFaces(SMDS_MeshFace * face1, SMDS_MeshFace * face2,
|
||||
SMDS_MeshFace * face3, SMDS_MeshFace * face4,
|
||||
SMDS_MeshFace * face5,SMDS_MeshFace * face6);
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4);
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4,
|
||||
const SMDS_MeshFace * face5);
|
||||
SMDS_VolumeOfFaces(const SMDS_MeshFace * face1,
|
||||
const SMDS_MeshFace * face2,
|
||||
const SMDS_MeshFace * face3,
|
||||
const SMDS_MeshFace * face4,
|
||||
const SMDS_MeshFace * face5,
|
||||
const SMDS_MeshFace * face6);
|
||||
|
||||
void Print(ostream & OS) const;
|
||||
|
||||
int NbFaces() const;
|
||||
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
vector<SMDS_MeshFace *> myFaces;
|
||||
vector<const SMDS_MeshFace *> myFaces;
|
||||
};
|
||||
#endif
|
||||
|
@ -28,14 +28,14 @@
|
||||
/// 5,1 and 7,3 are an edges.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5,
|
||||
SMDS_MeshNode * node6,
|
||||
SMDS_MeshNode * node7,
|
||||
SMDS_MeshNode * node8)
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6,
|
||||
const SMDS_MeshNode * node7,
|
||||
const SMDS_MeshNode * node8)
|
||||
{
|
||||
myNodes.resize(8);
|
||||
myNodes[0]=node1;
|
||||
@ -49,10 +49,10 @@ SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
|
||||
}
|
||||
|
||||
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4)
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4)
|
||||
{
|
||||
myNodes.resize(4);
|
||||
myNodes[0]=node1;
|
||||
@ -62,11 +62,11 @@ SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
|
||||
}
|
||||
|
||||
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5)
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5)
|
||||
{
|
||||
myNodes.resize(5);
|
||||
myNodes[0]=node1;
|
||||
@ -77,12 +77,12 @@ SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
|
||||
}
|
||||
|
||||
SMDS_VolumeOfNodes::SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5,
|
||||
SMDS_MeshNode * node6)
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6)
|
||||
{
|
||||
myNodes.resize(6);
|
||||
myNodes[0]=node1;
|
||||
@ -134,16 +134,13 @@ int SMDS_VolumeOfNodes::NbEdges() const
|
||||
}
|
||||
}
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshElement *> * SMDS_VolumeOfNodes::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
class MyIterator:public SMDS_Iterator<const SMDS_MeshElement*>
|
||||
class SMDS_VolumeOfNodes_MyIterator:public SMDS_ElemIterator
|
||||
{
|
||||
const vector<const SMDS_MeshNode*>& mySet;
|
||||
int index;
|
||||
public:
|
||||
MyIterator(const vector<const SMDS_MeshNode*>& s):mySet(s),index(0)
|
||||
{}
|
||||
SMDS_VolumeOfNodes_MyIterator(const vector<const SMDS_MeshNode*>& s):
|
||||
mySet(s),index(0) {}
|
||||
|
||||
bool more()
|
||||
{
|
||||
@ -156,11 +153,19 @@ SMDS_Iterator<const SMDS_MeshElement *> * SMDS_VolumeOfNodes::
|
||||
return mySet[index-1];
|
||||
}
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_VolumeOfNodes::
|
||||
elementsIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case SMDSAbs_Volume:return SMDS_MeshElement::elementsIterator(SMDSAbs_Volume);
|
||||
case SMDSAbs_Node:return new MyIterator(myNodes);
|
||||
default: MESSAGE("ERROR : Iterator not implemented");
|
||||
case SMDSAbs_Volume:
|
||||
return SMDS_MeshElement::elementsIterator(SMDSAbs_Volume);
|
||||
case SMDSAbs_Node:
|
||||
return SMDS_ElemIteratorPtr(new SMDS_VolumeOfNodes_MyIterator(myNodes));
|
||||
default:
|
||||
MESSAGE("ERROR : Iterator not implemented");
|
||||
return SMDS_ElemIteratorPtr((SMDS_ElemIterator*)NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,32 +36,32 @@ class SMDS_VolumeOfNodes:public SMDS_MeshVolume
|
||||
|
||||
public:
|
||||
SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4);
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4);
|
||||
SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5);
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5);
|
||||
SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5,
|
||||
SMDS_MeshNode * node6);
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6);
|
||||
SMDS_VolumeOfNodes(
|
||||
SMDS_MeshNode * node1,
|
||||
SMDS_MeshNode * node2,
|
||||
SMDS_MeshNode * node3,
|
||||
SMDS_MeshNode * node4,
|
||||
SMDS_MeshNode * node5,
|
||||
SMDS_MeshNode * node6,
|
||||
SMDS_MeshNode * node7,
|
||||
SMDS_MeshNode * node8);
|
||||
const SMDS_MeshNode * node1,
|
||||
const SMDS_MeshNode * node2,
|
||||
const SMDS_MeshNode * node3,
|
||||
const SMDS_MeshNode * node4,
|
||||
const SMDS_MeshNode * node5,
|
||||
const SMDS_MeshNode * node6,
|
||||
const SMDS_MeshNode * node7,
|
||||
const SMDS_MeshNode * node8);
|
||||
|
||||
void Print(ostream & OS) const;
|
||||
int NbFaces() const;
|
||||
@ -69,7 +69,7 @@ class SMDS_VolumeOfNodes:public SMDS_MeshVolume
|
||||
int NbEdges() const;
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
protected:
|
||||
SMDS_Iterator<const SMDS_MeshElement *> *
|
||||
SMDS_ElemIteratorPtr
|
||||
elementsIterator(SMDSAbs_ElementType type) const;
|
||||
vector<const SMDS_MeshNode *> myNodes;
|
||||
};
|
||||
|
@ -29,7 +29,7 @@
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=../..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl
|
||||
|
||||
|
||||
@COMMENCE@
|
||||
@ -40,22 +40,11 @@ EXPORT_HEADERS= \
|
||||
SMESH_Mesh.hxx \
|
||||
SMESH_subMesh.hxx \
|
||||
SMESH_Hypothesis.hxx \
|
||||
SMESH_HypothesisFactory.hxx \
|
||||
SMESH_Algo.hxx \
|
||||
SMESH_1D_Algo.hxx \
|
||||
SMESH_2D_Algo.hxx \
|
||||
SMESH_3D_Algo.hxx \
|
||||
SMESH_NumberOfSegments.hxx \
|
||||
SMESH_LocalLength.hxx \
|
||||
SMESH_LengthFromEdges.hxx \
|
||||
SMESH_MaxElementArea.hxx \
|
||||
SMESH_MaxElementVolume.hxx \
|
||||
SMESH_Regular_1D.hxx \
|
||||
SMESH_Quadrangle_2D.hxx \
|
||||
SMESH_MEFISTO_2D.hxx \
|
||||
SMESH_Hexa_3D.hxx \
|
||||
SMESH_NETGEN_3D.hxx \
|
||||
SMESH_HypothesisCreator.hxx
|
||||
SMESH_Group.hxx
|
||||
|
||||
EXPORT_PYSCRIPTS =
|
||||
|
||||
@ -65,20 +54,11 @@ LIB= libSMESHimpl.la
|
||||
|
||||
LIB_SRC = SMESH_Gen.cxx SMESH_Mesh.cxx SMESH_subMesh.cxx \
|
||||
SMESH_Hypothesis.cxx \
|
||||
SMESH_HypothesisFactory.cxx \
|
||||
SMESH_Algo.cxx \
|
||||
SMESH_1D_Algo.cxx \
|
||||
SMESH_2D_Algo.cxx \
|
||||
SMESH_3D_Algo.cxx \
|
||||
SMESH_NumberOfSegments.cxx \
|
||||
SMESH_LocalLength.cxx \
|
||||
SMESH_LengthFromEdges.cxx \
|
||||
SMESH_MaxElementArea.cxx \
|
||||
SMESH_MaxElementVolume.cxx \
|
||||
SMESH_Regular_1D.cxx \
|
||||
SMESH_Quadrangle_2D.cxx \
|
||||
SMESH_MEFISTO_2D.cxx \
|
||||
SMESH_Hexa_3D.cxx
|
||||
SMESH_Group.cxx
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
@ -89,20 +69,13 @@ BIN =
|
||||
BIN_SRC =
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS+= $(OCC_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CPPFLAGS+= $(OCC_INCLUDES) $(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome \
|
||||
$(BOOST_CPPFLAGS)
|
||||
CXXFLAGS+= $(OCC_CXXFLAGS) $(MED2_INCLUDES) $(HDF5_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
|
||||
#IDLCXXFLAGS+= -Wbtp
|
||||
|
||||
LDFLAGS+= $(HDF5_LIBS) $(MED2_LIBS) -lOpUtil -lSMESHDS -lSMDS -lMEFISTO2D -lMeshDriverDAT -lMeshDriverMED -lMeshDriverUNV -L${KERNEL_ROOT_DIR}/lib/salome
|
||||
|
||||
ifeq (@WITHNETGEN@,yes)
|
||||
LIB_SRC+= SMESH_NETGEN_3D.cxx
|
||||
NETGEN_INCLUDES=@NETGEN_INCLUDES@
|
||||
CPPFLAGS+= $(NETGEN_INCLUDES)
|
||||
CXXFLAGS+= $(NETGEN_INCLUDES)
|
||||
LDFLAGS+= -lNETGEN
|
||||
endif
|
||||
LDFLAGS+= $(HDF5_LIBS) $(MED2_LIBS) -lOpUtil -lSMESHDS -lSMDS -lMeshDriverDAT -lMeshDriverMED -lMeshDriverUNV -L${KERNEL_ROOT_DIR}/lib/salome
|
||||
|
||||
@CONCLUDE@
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_1D_Algo.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
@ -55,47 +54,3 @@ SMESH_1D_Algo::~SMESH_1D_Algo()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_1D_Algo::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_1D_Algo::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream& operator << (ostream & save, SMESH_1D_Algo & hyp)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream& operator >> (istream & load, SMESH_1D_Algo & hyp)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
|
@ -37,13 +37,6 @@ class SMESH_1D_Algo:
|
||||
public:
|
||||
SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_1D_Algo();
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream& operator << (ostream & save, SMESH_1D_Algo & hyp);
|
||||
friend istream& operator >> (istream & load, SMESH_1D_Algo & hyp);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -26,7 +26,6 @@
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_2D_Algo.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
@ -63,50 +62,6 @@ SMESH_2D_Algo::~SMESH_2D_Algo()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_2D_Algo::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_2D_Algo::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream& operator << (ostream & save, SMESH_2D_Algo & hyp)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream& operator >> (istream & load, SMESH_2D_Algo & hyp)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_2D_Algo::NumberOfWires(const TopoDS_Shape& S)
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -41,13 +41,6 @@ public:
|
||||
|
||||
int NumberOfWires(const TopoDS_Shape& S);
|
||||
int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream& operator << (ostream & save, SMESH_2D_Algo & hyp);
|
||||
friend istream& operator >> (istream & load, SMESH_2D_Algo & hyp);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -26,7 +26,6 @@
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_3D_Algo.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
@ -56,47 +55,3 @@ SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
|
||||
SMESH_3D_Algo::~SMESH_3D_Algo()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_3D_Algo::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_3D_Algo::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream& operator << (ostream & save, SMESH_3D_Algo & hyp)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream& operator >> (istream & load, SMESH_3D_Algo & hyp)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
@ -37,13 +37,6 @@ class SMESH_3D_Algo:
|
||||
public:
|
||||
SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_3D_Algo();
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream& operator << (ostream & save, SMESH_3D_Algo & hyp);
|
||||
friend istream& operator >> (istream & load, SMESH_3D_Algo & hyp);
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -26,7 +26,6 @@
|
||||
// Module : SMESH
|
||||
// $Header$
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
#include "SMESH_Algo.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
@ -39,6 +38,8 @@ using namespace std;
|
||||
#include "utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
@ -52,6 +53,8 @@ SMESH_Algo::SMESH_Algo(int hypId, int studyId,
|
||||
// _compatibleHypothesis.push_back("hypothese_bidon");
|
||||
_type = ALGO;
|
||||
gen->_mapAlgo[hypId] = this;
|
||||
|
||||
_onlyUnaryInput = _requireDescretBoundary = true;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -75,77 +78,6 @@ const vector < string > &SMESH_Algo::GetCompatibleHypothesis()
|
||||
return _compatibleHypothesis;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & SMESH_Algo::SaveTo(ostream & save)
|
||||
{
|
||||
return save << this;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & SMESH_Algo::LoadFrom(istream & load)
|
||||
{
|
||||
return load >> (*this);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & operator <<(ostream & save, SMESH_Algo & hyp)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & operator >>(istream & load, SMESH_Algo & hyp)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Algo::CheckHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape)
|
||||
{
|
||||
MESSAGE("SMESH_Algo::CheckHypothesis");
|
||||
ASSERT(0); // use method from derived classes
|
||||
return false;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Algo::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
||||
{
|
||||
MESSAGE("SMESH_Algo::Compute");
|
||||
ASSERT(0); // use method from derived classes
|
||||
return false;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* List the hypothesis used by the algorithm associated to the shape.
|
||||
@ -164,12 +96,21 @@ const list <const SMESHDS_Hypothesis *> & SMESH_Algo::GetUsedHypothesis(
|
||||
int nbHyp = _usedHypList.size();
|
||||
if (nbHyp == 0)
|
||||
{
|
||||
TopoDS_Shape mainShape = aMesh.GetMeshDS()->ShapeToMesh();
|
||||
if (!mainShape.IsSame(aShape))
|
||||
TopTools_ListIteratorOfListOfShape ancIt( aMesh.GetAncestors( aShape ));
|
||||
for (; ancIt.More(); ancIt.Next())
|
||||
{
|
||||
_usedHypList = GetAppliedHypothesis(aMesh, mainShape); // copy
|
||||
const TopoDS_Shape& ancestor = ancIt.Value();
|
||||
_usedHypList = GetAppliedHypothesis(aMesh, ancestor); // copy
|
||||
nbHyp = _usedHypList.size();
|
||||
if (nbHyp == 1)
|
||||
break;
|
||||
}
|
||||
// TopoDS_Shape mainShape = aMesh.GetMeshDS()->ShapeToMesh();
|
||||
// if (!mainShape.IsSame(aShape))
|
||||
// {
|
||||
// _usedHypList = GetAppliedHypothesis(aMesh, mainShape); // copy
|
||||
// nbHyp = _usedHypList.size();
|
||||
// }
|
||||
}
|
||||
if (nbHyp > 1)
|
||||
_usedHypList.clear(); //only one compatible hypothesis allowed
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
class SMESH_gen;
|
||||
class SMESH_Gen;
|
||||
class SMESH_Mesh;
|
||||
|
||||
class SMESH_Algo:public SMESH_Hypothesis
|
||||
@ -50,9 +50,10 @@ class SMESH_Algo:public SMESH_Hypothesis
|
||||
|
||||
const vector < string > &GetCompatibleHypothesis();
|
||||
virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
|
||||
const TopoDS_Shape & aShape);
|
||||
const TopoDS_Shape& aShape,
|
||||
SMESH_Hypothesis::Hypothesis_Status& aStatus) = 0;
|
||||
|
||||
virtual bool Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape);
|
||||
virtual bool Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape) = 0;
|
||||
|
||||
virtual const list <const SMESHDS_Hypothesis *> &
|
||||
GetUsedHypothesis(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape);
|
||||
@ -62,12 +63,26 @@ class SMESH_Algo:public SMESH_Hypothesis
|
||||
|
||||
static double EdgeLength(const TopoDS_Edge & E);
|
||||
|
||||
virtual ostream & SaveTo(ostream & save);
|
||||
virtual istream & LoadFrom(istream & load);
|
||||
friend ostream & operator <<(ostream & save, SMESH_Algo & hyp);
|
||||
friend istream & operator >>(istream & load, SMESH_Algo & hyp);
|
||||
public:
|
||||
// algo features
|
||||
|
||||
// SMESH_Hypothesis::GetDim();
|
||||
// 1 - dimention of target mesh
|
||||
|
||||
bool OnlyUnaryInput() const { return _onlyUnaryInput; }
|
||||
// 2 - is collection of tesselatable shapes inacceptable as input;
|
||||
// "collection" means a shape containing shapes of dim equal
|
||||
// to GetDim().
|
||||
// Algo which can process a collection shape should expect
|
||||
// an input temporary shape that is neither MainShape nor
|
||||
// its child.
|
||||
|
||||
bool NeedDescretBoundary() const { return _requireDescretBoundary; }
|
||||
// 3 - is a Dim-1 mesh prerequisite
|
||||
|
||||
protected:
|
||||
bool _onlyUnaryInput;
|
||||
bool _requireDescretBoundary;
|
||||
vector<string> _compatibleHypothesis;
|
||||
list<const SMESHDS_Hypothesis *> _appliedHypList;
|
||||
list<const SMESHDS_Hypothesis *> _usedHypList;
|
||||
|
@ -31,12 +31,16 @@
|
||||
#include "SMDS_MeshElement.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
|
||||
#include "utilities.h"
|
||||
#include "OpUtil.hxx"
|
||||
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include "Utils_ExceptHandlers.hxx"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* default constructor:
|
||||
@ -47,7 +51,7 @@ SMESH_Gen::SMESH_Gen()
|
||||
{
|
||||
MESSAGE("SMESH_Gen::SMESH_Gen");
|
||||
_localId = 0;
|
||||
_hypothesisFactory.SetGen(this);
|
||||
_hypId = 0;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -67,7 +71,7 @@ SMESH_Gen::~SMESH_Gen()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Hypothesis *SMESH_Gen::CreateHypothesis(const char *anHyp, int studyId)
|
||||
/*SMESH_Hypothesis *SMESH_Gen::CreateHypothesis(const char *anHyp, int studyId)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
|
||||
@ -88,7 +92,7 @@ SMESH_Hypothesis *SMESH_Gen::CreateHypothesis(const char *anHyp, int studyId)
|
||||
|
||||
myStudyContext->myDocument->AddHypothesis(myHypothesis);
|
||||
return myHypothesis;
|
||||
}
|
||||
}*/
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
@ -96,10 +100,11 @@ SMESH_Hypothesis *SMESH_Gen::CreateHypothesis(const char *anHyp, int studyId)
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Mesh *SMESH_Gen::Init(int studyId, const TopoDS_Shape & aShape)
|
||||
SMESH_Mesh* SMESH_Gen::CreateMesh(int studyId)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
MESSAGE("SMESH_Gen::Init");
|
||||
Unexpect aCatch(SalomeException);
|
||||
MESSAGE("SMESH_Gen::CreateMesh");
|
||||
// if (aShape.ShapeType() == TopAbs_COMPOUND)
|
||||
// {
|
||||
// INFOS("Mesh Compound not yet implemented!");
|
||||
@ -120,7 +125,7 @@ throw(SALOME_Exception)
|
||||
|
||||
// associate a TopoDS_Shape to the mesh
|
||||
|
||||
mesh->ShapeToMesh(aShape);
|
||||
//mesh->ShapeToMesh(aShape);
|
||||
return mesh;
|
||||
}
|
||||
|
||||
@ -131,7 +136,6 @@ throw(SALOME_Exception)
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
MESSAGE("SMESH_Gen::Compute");
|
||||
// bool isDone = false;
|
||||
@ -153,16 +157,62 @@ Solid, Collection de Solid : 3D
|
||||
|
||||
bool ret = true;
|
||||
|
||||
if ( !CheckAlgoState( aMesh, aShape ))
|
||||
{
|
||||
INFOS( "ABORT MESHING: some algos or hypothesis are missing");
|
||||
return false;
|
||||
}
|
||||
|
||||
SMESH_subMesh *sm = aMesh.GetSubMesh(aShape);
|
||||
// SCRUTE(sm);
|
||||
SMESH_subMesh *smToCompute = sm->GetFirstToCompute();
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// apply algos that do not require descretized boundaries, starting
|
||||
// from the most complex shapes
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
// map containing all subshapes in the order: vertices, edges, faces...
|
||||
const map<int, SMESH_subMesh*>& smMap = sm->DependsOn();
|
||||
map<int, SMESH_subMesh*>::const_reverse_iterator revItSub = smMap.rbegin();
|
||||
|
||||
SMESH_subMesh* smToCompute = sm;
|
||||
while ( smToCompute )
|
||||
{
|
||||
const TopoDS_Shape& aSubShape = smToCompute->GetSubShape();
|
||||
if ( GetShapeDim( aSubShape ) < 1 ) break;
|
||||
|
||||
SMESH_Algo* algo = GetAlgo( aMesh, aSubShape );
|
||||
if (algo &&
|
||||
!algo->NeedDescretBoundary() &&
|
||||
smToCompute->GetComputeState() == SMESH_subMesh::READY_TO_COMPUTE )
|
||||
{
|
||||
ret = smToCompute->ComputeStateEngine( SMESH_subMesh::COMPUTE );
|
||||
}
|
||||
if (!ret)
|
||||
return false;
|
||||
|
||||
// next subMesh
|
||||
if (revItSub != smMap.rend())
|
||||
{
|
||||
smToCompute = (*revItSub).second;
|
||||
revItSub++;
|
||||
}
|
||||
else
|
||||
smToCompute = 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------
|
||||
// mesh the rest subshapes starting from vertices
|
||||
// -----------------------------------------------
|
||||
|
||||
smToCompute = sm->GetFirstToCompute();
|
||||
while (smToCompute)
|
||||
{
|
||||
TopoDS_Shape subShape = smToCompute->GetSubShape();
|
||||
int dim = GetShapeDim(subShape);
|
||||
//SCRUTE(dim);
|
||||
if (dim > 0)
|
||||
{
|
||||
//MESSAGE ( "MESH shape id=" << smToCompute->GetId() <<
|
||||
// " type=" << smToCompute->GetSubShape().ShapeType());
|
||||
bool ret1 = smToCompute->ComputeStateEngine(SMESH_subMesh::COMPUTE);
|
||||
ret = ret && ret1;
|
||||
}
|
||||
@ -175,17 +225,400 @@ Solid, Collection de Solid : 3D
|
||||
SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
//MESSAGE("point "<<nodeId<<" "<<P1.X()<<" "<<P1.Y()<<" "<<P1.Z());
|
||||
SMDS_MeshNode * node = meshDS->AddNode(P1.X(), P1.Y(), P1.Z());
|
||||
if ( node ) { // san - increase robustness
|
||||
meshDS->SetNodeOnVertex(node, V1);
|
||||
smToCompute->GetSubMeshDS();
|
||||
smToCompute->_vertexSet = true;
|
||||
smToCompute->ComputeStateEngine(SMESH_subMesh::COMPUTE);
|
||||
}
|
||||
}
|
||||
smToCompute = sm->GetFirstToCompute();
|
||||
}
|
||||
|
||||
MESSAGE( "VSR - SMESH_Gen::Compute() finished" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : checkConformIgnoredAlgos
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
static bool checkConformIgnoredAlgos(SMESH_Mesh& aMesh,
|
||||
SMESH_subMesh* aSubMesh,
|
||||
const SMESH_Algo* aGlobIgnoAlgo,
|
||||
const SMESH_Algo* aLocIgnoAlgo,
|
||||
bool & checkConform,
|
||||
map<int, SMESH_subMesh*>& aCheckedMap)
|
||||
{
|
||||
ASSERT( aSubMesh );
|
||||
if ( aSubMesh->GetSubShape().ShapeType() == TopAbs_VERTEX)
|
||||
return true;
|
||||
|
||||
|
||||
bool ret = true;
|
||||
|
||||
const list<const SMESHDS_Hypothesis*>& listHyp =
|
||||
aMesh.GetMeshDS()->GetHypothesis( aSubMesh->GetSubShape() );
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
for ( ; it != listHyp.end(); it++)
|
||||
{
|
||||
const SMESHDS_Hypothesis * aHyp = *it;
|
||||
if (aHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
continue;
|
||||
|
||||
const SMESH_Algo* algo = dynamic_cast<const SMESH_Algo*> (aHyp);
|
||||
ASSERT ( algo );
|
||||
|
||||
if ( aLocIgnoAlgo ) // algo is hidden by a local algo of upper dim
|
||||
{
|
||||
INFOS( "Local <" << algo->GetName() << "> is hidden by local <"
|
||||
<< aLocIgnoAlgo->GetName() << ">");
|
||||
}
|
||||
else
|
||||
{
|
||||
bool isGlobal = (aMesh.IsMainShape( aSubMesh->GetSubShape() ));
|
||||
int dim = algo->GetDim();
|
||||
int aMaxGlobIgnoDim = ( aGlobIgnoAlgo ? aGlobIgnoAlgo->GetDim() : -1 );
|
||||
|
||||
if ( dim < aMaxGlobIgnoDim )
|
||||
{
|
||||
// algo is hidden by a global algo
|
||||
INFOS( ( isGlobal ? "Global" : "Local" )
|
||||
<< " <" << algo->GetName() << "> is hidden by global <"
|
||||
<< aGlobIgnoAlgo->GetName() << ">");
|
||||
}
|
||||
else if ( !algo->NeedDescretBoundary() && !isGlobal)
|
||||
{
|
||||
// local algo is not hidden and hides algos on sub-shapes
|
||||
if (checkConform && !aSubMesh->IsConform( algo ))
|
||||
{
|
||||
ret = false;
|
||||
checkConform = false; // no more check conformity
|
||||
INFOS( "ERROR: Local <" << algo->GetName() <<
|
||||
"> would produce not conform mesh: "
|
||||
"<Not Conform Mesh Allowed> hypotesis is missing");
|
||||
}
|
||||
|
||||
// sub-algos will be hidden by a local <algo>
|
||||
const map<int, SMESH_subMesh*>& smMap = aSubMesh->DependsOn();
|
||||
map<int, SMESH_subMesh*>::const_reverse_iterator revItSub;
|
||||
bool checkConform2 = false;
|
||||
for ( revItSub = smMap.rbegin(); revItSub != smMap.rend(); revItSub++)
|
||||
{
|
||||
checkConformIgnoredAlgos (aMesh, (*revItSub).second, aGlobIgnoAlgo,
|
||||
algo, checkConform2, aCheckedMap);
|
||||
int key = (*revItSub).first;
|
||||
SMESH_subMesh* sm = (*revItSub).second;
|
||||
if ( aCheckedMap.find( key ) == aCheckedMap.end() )
|
||||
{
|
||||
aCheckedMap[ key ] = sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : checkMissing
|
||||
//purpose : notify on missing hypothesis
|
||||
// Return false if algo or hipothesis is missing
|
||||
//=======================================================================
|
||||
|
||||
static bool checkMissing(SMESH_Gen* aGen,
|
||||
SMESH_Mesh& aMesh,
|
||||
SMESH_subMesh* aSubMesh,
|
||||
const int aTopAlgoDim,
|
||||
bool* globalChecked,
|
||||
const bool checkNoAlgo,
|
||||
map<int, SMESH_subMesh*>& aCheckedMap)
|
||||
{
|
||||
if ( aSubMesh->GetSubShape().ShapeType() == TopAbs_VERTEX)
|
||||
return true;
|
||||
|
||||
//MESSAGE("=====checkMissing");
|
||||
|
||||
int ret = true;
|
||||
SMESH_Algo* algo = 0;
|
||||
|
||||
switch (aSubMesh->GetAlgoState())
|
||||
{
|
||||
case SMESH_subMesh::NO_ALGO: {
|
||||
if (checkNoAlgo)
|
||||
{
|
||||
// should there be any algo?
|
||||
int shapeDim = SMESH_Gen::GetShapeDim( aSubMesh->GetSubShape() );
|
||||
if (aTopAlgoDim > shapeDim)
|
||||
{
|
||||
INFOS( "ERROR: " << shapeDim << "D algorithm is missing" );
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
case SMESH_subMesh::MISSING_HYP: {
|
||||
// notify if an algo missing hyp is attached to aSubMesh
|
||||
algo = aGen->GetAlgo( aMesh, aSubMesh->GetSubShape() );
|
||||
ASSERT( algo );
|
||||
bool isGlobalAlgo = aGen->IsGlobalAlgo( algo, aMesh );
|
||||
if (!isGlobalAlgo || !globalChecked[ algo->GetDim() ])
|
||||
{
|
||||
INFOS( "ERROR: " << (isGlobalAlgo ? "Global " : "Local ")
|
||||
<< "<" << algo->GetName() << "> misses some hypothesis");
|
||||
if (isGlobalAlgo)
|
||||
globalChecked[ algo->GetDim() ] = true;
|
||||
}
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
case SMESH_subMesh::HYP_OK:
|
||||
algo = aGen->GetAlgo( aMesh, aSubMesh->GetSubShape() );
|
||||
ret = true;
|
||||
break;
|
||||
default: ASSERT(0);
|
||||
}
|
||||
|
||||
// do not check under algo that hides sub-algos or
|
||||
// re-start checking NO_ALGO state
|
||||
ASSERT (algo);
|
||||
bool isTopLocalAlgo =
|
||||
( aTopAlgoDim <= algo->GetDim() && !aGen->IsGlobalAlgo( algo, aMesh ));
|
||||
if (!algo->NeedDescretBoundary() || isTopLocalAlgo)
|
||||
{
|
||||
bool checkNoAlgo2 = ( algo->NeedDescretBoundary() );
|
||||
const map<int, SMESH_subMesh*>& subMeshes = aSubMesh->DependsOn();
|
||||
map<int, SMESH_subMesh*>::const_iterator itsub;
|
||||
for (itsub = subMeshes.begin(); itsub != subMeshes.end(); itsub++)
|
||||
{
|
||||
// sub-meshes should not be checked further more
|
||||
int key = (*itsub).first;
|
||||
SMESH_subMesh* sm = (*itsub).second;
|
||||
if ( aCheckedMap.find( key ) == aCheckedMap.end() )
|
||||
aCheckedMap[ key ] = sm;
|
||||
|
||||
if (isTopLocalAlgo)
|
||||
{
|
||||
//check algo on sub-meshes
|
||||
int aTopAlgoDim2 = algo->GetDim();
|
||||
if (!checkMissing (aGen, aMesh, sm, aTopAlgoDim2,
|
||||
globalChecked, checkNoAlgo2, aCheckedMap))
|
||||
{
|
||||
ret = false;
|
||||
if (sm->GetAlgoState() == SMESH_subMesh::NO_ALGO )
|
||||
checkNoAlgo2 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CheckAlgoState
|
||||
//purpose : notify on bad state of attached algos, return false
|
||||
// if Compute() would fail because of some algo bad state
|
||||
//=======================================================================
|
||||
|
||||
bool SMESH_Gen::CheckAlgoState(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape)
|
||||
{
|
||||
//MESSAGE("SMESH_Gen::CheckAlgoState");
|
||||
|
||||
bool ret = true;
|
||||
bool hasAlgo = false;
|
||||
|
||||
SMESH_subMesh* sm = aMesh.GetSubMesh(aShape);
|
||||
const SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
TopoDS_Shape mainShape = meshDS->ShapeToMesh();
|
||||
|
||||
// -----------------
|
||||
// get global algos
|
||||
// -----------------
|
||||
|
||||
const SMESH_Algo* aGlobAlgoArr[] = {0,0,0,0};
|
||||
|
||||
const list<const SMESHDS_Hypothesis*>& listHyp = meshDS->GetHypothesis( mainShape );
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
for ( ; it != listHyp.end(); it++)
|
||||
{
|
||||
const SMESHDS_Hypothesis * aHyp = *it;
|
||||
if (aHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
continue;
|
||||
|
||||
const SMESH_Algo* algo = dynamic_cast<const SMESH_Algo*> (aHyp);
|
||||
ASSERT ( algo );
|
||||
|
||||
int dim = algo->GetDim();
|
||||
aGlobAlgoArr[ dim ] = algo;
|
||||
|
||||
hasAlgo = true;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------
|
||||
// info on algos that will be ignored because of ones that
|
||||
// don't NeedDescretBoundary() attached to super-shapes,
|
||||
// check that a conform mesh will be produced
|
||||
// --------------------------------------------------------
|
||||
|
||||
|
||||
// find a global algo possibly hidding sub-algos
|
||||
int dim;
|
||||
const SMESH_Algo* aGlobIgnoAlgo = 0;
|
||||
for (dim = 3; dim > 0; dim--)
|
||||
{
|
||||
if (aGlobAlgoArr[ dim ] &&
|
||||
!aGlobAlgoArr[ dim ]->NeedDescretBoundary())
|
||||
{
|
||||
aGlobIgnoAlgo = aGlobAlgoArr[ dim ];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const map<int, SMESH_subMesh*>& smMap = sm->DependsOn();
|
||||
map<int, SMESH_subMesh*>::const_reverse_iterator revItSub = smMap.rbegin();
|
||||
map<int, SMESH_subMesh*> aCheckedMap;
|
||||
bool checkConform = ( !aMesh.IsNotConformAllowed() );
|
||||
int aKey = 1;
|
||||
SMESH_subMesh* smToCheck = sm;
|
||||
|
||||
// loop on aShape and its sub-shapes
|
||||
while ( smToCheck )
|
||||
{
|
||||
if ( smToCheck->GetSubShape().ShapeType() == TopAbs_VERTEX)
|
||||
break;
|
||||
|
||||
if ( aCheckedMap.find( aKey ) == aCheckedMap.end() )
|
||||
if (!checkConformIgnoredAlgos (aMesh, smToCheck, aGlobIgnoAlgo,
|
||||
0, checkConform, aCheckedMap))
|
||||
ret = false;
|
||||
|
||||
if ( smToCheck->GetAlgoState() != SMESH_subMesh::NO_ALGO )
|
||||
hasAlgo = true;
|
||||
|
||||
// next subMesh
|
||||
if (revItSub != smMap.rend())
|
||||
{
|
||||
aKey = (*revItSub).first;
|
||||
smToCheck = (*revItSub).second;
|
||||
revItSub++;
|
||||
}
|
||||
else
|
||||
{
|
||||
smToCheck = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// info on missing hypothesis and find out if all needed algos are
|
||||
// well defined
|
||||
// ----------------------------------------------------------------
|
||||
|
||||
//MESSAGE( "---info on missing hypothesis and find out if all needed algos are");
|
||||
|
||||
// find max dim of global algo
|
||||
int aTopAlgoDim = 0;
|
||||
for (dim = 3; dim > 0; dim--)
|
||||
{
|
||||
if (aGlobAlgoArr[ dim ])
|
||||
{
|
||||
aTopAlgoDim = dim;
|
||||
break;
|
||||
}
|
||||
}
|
||||
aCheckedMap.clear();
|
||||
smToCheck = sm;
|
||||
revItSub = smMap.rbegin();
|
||||
bool checkNoAlgo = (bool) aTopAlgoDim;
|
||||
bool globalChecked[] = { false, false, false, false };
|
||||
|
||||
// loop on aShape and its sub-shapes
|
||||
while ( smToCheck )
|
||||
{
|
||||
if ( smToCheck->GetSubShape().ShapeType() == TopAbs_VERTEX)
|
||||
break;
|
||||
|
||||
if ( aCheckedMap.find( aKey ) == aCheckedMap.end() )
|
||||
if (!checkMissing (this, aMesh, smToCheck, aTopAlgoDim,
|
||||
globalChecked, checkNoAlgo, aCheckedMap))
|
||||
{
|
||||
ret = false;
|
||||
if (smToCheck->GetAlgoState() == SMESH_subMesh::NO_ALGO )
|
||||
checkNoAlgo = false;
|
||||
}
|
||||
|
||||
// next subMesh
|
||||
if (revItSub != smMap.rend())
|
||||
{
|
||||
aKey = (*revItSub).first;
|
||||
smToCheck = (*revItSub).second;
|
||||
revItSub++;
|
||||
}
|
||||
else
|
||||
smToCheck = 0;
|
||||
}
|
||||
|
||||
if ( !hasAlgo )
|
||||
INFOS( "None algorithm attached" );
|
||||
|
||||
return ( ret && hasAlgo );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsGlobalAlgo
|
||||
//purpose : check if theAlgo is attached to the main shape
|
||||
//=======================================================================
|
||||
|
||||
bool SMESH_Gen::IsGlobalAlgo(const SMESH_Algo* theAlgo, SMESH_Mesh& aMesh)
|
||||
{
|
||||
const SMESHDS_Mesh* meshDS = aMesh.GetMeshDS();
|
||||
TopoDS_Shape mainShape = meshDS->ShapeToMesh();
|
||||
const list<const SMESHDS_Hypothesis*>& listHyp = meshDS->GetHypothesis( mainShape );
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
for ( ; it != listHyp.end(); it++)
|
||||
if ( *it == theAlgo )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : getAlgoId
|
||||
//purpose : return algo ID or -1 if not found
|
||||
//=======================================================================
|
||||
|
||||
static int getAlgo(const list<const SMESHDS_Hypothesis*>& theHypList,
|
||||
const int theAlgoDim,
|
||||
const int theAlgoShapeType)
|
||||
{
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator it = theHypList.begin();
|
||||
|
||||
int nb_algo = 0;
|
||||
int algo_id = -1;
|
||||
|
||||
while (it!=theHypList.end())
|
||||
{
|
||||
const SMESH_Hypothesis *anHyp = static_cast< const SMESH_Hypothesis *>( *it );
|
||||
if (anHyp->GetType() > SMESHDS_Hypothesis::PARAM_ALGO &&
|
||||
anHyp->GetDim() == theAlgoDim &&
|
||||
((anHyp->GetShapeType()) & (1 << theAlgoShapeType)))
|
||||
{
|
||||
nb_algo++;
|
||||
algo_id = anHyp->GetID();
|
||||
break;
|
||||
}
|
||||
|
||||
//if (nb_algo > 1) return -1; // more than one algo
|
||||
it++;
|
||||
}
|
||||
|
||||
return algo_id;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -196,86 +629,111 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
||||
{
|
||||
// MESSAGE("SMESH_Gen::GetAlgo");
|
||||
|
||||
const SMESHDS_Hypothesis *theHyp = NULL;
|
||||
SMESH_Algo *algo = NULL;
|
||||
const SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
int hypType;
|
||||
int hypId;
|
||||
int algoDim;
|
||||
int dim = GetShapeDim( aShape );
|
||||
int shape_type = aShape.ShapeType();
|
||||
int algo_id = -1;
|
||||
|
||||
// try shape first, then main shape
|
||||
algo_id = getAlgo( meshDS->GetHypothesis( aShape ), dim, shape_type );
|
||||
|
||||
TopoDS_Shape mainShape = meshDS->ShapeToMesh();
|
||||
const TopoDS_Shape *shapeToTry[2] = { &aShape, &mainShape };
|
||||
|
||||
for (int iShape = 0; iShape < 2; iShape++)
|
||||
if (algo_id < 0)
|
||||
{
|
||||
TopoDS_Shape tryShape = (*shapeToTry[iShape]);
|
||||
|
||||
const list<const SMESHDS_Hypothesis*>& listHyp =
|
||||
meshDS->GetHypothesis(tryShape);
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
|
||||
int nb_algo = 0;
|
||||
int shapeDim = GetShapeDim(aShape);
|
||||
int typeOfShape = aShape.ShapeType();
|
||||
|
||||
while (it!=listHyp.end())
|
||||
// try ansestors
|
||||
TopTools_ListIteratorOfListOfShape ancIt( aMesh.GetAncestors( aShape ));
|
||||
for (; ancIt.More(); ancIt.Next())
|
||||
{
|
||||
const SMESHDS_Hypothesis *anHyp = *it;
|
||||
hypType = anHyp->GetType();
|
||||
//SCRUTE(hypType);
|
||||
if (hypType > SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
{
|
||||
switch (hypType)
|
||||
{
|
||||
case SMESHDS_Hypothesis::ALGO_1D:
|
||||
algoDim = 1;
|
||||
break;
|
||||
case SMESHDS_Hypothesis::ALGO_2D:
|
||||
algoDim = 2;
|
||||
break;
|
||||
case SMESHDS_Hypothesis::ALGO_3D:
|
||||
algoDim = 3;
|
||||
break;
|
||||
default:
|
||||
algoDim = 0;
|
||||
const TopoDS_Shape& ancestor = ancIt.Value();
|
||||
algo_id = getAlgo( meshDS->GetHypothesis( ancestor ), dim, shape_type );
|
||||
if ( algo_id >= 0 )
|
||||
break;
|
||||
}
|
||||
//SCRUTE(algoDim);
|
||||
//SCRUTE(shapeDim);
|
||||
//SCRUTE(typeOfShape);
|
||||
if (shapeDim == algoDim) // count only algos of shape dim.
|
||||
{ // discard algos for subshapes
|
||||
hypId = anHyp->GetID(); // (of lower dim.)
|
||||
ASSERT(_mapAlgo.find(hypId) != _mapAlgo.end());
|
||||
SMESH_Algo *anAlgo = _mapAlgo[hypId];
|
||||
//SCRUTE(anAlgo->GetShapeType());
|
||||
//if (anAlgo->GetShapeType() == typeOfShape)
|
||||
if ((anAlgo->GetShapeType()) & (1 << typeOfShape))
|
||||
{ // only specific TopoDS_Shape
|
||||
nb_algo++;
|
||||
theHyp = anHyp;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nb_algo > 1) return NULL; // more than one algo
|
||||
it++;
|
||||
}
|
||||
if (nb_algo == 1) // one algo found : OK
|
||||
break; // do not try a parent shape
|
||||
if (algo_id < 0) return NULL;
|
||||
}
|
||||
|
||||
if (!theHyp)
|
||||
return NULL; // no algo found
|
||||
ASSERT(_mapAlgo.find(algo_id) != _mapAlgo.end());
|
||||
|
||||
hypType = theHyp->GetType();
|
||||
hypId = theHyp->GetID();
|
||||
return _mapAlgo[algo_id];
|
||||
|
||||
ASSERT(_mapAlgo.find(hypId) != _mapAlgo.end());
|
||||
algo = _mapAlgo[hypId];
|
||||
//MESSAGE("Algo found " << algo->GetName() << " Id " << hypId);
|
||||
return algo;
|
||||
// const SMESHDS_Hypothesis *theHyp = NULL;
|
||||
// SMESH_Algo *algo = NULL;
|
||||
// const SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
|
||||
// int hypType;
|
||||
// int hypId;
|
||||
// int algoDim;
|
||||
|
||||
// // try shape first, then main shape
|
||||
|
||||
// TopoDS_Shape mainShape = meshDS->ShapeToMesh();
|
||||
// const TopoDS_Shape *shapeToTry[2] = { &aShape, &mainShape };
|
||||
|
||||
// for (int iShape = 0; iShape < 2; iShape++)
|
||||
// {
|
||||
// TopoDS_Shape tryShape = (*shapeToTry[iShape]);
|
||||
|
||||
// const list<const SMESHDS_Hypothesis*>& listHyp =
|
||||
// meshDS->GetHypothesis(tryShape);
|
||||
// list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
|
||||
// int nb_algo = 0;
|
||||
// int shapeDim = GetShapeDim(aShape);
|
||||
// int typeOfShape = aShape.ShapeType();
|
||||
|
||||
// while (it!=listHyp.end())
|
||||
// {
|
||||
// const SMESHDS_Hypothesis *anHyp = *it;
|
||||
// hypType = anHyp->GetType();
|
||||
// //SCRUTE(hypType);
|
||||
// if (hypType > SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
// {
|
||||
// switch (hypType)
|
||||
// {
|
||||
// case SMESHDS_Hypothesis::ALGO_1D:
|
||||
// algoDim = 1;
|
||||
// break;
|
||||
// case SMESHDS_Hypothesis::ALGO_2D:
|
||||
// algoDim = 2;
|
||||
// break;
|
||||
// case SMESHDS_Hypothesis::ALGO_3D:
|
||||
// algoDim = 3;
|
||||
// break;
|
||||
// default:
|
||||
// algoDim = 0;
|
||||
// break;
|
||||
// }
|
||||
// //SCRUTE(algoDim);
|
||||
// //SCRUTE(shapeDim);
|
||||
// //SCRUTE(typeOfShape);
|
||||
// if (shapeDim == algoDim) // count only algos of shape dim.
|
||||
// { // discard algos for subshapes
|
||||
// hypId = anHyp->GetID(); // (of lower dim.)
|
||||
// ASSERT(_mapAlgo.find(hypId) != _mapAlgo.end());
|
||||
// SMESH_Algo *anAlgo = _mapAlgo[hypId];
|
||||
// //SCRUTE(anAlgo->GetShapeType());
|
||||
// //if (anAlgo->GetShapeType() == typeOfShape)
|
||||
// if ((anAlgo->GetShapeType()) & (1 << typeOfShape))
|
||||
// { // only specific TopoDS_Shape
|
||||
// nb_algo++;
|
||||
// theHyp = anHyp;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (nb_algo > 1) return NULL; // more than one algo
|
||||
// it++;
|
||||
// }
|
||||
// if (nb_algo == 1) // one algo found : OK
|
||||
// break; // do not try a parent shape
|
||||
// }
|
||||
|
||||
// if (!theHyp)
|
||||
// return NULL; // no algo found
|
||||
|
||||
// hypType = theHyp->GetType();
|
||||
// hypId = theHyp->GetID();
|
||||
|
||||
// ASSERT(_mapAlgo.find(hypId) != _mapAlgo.end());
|
||||
// algo = _mapAlgo[hypId];
|
||||
// //MESSAGE("Algo found " << algo->GetName() << " Id " << hypId);
|
||||
// return algo;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -365,16 +823,12 @@ const char *SMESH_Gen::LocalPersistentIDToIOR(const char *aLocalPersistentID)
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_Gen::GetShapeDim(const TopoDS_Shape & aShape)
|
||||
int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType)
|
||||
{
|
||||
int shapeDim = -1; // Shape dimension: 0D, 1D, 2D, 3D
|
||||
int type = aShape.ShapeType();
|
||||
int type = aShapeType;//.ShapeType();
|
||||
switch (type)
|
||||
{
|
||||
// case TopAbs_COMPOUND:
|
||||
// {
|
||||
// break;
|
||||
// }
|
||||
case TopAbs_COMPOUND:
|
||||
case TopAbs_COMPSOLID:
|
||||
case TopAbs_SOLID:
|
||||
@ -401,6 +855,17 @@ int SMESH_Gen::GetShapeDim(const TopoDS_Shape & aShape)
|
||||
break;
|
||||
}
|
||||
}
|
||||
// SCRUTE(shapeDim);
|
||||
return shapeDim;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_Gen::GetANewId()
|
||||
{
|
||||
//MESSAGE("SMESH_Gen::GetANewId");
|
||||
return _hypId++;
|
||||
}
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
#include "SMESH_HypothesisFactory.hxx"
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "SMESH_Algo.hxx"
|
||||
#include "SMESH_1D_Algo.hxx"
|
||||
@ -59,16 +58,24 @@ class SMESH_Gen
|
||||
SMESH_Gen();
|
||||
~SMESH_Gen();
|
||||
|
||||
SMESH_Hypothesis *CreateHypothesis(const char *anHyp, int studyId)
|
||||
throw(SALOME_Exception);
|
||||
SMESH_Mesh *Init(int studyId, const TopoDS_Shape & aShape)
|
||||
throw(SALOME_Exception);
|
||||
bool Compute(::SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
|
||||
// SMESH_Hypothesis *CreateHypothesis(const char *anHyp, int studyId)
|
||||
// throw(SALOME_Exception);
|
||||
SMESH_Mesh* CreateMesh(int studyId)
|
||||
throw(SALOME_Exception);
|
||||
bool Compute(::SMESH_Mesh & aMesh, const TopoDS_Shape & aShape);
|
||||
|
||||
bool CheckAlgoState(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
|
||||
// notify on bad state of attached algos, return false
|
||||
// if Compute() would fail because of some algo bad state
|
||||
|
||||
|
||||
StudyContextStruct *GetStudyContext(int studyId);
|
||||
|
||||
static int GetShapeDim(const TopoDS_Shape & aShape);
|
||||
static int GetShapeDim(const TopAbs_ShapeEnum & aShapeType);
|
||||
static int GetShapeDim(const TopoDS_Shape & aShape)
|
||||
{ return GetShapeDim( aShape.ShapeType() ); }
|
||||
SMESH_Algo* GetAlgo(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape);
|
||||
static bool IsGlobalAlgo(const SMESH_Algo* theAlgo, SMESH_Mesh& aMesh);
|
||||
|
||||
// inherited methods from SALOMEDS::Driver
|
||||
|
||||
@ -80,7 +87,7 @@ class SMESH_Gen
|
||||
const char *IORToLocalPersistentID(const char *IORString, bool & IsAFile);
|
||||
const char *LocalPersistentIDToIOR(const char *aLocalPersistentID);
|
||||
|
||||
SMESH_HypothesisFactory _hypothesisFactory;
|
||||
int GetANewId();
|
||||
|
||||
map < int, SMESH_Algo * >_mapAlgo;
|
||||
map < int, SMESH_1D_Algo * >_map1D_Algo;
|
||||
@ -88,9 +95,12 @@ class SMESH_Gen
|
||||
map < int, SMESH_3D_Algo * >_map3D_Algo;
|
||||
|
||||
private:
|
||||
|
||||
int _localId; // unique Id of created objects, within SMESH_Gen entity
|
||||
map < int, StudyContextStruct * >_mapStudyContext;
|
||||
map < int, SMESH_Hypothesis * >_mapHypothesis;
|
||||
|
||||
// hypotheses managing
|
||||
int _hypId;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -48,8 +48,8 @@ SMESH_Hypothesis::SMESH_Hypothesis(int hypId,
|
||||
StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
|
||||
myStudyContext->mapHypothesis[_hypId] = this;
|
||||
_type = PARAM_ALGO;
|
||||
// _shapeType = -1; // to be set by algo with TopAbs_Enum
|
||||
_shapeType = 0; // to be set by algo with TopAbs_Enum
|
||||
_param_algo_dim = -1; // to be set by algo parameter
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -69,7 +69,7 @@ SMESH_Hypothesis::~SMESH_Hypothesis()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_Hypothesis::GetDim()
|
||||
int SMESH_Hypothesis::GetDim() const
|
||||
{
|
||||
int dim = -1;
|
||||
switch (_type)
|
||||
@ -77,6 +77,7 @@ int SMESH_Hypothesis::GetDim()
|
||||
case ALGO_1D: dim = 1; break;
|
||||
case ALGO_2D: dim = 2; break;
|
||||
case ALGO_3D: dim = 3; break;
|
||||
case PARAM_ALGO: dim = _param_algo_dim; break;
|
||||
}
|
||||
return dim;
|
||||
}
|
||||
@ -87,7 +88,7 @@ int SMESH_Hypothesis::GetDim()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_Hypothesis::GetShapeType()
|
||||
int SMESH_Hypothesis::GetShapeType() const
|
||||
{
|
||||
return _shapeType;
|
||||
}
|
||||
@ -98,7 +99,7 @@ int SMESH_Hypothesis::GetShapeType()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int SMESH_Hypothesis::GetStudyId()
|
||||
int SMESH_Hypothesis::GetStudyId() const
|
||||
{
|
||||
return _studyId;
|
||||
}
|
||||
@ -133,3 +134,28 @@ void SMESH_Hypothesis::NotifySubMeshesHypothesisModification()
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
const char* SMESH_Hypothesis::GetLibName() const
|
||||
{
|
||||
// MESSAGE("SMESHDS_Hypothesis::GetLibName");
|
||||
// SCRUTE(_LibName);
|
||||
// SCRUTE(&_LibName);
|
||||
return _libName.c_str();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Hypothesis::SetLibName(const char* theLibName)
|
||||
{
|
||||
// MESSAGE("SMESHDS_Hypothesis::SetLibName");
|
||||
_libName = string(theLibName);
|
||||
}
|
||||
|
@ -36,17 +36,39 @@ class SMESH_Gen;
|
||||
class SMESH_Hypothesis: public SMESHDS_Hypothesis
|
||||
{
|
||||
public:
|
||||
enum Hypothesis_Status // in the order of severity
|
||||
{
|
||||
HYP_OK,
|
||||
HYP_MISSING, // algo misses a hypothesis
|
||||
HYP_CONCURENT, // several applicable hypotheses
|
||||
HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
|
||||
HYP_UNKNOWN_FATAL,// --- all statuses below should be considered as fatal
|
||||
// for Add/RemoveHypothesis operations
|
||||
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
|
||||
};
|
||||
static bool IsStatusFatal(Hypothesis_Status theStatus)
|
||||
{ return theStatus >= HYP_UNKNOWN_FATAL; }
|
||||
|
||||
SMESH_Hypothesis(int hypId, int studyId, SMESH_Gen* gen);
|
||||
virtual ~SMESH_Hypothesis();
|
||||
int GetDim();
|
||||
int GetStudyId();
|
||||
int GetDim() const;
|
||||
int GetStudyId() const;
|
||||
void NotifySubMeshesHypothesisModification();
|
||||
int GetShapeType();
|
||||
int GetShapeType() const;
|
||||
const char* GetLibName() const;
|
||||
void SetLibName(const char* theLibName);
|
||||
|
||||
protected:
|
||||
SMESH_Gen* _gen;
|
||||
int _studyId;
|
||||
int _shapeType;
|
||||
int _param_algo_dim;
|
||||
|
||||
private:
|
||||
string _libName;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "SMESH_subMesh.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "SMESH_Group.hxx"
|
||||
#include "SMESHDS_Group.hxx"
|
||||
#include "SMESHDS_Script.hxx"
|
||||
#include "SMDS_MeshVolume.hxx"
|
||||
|
||||
@ -40,7 +42,15 @@
|
||||
#include "DriverDAT_W_SMESHDS_Mesh.h"
|
||||
#include "DriverUNV_W_SMESHDS_Mesh.h"
|
||||
|
||||
#include "DriverMED_R_SMESHDS_Mesh.h"
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <memory>
|
||||
#include <TopTools_ListOfShape.hxx>
|
||||
#include <TopExp.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
#include "Utils_ExceptHandlers.hxx"
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
@ -61,8 +71,8 @@ SMESH_Mesh::SMESH_Mesh()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Mesh::SMESH_Mesh(int localId,
|
||||
int studyId, SMESH_Gen * gen, SMESHDS_Document * myDocument)
|
||||
SMESH_Mesh::SMESH_Mesh(int localId, int studyId, SMESH_Gen * gen, SMESHDS_Document * myDocument)
|
||||
: _groupId( 0 )
|
||||
{
|
||||
MESSAGE("SMESH_Mesh::SMESH_Mesh(int localId)");
|
||||
_id = localId;
|
||||
@ -83,6 +93,13 @@ SMESH_Mesh::SMESH_Mesh(int localId,
|
||||
SMESH_Mesh::~SMESH_Mesh()
|
||||
{
|
||||
MESSAGE("SMESH_Mesh::~SMESH_Mesh");
|
||||
|
||||
// delete groups
|
||||
map < int, SMESH_Group * >::iterator itg;
|
||||
for (itg = _mapGroup.begin(); itg != _mapGroup.end(); itg++) {
|
||||
SMESH_Group *aGroup = (*itg).second;
|
||||
delete aGroup;
|
||||
}
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -91,9 +108,7 @@ SMESH_Mesh::~SMESH_Mesh()
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Mesh::ShapeToMesh(const TopoDS_Shape & aShape)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
void SMESH_Mesh::ShapeToMesh(const TopoDS_Shape & aShape){
|
||||
MESSAGE("SMESH_Mesh::ShapeToMesh");
|
||||
if (_isShapeToMesh)
|
||||
throw
|
||||
@ -106,15 +121,55 @@ throw(SALOME_Exception)
|
||||
TopExp::MapShapes(aShape, _subShapes);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : MEDToMesh
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
int SMESH_Mesh::MEDToMesh(const char* theFileName, const char* theMeshName)
|
||||
{
|
||||
MESSAGE("MEDToMesh - theFileName = "<<theFileName<<", mesh name = "<<theMeshName);
|
||||
if(_isShapeToMesh)
|
||||
throw SALOME_Exception(LOCALIZED("a shape to mesh as already been defined"));
|
||||
_isShapeToMesh = true;
|
||||
std::auto_ptr<DriverMED_R_SMESHDS_Mesh> myReader(new DriverMED_R_SMESHDS_Mesh);
|
||||
myReader->SetMesh(_myMeshDS);
|
||||
myReader->SetMeshId(-1);
|
||||
myReader->SetFile(theFileName);
|
||||
myReader->SetMeshName(theMeshName);
|
||||
DriverMED_R_SMESHDS_Mesh::ReadStatus status = myReader->ReadMySelf();
|
||||
MESSAGE("MEDToMesh - _myMeshDS->NbNodes() = "<<_myMeshDS->NbNodes());
|
||||
MESSAGE("MEDToMesh - _myMeshDS->NbEdges() = "<<_myMeshDS->NbEdges());
|
||||
MESSAGE("MEDToMesh - _myMeshDS->NbFaces() = "<<_myMeshDS->NbFaces());
|
||||
MESSAGE("MEDToMesh - _myMeshDS->NbVolumes() = "<<_myMeshDS->NbVolumes());
|
||||
|
||||
// Reading groups (sub-meshes are out of scope of MED import functionality)
|
||||
list<string> aGroupNames = myReader->GetGroupNames();
|
||||
MESSAGE("MEDToMesh - Nb groups = "<<aGroupNames.size());
|
||||
int anId;
|
||||
for ( list<string>::iterator it = aGroupNames.begin(); it != aGroupNames.end(); it++ ) {
|
||||
SMESH_Group* aGroup = AddGroup( SMDSAbs_All, it->c_str(), anId );
|
||||
if ( aGroup ) {
|
||||
MESSAGE("MEDToMesh - group added: "<<it->c_str());
|
||||
SMESHDS_Group* aGroupDS = aGroup->GetGroupDS();
|
||||
aGroupDS->SetStoreName( it->c_str() );
|
||||
myReader->GetGroup( aGroupDS );
|
||||
}
|
||||
}
|
||||
return (int) status;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape,
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape,
|
||||
int anHypId) throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
MESSAGE("SMESH_Mesh::AddHypothesis");
|
||||
|
||||
StudyContextStruct *sc = _gen->GetStudyContext(_studyId);
|
||||
@ -128,29 +183,46 @@ bool SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape,
|
||||
|
||||
SMESH_subMesh *subMesh = GetSubMesh(aSubShape);
|
||||
SMESH_Hypothesis *anHyp = sc->mapHypothesis[anHypId];
|
||||
SCRUTE( anHyp->GetName() );
|
||||
int event;
|
||||
|
||||
bool isGlobalHyp = IsMainShape( aSubShape );
|
||||
|
||||
// NotConformAllowed can be only global
|
||||
if ( !isGlobalHyp )
|
||||
{
|
||||
string hypName = anHyp->GetName();
|
||||
if ( hypName == "NotConformAllowed" )
|
||||
{
|
||||
MESSAGE( "Hypotesis <NotConformAllowed> can be only global" );
|
||||
return SMESH_Hypothesis::HYP_INCOMPATIBLE;
|
||||
}
|
||||
}
|
||||
|
||||
// shape
|
||||
|
||||
if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
event = SMESH_subMesh::ADD_HYP;
|
||||
else
|
||||
event = SMESH_subMesh::ADD_ALGO;
|
||||
int ret = subMesh->AlgoStateEngine(event, anHyp);
|
||||
SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);
|
||||
|
||||
// subShapes (only when shape is mainShape)
|
||||
TopoDS_Shape mainShape = _myMeshDS->ShapeToMesh();
|
||||
if (aSubShape.IsSame(mainShape))
|
||||
// subShapes
|
||||
if (!SMESH_Hypothesis::IsStatusFatal(ret) &&
|
||||
!subMesh->IsApplicableHypotesis( anHyp )) // is added on father
|
||||
{
|
||||
if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
event = SMESH_subMesh::ADD_FATHER_HYP;
|
||||
else
|
||||
event = SMESH_subMesh::ADD_FATHER_ALGO;
|
||||
SMESH_Hypothesis::Hypothesis_Status ret2 =
|
||||
subMesh->SubMeshesAlgoStateEngine(event, anHyp);
|
||||
if (ret2 > ret)
|
||||
ret = ret2;
|
||||
}
|
||||
|
||||
subMesh->DumpAlgoState(true);
|
||||
//SCRUTE(ret);
|
||||
SCRUTE(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -160,9 +232,11 @@ bool SMESH_Mesh::AddHypothesis(const TopoDS_Shape & aSubShape,
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
bool SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape,
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape,
|
||||
int anHypId)throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
MESSAGE("SMESH_Mesh::RemoveHypothesis");
|
||||
|
||||
StudyContextStruct *sc = _gen->GetStudyContext(_studyId);
|
||||
@ -181,18 +255,20 @@ bool SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape,
|
||||
event = SMESH_subMesh::REMOVE_HYP;
|
||||
else
|
||||
event = SMESH_subMesh::REMOVE_ALGO;
|
||||
int ret = subMesh->AlgoStateEngine(event, anHyp);
|
||||
SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);
|
||||
|
||||
// subShapes (only when shape is mainShape)
|
||||
|
||||
TopoDS_Shape mainShape = _myMeshDS->ShapeToMesh();
|
||||
if (aSubShape.IsSame(mainShape))
|
||||
// subShapes
|
||||
if (!SMESH_Hypothesis::IsStatusFatal(ret) &&
|
||||
!subMesh->IsApplicableHypotesis( anHyp )) // is removed from father
|
||||
{
|
||||
if (anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
event = SMESH_subMesh::REMOVE_FATHER_HYP;
|
||||
else
|
||||
event = SMESH_subMesh::REMOVE_FATHER_ALGO;
|
||||
SMESH_Hypothesis::Hypothesis_Status ret2 =
|
||||
subMesh->SubMeshesAlgoStateEngine(event, anHyp);
|
||||
if (ret2 > ret) // more severe
|
||||
ret = ret2;
|
||||
}
|
||||
|
||||
subMesh->DumpAlgoState(true);
|
||||
@ -218,22 +294,24 @@ SMESHDS_Mesh * SMESH_Mesh::GetMeshDS()
|
||||
//=============================================================================
|
||||
|
||||
const list<const SMESHDS_Hypothesis*>&
|
||||
SMESH_Mesh::GetHypothesisList(const TopoDS_Shape & aSubShape)
|
||||
SMESH_Mesh::GetHypothesisList(const TopoDS_Shape & aSubShape) const
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
MESSAGE("SMESH_Mesh::GetHypothesisList");
|
||||
_subShapeHypothesisList.clear();
|
||||
const list<const SMESHDS_Hypothesis*>& listHyp =
|
||||
_myMeshDS->GetHypothesis(aSubShape);
|
||||
Unexpect aCatch(SalomeException);
|
||||
// MESSAGE("SMESH_Mesh::GetHypothesisList");
|
||||
// _subShapeHypothesisList.clear();
|
||||
// const list<const SMESHDS_Hypothesis*>& listHyp =
|
||||
// _myMeshDS->GetHypothesis(aSubShape);
|
||||
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
while (it!=listHyp.end())
|
||||
{
|
||||
const SMESHDS_Hypothesis *anHyp = *it;
|
||||
_subShapeHypothesisList.push_back(anHyp);
|
||||
it++;
|
||||
}
|
||||
return _subShapeHypothesisList;
|
||||
// list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
// while (it!=listHyp.end())
|
||||
// {
|
||||
// const SMESHDS_Hypothesis *anHyp = *it;
|
||||
// _subShapeHypothesisList.push_back(anHyp);
|
||||
// it++;
|
||||
// }
|
||||
// return _subShapeHypothesisList;
|
||||
return _myMeshDS->GetHypothesis(aSubShape);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@ -244,6 +322,7 @@ const list<const SMESHDS_Hypothesis*>&
|
||||
|
||||
const list<SMESHDS_Command*> & SMESH_Mesh::GetLog() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
MESSAGE("SMESH_Mesh::GetLog");
|
||||
return _myMeshDS->GetScript()->GetCommands();
|
||||
}
|
||||
@ -255,6 +334,7 @@ const list<SMESHDS_Command*> & SMESH_Mesh::GetLog() throw(SALOME_Exception)
|
||||
//=============================================================================
|
||||
void SMESH_Mesh::ClearLog() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
MESSAGE("SMESH_Mesh::ClearLog");
|
||||
_myMeshDS->GetScript()->Clear();
|
||||
}
|
||||
@ -291,9 +371,11 @@ SMESH_Gen *SMESH_Mesh::GetGen()
|
||||
SMESH_subMesh *SMESH_Mesh::GetSubMesh(const TopoDS_Shape & aSubShape)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
//MESSAGE("SMESH_Mesh::GetSubMesh");
|
||||
SMESH_subMesh *aSubMesh;
|
||||
int index = _subShapes.FindIndex(aSubShape);
|
||||
|
||||
if (_mapSubMesh.find(index) != _mapSubMesh.end())
|
||||
{
|
||||
aSubMesh = _mapSubMesh[index];
|
||||
@ -343,6 +425,7 @@ throw(SALOME_Exception)
|
||||
SMESH_subMesh *SMESH_Mesh::GetSubMeshContaining(const TopoDS_Shape & aSubShape)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
//MESSAGE("SMESH_Mesh::GetSubMeshContaining");
|
||||
bool isFound = false;
|
||||
SMESH_subMesh *aSubMesh = NULL;
|
||||
@ -379,6 +462,68 @@ throw(SALOME_Exception)
|
||||
return aSubMesh;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsUsedHypothesis
|
||||
//purpose : Return True if anHyp is used to mesh aSubShape
|
||||
//=======================================================================
|
||||
|
||||
bool SMESH_Mesh::IsUsedHypothesis(SMESHDS_Hypothesis * anHyp,
|
||||
const TopoDS_Shape & aSubShape)
|
||||
{
|
||||
//MESSAGE( "SMESH_Mesh::IsUsedHypothesis" );
|
||||
|
||||
// check if anHyp is applicable to aSubShape
|
||||
SMESH_subMesh * subMesh = GetSubMeshContaining( aSubShape );
|
||||
if (!subMesh ||
|
||||
!subMesh->IsApplicableHypotesis(static_cast<SMESH_Hypothesis*>(anHyp)))
|
||||
return false;
|
||||
|
||||
SMESH_Algo *algo = _gen->GetAlgo(*this, aSubShape);
|
||||
|
||||
// algorithm
|
||||
if (anHyp->GetType() > SMESHDS_Hypothesis::PARAM_ALGO)
|
||||
return ( anHyp == algo );
|
||||
|
||||
// algorithm parameter
|
||||
if (algo)
|
||||
{
|
||||
// look trough hypotheses used by algo
|
||||
const list <const SMESHDS_Hypothesis * >&usedHyps =
|
||||
algo->GetUsedHypothesis(*this, aSubShape);
|
||||
list <const SMESHDS_Hypothesis * >::const_iterator itl;
|
||||
for (itl = usedHyps.begin(); itl != usedHyps.end(); itl++)
|
||||
if (anHyp == (*itl))
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// look through all assigned hypotheses
|
||||
{
|
||||
const list <const SMESHDS_Hypothesis * >&usedHyps =
|
||||
_myMeshDS->GetHypothesis( aSubShape );
|
||||
list <const SMESHDS_Hypothesis * >::const_iterator itl;
|
||||
for (itl = usedHyps.begin(); itl != usedHyps.end(); itl++)
|
||||
if (anHyp == (*itl))
|
||||
return true;
|
||||
}
|
||||
|
||||
// on ancestors
|
||||
TopTools_ListIteratorOfListOfShape it( GetAncestors( aSubShape ));
|
||||
for (; it.More(); it.Next())
|
||||
{
|
||||
const list <const SMESHDS_Hypothesis * >&usedHyps =
|
||||
_myMeshDS->GetHypothesis( aSubShape );
|
||||
list <const SMESHDS_Hypothesis * >::const_iterator itl;
|
||||
for (itl = usedHyps.begin(); itl != usedHyps.end(); itl++)
|
||||
if (anHyp == (*itl))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
@ -389,27 +534,14 @@ const list < SMESH_subMesh * >&
|
||||
SMESH_Mesh::GetSubMeshUsingHypothesis(SMESHDS_Hypothesis * anHyp)
|
||||
throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
MESSAGE("SMESH_Mesh::GetSubMeshUsingHypothesis");
|
||||
map < int, SMESH_subMesh * >::iterator itsm;
|
||||
_subMeshesUsingHypothesisList.clear();
|
||||
for (itsm = _mapSubMesh.begin(); itsm != _mapSubMesh.end(); itsm++)
|
||||
{
|
||||
SMESH_subMesh *aSubMesh = (*itsm).second;
|
||||
bool usesHyp = false;
|
||||
SMESH_Algo *algo = _gen->GetAlgo(*this, aSubMesh->GetSubShape());
|
||||
if (algo != NULL)
|
||||
{
|
||||
const list <const SMESHDS_Hypothesis * >&usedHyps
|
||||
= algo->GetUsedHypothesis(*this, aSubMesh->GetSubShape());
|
||||
list <const SMESHDS_Hypothesis * >::const_iterator itl;
|
||||
for (itl = usedHyps.begin(); itl != usedHyps.end(); itl++)
|
||||
if (anHyp == (*itl))
|
||||
{
|
||||
usesHyp = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (usesHyp)
|
||||
if ( IsUsedHypothesis ( anHyp, aSubMesh->GetSubShape() ))
|
||||
_subMeshesUsingHypothesisList.push_back(aSubMesh);
|
||||
}
|
||||
return _subMeshesUsingHypothesisList;
|
||||
@ -421,17 +553,39 @@ throw(SALOME_Exception)
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Mesh::ExportMED(const char *file) throw(SALOME_Exception)
|
||||
void SMESH_Mesh::ExportMED(const char *file, const char* theMeshName, bool theAutoGroups) throw(SALOME_Exception)
|
||||
{
|
||||
Mesh_Writer *myWriter = new DriverMED_W_SMESHDS_Mesh;
|
||||
myWriter->SetFile(string(file));
|
||||
Unexpect aCatch(SalomeException);
|
||||
std::auto_ptr<DriverMED_W_SMESHDS_Mesh> myWriter(new DriverMED_W_SMESHDS_Mesh);
|
||||
myWriter ->SetFile ( file );
|
||||
myWriter ->SetMesh ( _myMeshDS );
|
||||
MESSAGE(" _idDoc " << _idDoc) myWriter->SetMeshId(_idDoc);
|
||||
if ( !theMeshName )
|
||||
myWriter->SetMeshId ( _idDoc );
|
||||
else {
|
||||
myWriter->SetMeshId ( -1 );
|
||||
myWriter->SetMeshName( theMeshName );
|
||||
}
|
||||
|
||||
if ( theAutoGroups ) {
|
||||
myWriter->AddGroupOfNodes();
|
||||
myWriter->AddGroupOfEdges();
|
||||
myWriter->AddGroupOfFaces();
|
||||
myWriter->AddGroupOfVolumes();
|
||||
}
|
||||
|
||||
for ( map<int, SMESH_Group*>::iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ ) {
|
||||
SMESH_Group* aGroup = it->second;
|
||||
SMESHDS_Group* aGroupDS = aGroup->GetGroupDS();
|
||||
aGroupDS->SetStoreName( aGroup->GetName() );
|
||||
myWriter->AddGroup( aGroupDS );
|
||||
}
|
||||
|
||||
myWriter->Add();
|
||||
}
|
||||
|
||||
void SMESH_Mesh::ExportDAT(const char *file) throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
Mesh_Writer *myWriter = new DriverDAT_W_SMESHDS_Mesh;
|
||||
myWriter->SetFile(string(file));
|
||||
myWriter->SetMesh(_myMeshDS);
|
||||
@ -441,6 +595,7 @@ void SMESH_Mesh::ExportDAT(const char *file) throw(SALOME_Exception)
|
||||
|
||||
void SMESH_Mesh::ExportUNV(const char *file) throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
Mesh_Writer *myWriter = new DriverUNV_W_SMESHDS_Mesh;
|
||||
myWriter->SetFile(string(file));
|
||||
myWriter->SetMesh(_myMeshDS);
|
||||
@ -455,6 +610,7 @@ void SMESH_Mesh::ExportUNV(const char *file) throw(SALOME_Exception)
|
||||
//=============================================================================
|
||||
int SMESH_Mesh::NbNodes() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
return _myMeshDS->NbNodes();
|
||||
}
|
||||
|
||||
@ -465,6 +621,7 @@ int SMESH_Mesh::NbNodes() throw(SALOME_Exception)
|
||||
//=============================================================================
|
||||
int SMESH_Mesh::NbEdges() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
return _myMeshDS->NbEdges();
|
||||
}
|
||||
|
||||
@ -475,6 +632,7 @@ int SMESH_Mesh::NbEdges() throw(SALOME_Exception)
|
||||
//=============================================================================
|
||||
int SMESH_Mesh::NbFaces() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
return _myMeshDS->NbFaces();
|
||||
}
|
||||
|
||||
@ -483,11 +641,11 @@ int SMESH_Mesh::NbFaces() throw(SALOME_Exception)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int SMESH_Mesh::NbTriangles() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
int Nb = 0;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshFace*> * itFaces=_myMeshDS->facesIterator();
|
||||
SMDS_FaceIteratorPtr itFaces=_myMeshDS->facesIterator();
|
||||
while(itFaces->more()) if(itFaces->next()->NbNodes()==3) Nb++;
|
||||
delete itFaces;
|
||||
return Nb;
|
||||
}
|
||||
|
||||
@ -496,11 +654,11 @@ int SMESH_Mesh::NbTriangles() throw(SALOME_Exception)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
int SMESH_Mesh::NbQuadrangles() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
int Nb = 0;
|
||||
|
||||
SMDS_Iterator<const SMDS_MeshFace*> * itFaces=_myMeshDS->facesIterator();
|
||||
SMDS_FaceIteratorPtr itFaces=_myMeshDS->facesIterator();
|
||||
while(itFaces->more()) if(itFaces->next()->NbNodes()==4) Nb++;
|
||||
delete itFaces;
|
||||
return Nb;
|
||||
}
|
||||
|
||||
@ -511,24 +669,43 @@ int SMESH_Mesh::NbQuadrangles() throw(SALOME_Exception)
|
||||
//=============================================================================
|
||||
int SMESH_Mesh::NbVolumes() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
return _myMeshDS->NbVolumes();
|
||||
}
|
||||
|
||||
int SMESH_Mesh::NbTetras() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
int Nb = 0;
|
||||
SMDS_Iterator<const SMDS_MeshVolume*> * itVolumes=_myMeshDS->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
||||
while(itVolumes->more()) if(itVolumes->next()->NbNodes()==4) Nb++;
|
||||
delete itVolumes;
|
||||
return Nb;
|
||||
}
|
||||
|
||||
int SMESH_Mesh::NbHexas() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
int Nb = 0;
|
||||
SMDS_Iterator<const SMDS_MeshVolume*> * itVolumes=_myMeshDS->volumesIterator();
|
||||
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
||||
while(itVolumes->more()) if(itVolumes->next()->NbNodes()==8) Nb++;
|
||||
delete itVolumes;
|
||||
return Nb;
|
||||
}
|
||||
|
||||
int SMESH_Mesh::NbPyramids() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
int Nb = 0;
|
||||
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
||||
while(itVolumes->more()) if(itVolumes->next()->NbNodes()==5) Nb++;
|
||||
return Nb;
|
||||
}
|
||||
|
||||
int SMESH_Mesh::NbPrisms() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
int Nb = 0;
|
||||
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
||||
while(itVolumes->more()) if(itVolumes->next()->NbNodes()==6) Nb++;
|
||||
return Nb;
|
||||
}
|
||||
|
||||
@ -539,5 +716,187 @@ int SMESH_Mesh::NbHexas() throw(SALOME_Exception)
|
||||
//=============================================================================
|
||||
int SMESH_Mesh::NbSubMesh() throw(SALOME_Exception)
|
||||
{
|
||||
Unexpect aCatch(SalomeException);
|
||||
return _myMeshDS->NbSubMesh();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsNotConformAllowed
|
||||
//purpose : check if a hypothesis alowing notconform mesh is present
|
||||
//=======================================================================
|
||||
|
||||
bool SMESH_Mesh::IsNotConformAllowed() const
|
||||
{
|
||||
MESSAGE("SMESH_Mesh::IsNotConformAllowed");
|
||||
|
||||
const list<const SMESHDS_Hypothesis*>& listHyp =
|
||||
_myMeshDS->GetHypothesis( _myMeshDS->ShapeToMesh() );
|
||||
list<const SMESHDS_Hypothesis*>::const_iterator it=listHyp.begin();
|
||||
while (it!=listHyp.end())
|
||||
{
|
||||
const SMESHDS_Hypothesis *aHyp = *it;
|
||||
string hypName = aHyp->GetName();
|
||||
if ( hypName == "NotConformAllowed" )
|
||||
return true;
|
||||
it++;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsMainShape
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
bool SMESH_Mesh::IsMainShape(const TopoDS_Shape& theShape) const
|
||||
{
|
||||
return theShape.IsSame(_myMeshDS->ShapeToMesh() );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Group* SMESH_Mesh::AddGroup (const SMDSAbs_ElementType theType,
|
||||
const char* theName,
|
||||
int& theId)
|
||||
{
|
||||
if (_mapGroup.find(_groupId) != _mapGroup.end())
|
||||
return NULL;
|
||||
SMESH_Group* aGroup = new SMESH_Group (this, theType, theName);
|
||||
theId = _groupId;
|
||||
_mapGroup[_groupId++] = aGroup;
|
||||
return aGroup;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
SMESH_Group* SMESH_Mesh::GetGroup (const int theGroupID)
|
||||
{
|
||||
if (_mapGroup.find(theGroupID) == _mapGroup.end())
|
||||
return NULL;
|
||||
return _mapGroup[theGroupID];
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
list<int> SMESH_Mesh::GetGroupIds()
|
||||
{
|
||||
list<int> anIds;
|
||||
for ( map<int, SMESH_Group*>::const_iterator it = _mapGroup.begin(); it != _mapGroup.end(); it++ )
|
||||
anIds.push_back( it->first );
|
||||
|
||||
return anIds;
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
void SMESH_Mesh::RemoveGroup (const int theGroupID)
|
||||
{
|
||||
if (_mapGroup.find(theGroupID) == _mapGroup.end())
|
||||
return;
|
||||
delete _mapGroup[theGroupID];
|
||||
_mapGroup.erase (theGroupID);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetAncestors
|
||||
//purpose : return list of ancestors of theSubShape in the order
|
||||
// that lower dimention shapes come first.
|
||||
//=======================================================================
|
||||
|
||||
const TopTools_ListOfShape& SMESH_Mesh::GetAncestors(const TopoDS_Shape& theS)
|
||||
{
|
||||
if ( _mapAncestors.IsEmpty() )
|
||||
{
|
||||
// fill _mapAncestors
|
||||
int desType, ancType;
|
||||
for ( desType = TopAbs_EDGE; desType > TopAbs_COMPOUND; desType-- )
|
||||
for ( ancType = desType - 1; ancType >= TopAbs_COMPOUND; ancType-- )
|
||||
TopExp::MapShapesAndAncestors (_myMeshDS->ShapeToMesh(),
|
||||
(TopAbs_ShapeEnum) desType,
|
||||
(TopAbs_ShapeEnum) ancType,
|
||||
_mapAncestors );
|
||||
}
|
||||
|
||||
if ( _mapAncestors.Contains( theS ) )
|
||||
return _mapAncestors.FindFromKey( theS );
|
||||
|
||||
static TopTools_ListOfShape emptyList;
|
||||
return emptyList;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Dump
|
||||
//purpose : dumps contents of mesh to stream [ debug purposes ]
|
||||
//=======================================================================
|
||||
ostream& SMESH_Mesh::Dump(ostream& save)
|
||||
{
|
||||
save << "========================== Dump contents of mesh ==========================" << endl;
|
||||
save << "1) Total number of nodes: " << NbNodes() << endl;
|
||||
save << "2) Total number of edges: " << NbEdges() << endl;
|
||||
save << "3) Total number of faces: " << NbFaces() << endl;
|
||||
if ( NbFaces() > 0 ) {
|
||||
int nb3 = NbTriangles();
|
||||
int nb4 = NbQuadrangles();
|
||||
save << "3.1.) Number of triangles: " << nb3 << endl;
|
||||
save << "3.2.) Number of quadrangles: " << nb4 << endl;
|
||||
if ( nb3 + nb4 != NbFaces() ) {
|
||||
map<int,int> myFaceMap;
|
||||
SMDS_FaceIteratorPtr itFaces=_myMeshDS->facesIterator();
|
||||
while( itFaces->more( ) ) {
|
||||
int nbNodes = itFaces->next()->NbNodes();
|
||||
if ( myFaceMap.find( nbNodes ) == myFaceMap.end() )
|
||||
myFaceMap[ nbNodes ] = 0;
|
||||
myFaceMap[ nbNodes ] = myFaceMap[ nbNodes ] + 1;
|
||||
}
|
||||
save << "3.3.) Faces in detail: " << endl;
|
||||
map <int,int>::iterator itF;
|
||||
for (itF = myFaceMap.begin(); itF != myFaceMap.end(); itF++)
|
||||
save << "--> nb nodes: " << itF->first << " - nb elemens: " << itF->second << endl;
|
||||
}
|
||||
}
|
||||
save << "4) Total number of volumes: " << NbVolumes() << endl;
|
||||
if ( NbVolumes() > 0 ) {
|
||||
int nb8 = NbHexas();
|
||||
int nb4 = NbTetras();
|
||||
int nb5 = NbPyramids();
|
||||
int nb6 = NbPrisms();
|
||||
save << "4.1.) Number of hexahedrons: " << nb8 << endl;
|
||||
save << "4.2.) Number of tetrahedrons: " << nb4 << endl;
|
||||
save << "4.3.) Number of prisms: " << nb6 << endl;
|
||||
save << "4.4.) Number of pyramides: " << nb5 << endl;
|
||||
if ( nb8 + nb4 + nb5 + nb6 != NbVolumes() ) {
|
||||
map<int,int> myVolumesMap;
|
||||
SMDS_VolumeIteratorPtr itVolumes=_myMeshDS->volumesIterator();
|
||||
while( itVolumes->more( ) ) {
|
||||
int nbNodes = itVolumes->next()->NbNodes();
|
||||
if ( myVolumesMap.find( nbNodes ) == myVolumesMap.end() )
|
||||
myVolumesMap[ nbNodes ] = 0;
|
||||
myVolumesMap[ nbNodes ] = myVolumesMap[ nbNodes ] + 1;
|
||||
}
|
||||
save << "4.5.) Volumes in detail: " << endl;
|
||||
map <int,int>::iterator itV;
|
||||
for (itV = myVolumesMap.begin(); itV != myVolumesMap.end(); itV++)
|
||||
save << "--> nb nodes: " << itV->first << " - nb elemens: " << itV->second << endl;
|
||||
}
|
||||
}
|
||||
save << "===========================================================================" << endl;
|
||||
return save;
|
||||
}
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "SMESHDS_Command.hxx"
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "SMESH_subMesh.hxx"
|
||||
#include <SMDSAbs_ElementType.hxx>
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
#include <TopExp.hxx>
|
||||
@ -50,12 +51,25 @@
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopTools_IndexedMapOfShape.hxx>
|
||||
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
#if (__GNUC__>2)
|
||||
#include <string>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#else
|
||||
#include <string>
|
||||
#include <istream.h>
|
||||
#include <ostream.h>
|
||||
#endif
|
||||
|
||||
class SMESH_Gen;
|
||||
class SMESH_Group;
|
||||
class TopTools_ListOfShape;
|
||||
|
||||
class SMESH_Mesh
|
||||
{
|
||||
@ -66,16 +80,22 @@ class SMESH_Mesh
|
||||
|
||||
virtual ~SMESH_Mesh();
|
||||
|
||||
void ShapeToMesh(const TopoDS_Shape & aShape) throw(SALOME_Exception);
|
||||
void ShapeToMesh(const TopoDS_Shape & aShape);
|
||||
/*!
|
||||
* consult DriverMED_R_SMESHDS_Mesh::ReadStatus for returned value
|
||||
*/
|
||||
int MEDToMesh(const char* theFileName, const char* theMeshName);
|
||||
|
||||
bool AddHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
AddHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
bool RemoveHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
RemoveHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
const list <const SMESHDS_Hypothesis * >&
|
||||
GetHypothesisList(const TopoDS_Shape & aSubShape)
|
||||
GetHypothesisList(const TopoDS_Shape & aSubShape) const
|
||||
throw(SALOME_Exception);
|
||||
|
||||
const list<SMESHDS_Command*> & GetLog() throw(SALOME_Exception);
|
||||
@ -101,8 +121,21 @@ class SMESH_Mesh
|
||||
GetSubMeshUsingHypothesis(SMESHDS_Hypothesis * anHyp)
|
||||
throw(SALOME_Exception);
|
||||
|
||||
bool IsUsedHypothesis(SMESHDS_Hypothesis * anHyp,
|
||||
const TopoDS_Shape & aSubShape);
|
||||
// Return True if anHyp is used to mesh aSubShape
|
||||
|
||||
bool IsNotConformAllowed() const;
|
||||
// check if a hypothesis alowing notconform mesh is present
|
||||
|
||||
bool IsMainShape(const TopoDS_Shape& theShape) const;
|
||||
|
||||
const TopTools_ListOfShape& GetAncestors(const TopoDS_Shape& theSubShape);
|
||||
// return list of ancestors of theSubShape in the order
|
||||
// that lower dimention shapes come first.
|
||||
|
||||
void ExportDAT(const char *file) throw(SALOME_Exception);
|
||||
void ExportMED(const char *file) throw(SALOME_Exception);
|
||||
void ExportMED(const char *file, const char* theMeshName = NULL, bool theAutoGroups = true) throw(SALOME_Exception);
|
||||
void ExportUNV(const char *file) throw(SALOME_Exception);
|
||||
|
||||
int NbNodes() throw(SALOME_Exception);
|
||||
@ -121,13 +154,32 @@ class SMESH_Mesh
|
||||
|
||||
int NbHexas() throw(SALOME_Exception);
|
||||
|
||||
int NbPyramids() throw(SALOME_Exception);
|
||||
|
||||
int NbPrisms() throw(SALOME_Exception);
|
||||
|
||||
int NbSubMesh() throw(SALOME_Exception);
|
||||
|
||||
int NbGroup() const { return _mapGroup.size(); }
|
||||
|
||||
SMESH_Group* AddGroup (const SMDSAbs_ElementType theType,
|
||||
const char* theName,
|
||||
int& theId);
|
||||
|
||||
SMESH_Group* GetGroup (const int theGroupID);
|
||||
|
||||
list<int> GetGroupIds();
|
||||
|
||||
void RemoveGroup (const int theGroupID);
|
||||
|
||||
ostream& Dump(ostream & save);
|
||||
|
||||
private:
|
||||
|
||||
int _id; // id given by creator (unique within the creator instance)
|
||||
int _studyId;
|
||||
int _idDoc; // id given by SMESHDS_Document
|
||||
int _groupId; // id generator for group objects
|
||||
bool _isShapeToMesh; // set to true when a shape is given (only once)
|
||||
list<const SMESHDS_Hypothesis *> _subShapeHypothesisList;
|
||||
list <SMESH_subMesh *> _subMeshesUsingHypothesisList;
|
||||
@ -135,7 +187,10 @@ class SMESH_Mesh
|
||||
SMESHDS_Mesh * _myMeshDS;
|
||||
TopTools_IndexedMapOfShape _subShapes;
|
||||
map <int, SMESH_subMesh *> _mapSubMesh;
|
||||
map <int, SMESH_Group *> _mapGroup;
|
||||
SMESH_Gen *_gen;
|
||||
|
||||
TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,7 @@
|
||||
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "SMESHDS_SubMesh.hxx"
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TColStd_IndexedMapOfTransient.hxx>
|
||||
@ -42,6 +43,8 @@
|
||||
|
||||
class SMESH_Mesh;
|
||||
class SMESH_Hypothesis;
|
||||
class SMESH_Algo;
|
||||
class SMESH_Gen;
|
||||
|
||||
class SMESH_subMesh
|
||||
{
|
||||
@ -50,81 +53,125 @@ class SMESH_subMesh
|
||||
const TopoDS_Shape & aSubShape);
|
||||
virtual ~ SMESH_subMesh();
|
||||
|
||||
int GetId();
|
||||
int GetId() const;
|
||||
|
||||
// bool Contains(const TopoDS_Shape & aSubShape)
|
||||
// throw (SALOME_Exception);
|
||||
|
||||
SMESHDS_SubMesh * GetSubMeshDS() throw(SALOME_Exception);
|
||||
SMESHDS_SubMesh * GetSubMeshDS();
|
||||
|
||||
SMESH_subMesh *GetFirstToCompute() throw(SALOME_Exception);
|
||||
SMESHDS_SubMesh* CreateSubMeshDS();
|
||||
// Explicit SMESHDS_SubMesh creation method, required for persistence mechanism
|
||||
|
||||
SMESH_subMesh *GetFirstToCompute();
|
||||
|
||||
const map < int, SMESH_subMesh * >&DependsOn();
|
||||
const map < int, SMESH_subMesh * >&Dependants();
|
||||
//const map < int, SMESH_subMesh * >&Dependants();
|
||||
|
||||
const TopoDS_Shape & GetSubShape();
|
||||
|
||||
bool _vertexSet; // only for vertex subMesh, set to false for dim > 0
|
||||
|
||||
enum compute_state
|
||||
{ NOT_READY, READY_TO_COMPUTE,
|
||||
{
|
||||
NOT_READY, READY_TO_COMPUTE,
|
||||
COMPUTE_OK, FAILED_TO_COMPUTE
|
||||
};
|
||||
enum algo_state
|
||||
{ NO_ALGO, MISSING_HYP, HYP_OK };
|
||||
{
|
||||
NO_ALGO, MISSING_HYP, HYP_OK
|
||||
};
|
||||
enum algo_event
|
||||
{ ADD_HYP, ADD_ALGO,
|
||||
{
|
||||
ADD_HYP, ADD_ALGO,
|
||||
REMOVE_HYP, REMOVE_ALGO,
|
||||
ADD_FATHER_HYP, ADD_FATHER_ALGO,
|
||||
REMOVE_FATHER_HYP, REMOVE_FATHER_ALGO
|
||||
};
|
||||
enum compute_event
|
||||
{ MODIF_HYP, MODIF_ALGO_STATE, COMPUTE,
|
||||
CLEAN, CLEANDEP, SUBMESH_COMPUTED
|
||||
{
|
||||
MODIF_HYP, MODIF_ALGO_STATE, COMPUTE,
|
||||
CLEAN, CLEANDEP, SUBMESH_COMPUTED, SUBMESH_RESTORED
|
||||
};
|
||||
|
||||
bool AlgoStateEngine(int event, SMESH_Hypothesis * anHyp)
|
||||
throw(SALOME_Exception);
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
AlgoStateEngine(int event, SMESH_Hypothesis * anHyp);
|
||||
|
||||
void SubMeshesAlgoStateEngine(int event, SMESH_Hypothesis * anHyp)
|
||||
throw(SALOME_Exception);
|
||||
SMESH_Hypothesis::Hypothesis_Status
|
||||
SubMeshesAlgoStateEngine(int event, SMESH_Hypothesis * anHyp);
|
||||
|
||||
int GetAlgoState() { return _algoState; }
|
||||
|
||||
void DumpAlgoState(bool isMain);
|
||||
|
||||
bool ComputeStateEngine(int event) throw(SALOME_Exception);
|
||||
bool ComputeStateEngine(int event);
|
||||
|
||||
int GetComputeState()
|
||||
{
|
||||
return _computeState;
|
||||
};
|
||||
|
||||
bool IsConform(const SMESH_Algo* theAlgo);
|
||||
// check if a conform mesh will be produced by the Algo
|
||||
|
||||
bool CanAddHypothesis(const SMESH_Hypothesis* theHypothesis) const;
|
||||
// return true if theHypothesis can be attached to me:
|
||||
// its dimention is checked
|
||||
|
||||
bool IsApplicableHypotesis(const SMESH_Hypothesis* theHypothesis) const;
|
||||
// return true if theHypothesis can be used to mesh me:
|
||||
// its shape type is checked
|
||||
|
||||
|
||||
protected:
|
||||
void InsertDependence(const TopoDS_Shape aSubShape);
|
||||
// void FinalizeDependence(list<TopoDS_Shape>& shapeList);
|
||||
|
||||
bool SubMeshesComputed() throw(SALOME_Exception);
|
||||
bool SubMeshesComputed();
|
||||
|
||||
bool SubMeshesReady();
|
||||
|
||||
void RemoveSubMeshElementsAndNodes();
|
||||
void UpdateDependantsState();
|
||||
void UpdateDependantsState(const compute_event theEvent);
|
||||
void UpdateSubMeshState(const compute_state theState);
|
||||
void ComputeSubMeshStateEngine(int event);
|
||||
void CleanDependants();
|
||||
void ExtractDependants(const TopTools_IndexedDataMapOfShapeListOfShape & M,
|
||||
const TopAbs_ShapeEnum etype);
|
||||
void CleanDependsOn();
|
||||
void SetAlgoState(int state);
|
||||
|
||||
bool IsMeshComputed() const;
|
||||
// check if _subMeshDS contains mesh elements
|
||||
|
||||
TopoDS_Shape GetCollection(SMESH_Gen * theGen, SMESH_Algo* theAlgo);
|
||||
// return a shape containing all sub-shapes of the MainShape that can be
|
||||
// meshed at once along with _subShape
|
||||
|
||||
bool ApplyToCollection (SMESH_Algo* theAlgo,
|
||||
const TopoDS_Shape& theCollection);
|
||||
// Apply theAlgo to all subshapes in theCollection
|
||||
|
||||
SMESH_Hypothesis::Hypothesis_Status CheckConcurentHypothesis (const int theHypType);
|
||||
// check if there are several applicable hypothesis on fathers
|
||||
|
||||
int GetNbAttached(const TopoDS_Shape& theShape,
|
||||
const SMESH_Hypothesis * theHyp,
|
||||
const bool theAlgos = false);
|
||||
// return nb of hypotheses attached to theShape.
|
||||
// If theHyp is provided, similar but not same hypotheses
|
||||
// are countered; else only applicable ones are countered
|
||||
// depending on theAlgos flag
|
||||
|
||||
TopoDS_Shape _subShape;
|
||||
SMESHDS_Mesh * _meshDS;
|
||||
SMESHDS_SubMesh * _subMeshDS;
|
||||
int _Id;
|
||||
SMESH_Mesh *_father;
|
||||
map < int, SMESH_subMesh * >_mapDepend;
|
||||
map < int, SMESH_subMesh * >_mapDependants;
|
||||
//map < int, SMESH_subMesh * >_mapDependants;
|
||||
bool _dependenceAnalysed;
|
||||
bool _dependantsFound;
|
||||
//bool _dependantsFound;
|
||||
|
||||
int _algoState;
|
||||
int _oldAlgoState;
|
||||
//int _oldAlgoState;
|
||||
int _computeState;
|
||||
|
||||
};
|
||||
|
@ -42,7 +42,8 @@ LIB_SRC = \
|
||||
SMESHDS_Script.cxx \
|
||||
SMESHDS_Command.cxx \
|
||||
SMESHDS_SubMesh.cxx \
|
||||
SMESHDS_Mesh.cxx
|
||||
SMESHDS_Mesh.cxx \
|
||||
SMESHDS_Group.cxx
|
||||
|
||||
LIB_CLIENT_IDL =
|
||||
LIB_SERVER_IDL =
|
||||
@ -61,10 +62,11 @@ EXPORT_HEADERS= \
|
||||
SMESHDS_Script.hxx \
|
||||
SMESHDS_Command.hxx \
|
||||
SMESHDS_CommandType.hxx \
|
||||
SMESHDS_SubMesh.hxx
|
||||
SMESHDS_SubMesh.hxx \
|
||||
SMESHDS_Group.hxx
|
||||
|
||||
# additionnal information to compil and link file
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
|
||||
LDFLAGS += $(OCC_KERNEL_LIBS)
|
||||
|
||||
|
@ -100,13 +100,18 @@ bool SMESHDS_Mesh::RemoveHypothesis(const TopoDS_Shape & S,
|
||||
//function : AddNode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshNode* SMESHDS_Mesh::AddNode(double x, double y, double z)
|
||||
{
|
||||
SMDS_MeshNode* SMESHDS_Mesh::AddNode(double x, double y, double z){
|
||||
SMDS_MeshNode* node = SMDS_Mesh::AddNode(x, y, z);
|
||||
if(node!=NULL) myScript->AddNode(node->GetID(), x, y, z);
|
||||
return node;
|
||||
}
|
||||
|
||||
SMDS_MeshNode* SMESHDS_Mesh::AddNodeWithID(double x, double y, double z, int ID){
|
||||
SMDS_MeshNode* node = SMDS_Mesh::AddNodeWithID(x,y,z,ID);
|
||||
if(node!=NULL) myScript->AddNode(node->GetID(), x, y, z);
|
||||
return node;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : MoveNode
|
||||
//purpose :
|
||||
@ -122,104 +127,263 @@ void SMESHDS_Mesh::MoveNode(const SMDS_MeshNode *n, double x, double y, double z
|
||||
//function : AddEdge
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshEdge* SMESHDS_Mesh::AddEdgeWithID(int n1, int n2, int ID)
|
||||
{
|
||||
SMDS_MeshEdge* anElem = SMDS_Mesh::AddEdgeWithID(n1,n2,ID);
|
||||
if(anElem) myScript->AddEdge(ID,n1,n2);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
SMDS_MeshEdge* SMESHDS_Mesh::AddEdgeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
int ID)
|
||||
{
|
||||
return AddEdgeWithID(n1->GetID(),
|
||||
n2->GetID(),
|
||||
ID);
|
||||
}
|
||||
|
||||
SMDS_MeshEdge* SMESHDS_Mesh::AddEdge(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2)
|
||||
{
|
||||
SMDS_MeshEdge* e = SMDS_Mesh::AddEdge(n1,n2);
|
||||
if(e!=NULL) myScript->AddEdge(e->GetID(), n1->GetID(), n2->GetID());
|
||||
return e;
|
||||
SMDS_MeshEdge* anElem = SMDS_Mesh::AddEdge(n1,n2);
|
||||
if(anElem) myScript->AddEdge(anElem->GetID(),
|
||||
n1->GetID(),
|
||||
n2->GetID());
|
||||
return anElem;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :AddFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshFace* SMESHDS_Mesh::AddFaceWithID(int n1, int n2, int n3, int ID)
|
||||
{
|
||||
SMDS_MeshFace *anElem = SMDS_Mesh::AddFaceWithID(n1, n2, n3, ID);
|
||||
if(anElem) myScript->AddFace(ID,n1,n2,n3);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
SMDS_MeshFace* SMESHDS_Mesh::AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
int ID)
|
||||
{
|
||||
return AddFaceWithID(n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
ID);
|
||||
}
|
||||
|
||||
SMDS_MeshFace* SMESHDS_Mesh::AddFace( const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3)
|
||||
{
|
||||
SMDS_MeshFace *f = SMDS_Mesh::AddFace(n1, n2, n3);
|
||||
if(f!=NULL) myScript->AddFace(f->GetID(), n1->GetID(), n2->GetID(),
|
||||
SMDS_MeshFace *anElem = SMDS_Mesh::AddFace(n1, n2, n3);
|
||||
if(anElem) myScript->AddFace(anElem->GetID(),
|
||||
n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID());
|
||||
return f;
|
||||
return anElem;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :AddFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshFace* SMESHDS_Mesh::AddFaceWithID(int n1, int n2, int n3, int n4, int ID)
|
||||
{
|
||||
SMDS_MeshFace *anElem = SMDS_Mesh::AddFaceWithID(n1, n2, n3, n4, ID);
|
||||
if(anElem) myScript->AddFace(ID, n1, n2, n3, n4);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
SMDS_MeshFace* SMESHDS_Mesh::AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
int ID)
|
||||
{
|
||||
return AddFaceWithID(n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
ID);
|
||||
}
|
||||
|
||||
SMDS_MeshFace* SMESHDS_Mesh::AddFace(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4)
|
||||
{
|
||||
SMDS_MeshFace *f = SMDS_Mesh::AddFace(n1, n2, n3, n4);
|
||||
if(f!=NULL)
|
||||
myScript->AddFace(f->GetID(), n1->GetID(), n2->GetID(), n3->GetID(),
|
||||
SMDS_MeshFace *anElem = SMDS_Mesh::AddFace(n1, n2, n3, n4);
|
||||
if(anElem) myScript->AddFace(anElem->GetID(),
|
||||
n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID());
|
||||
return f;
|
||||
return anElem;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :AddVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(int n1, int n2, int n3, int n4, int ID)
|
||||
{
|
||||
SMDS_MeshVolume *anElem = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, ID);
|
||||
if(anElem) myScript->AddVolume(ID, n1, n2, n3, n4);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
int ID)
|
||||
{
|
||||
return AddVolumeWithID(n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
ID);
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4)
|
||||
{
|
||||
SMDS_MeshVolume *f = SMDS_Mesh::AddVolume(n1, n2, n3, n4);
|
||||
if(f!=NULL)
|
||||
myScript->AddVolume(f->GetID(), n1->GetID(), n2->GetID(), n3->GetID(),
|
||||
SMDS_MeshVolume *anElem = SMDS_Mesh::AddVolume(n1, n2, n3, n4);
|
||||
if(anElem) myScript->AddVolume(anElem->GetID(),
|
||||
n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID());
|
||||
return f;
|
||||
return anElem;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :AddVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int ID)
|
||||
{
|
||||
SMDS_MeshVolume *anElem = SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, ID);
|
||||
if(anElem) myScript->AddVolume(ID, n1, n2, n3, n4, n5);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
int ID)
|
||||
{
|
||||
return AddVolumeWithID(n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
n5->GetID(),
|
||||
ID);
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5)
|
||||
{
|
||||
SMDS_MeshVolume *v = SMDS_Mesh::AddVolume(n1, n2, n3, n4, n5);
|
||||
if(v!=NULL)
|
||||
myScript->AddVolume(v->GetID(), n1->GetID(), n2->GetID(), n3->GetID(),
|
||||
n4->GetID(), n5->GetID());
|
||||
return v;
|
||||
SMDS_MeshVolume *anElem = SMDS_Mesh::AddVolume(n1, n2, n3, n4, n5);
|
||||
if(anElem) myScript->AddVolume(anElem->GetID(),
|
||||
n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
n5->GetID());
|
||||
return anElem;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :AddVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int n6, int ID)
|
||||
{
|
||||
SMDS_MeshVolume *anElem= SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, ID);
|
||||
if(anElem) myScript->AddVolume(ID, n1, n2, n3, n4, n5, n6);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6,
|
||||
int ID)
|
||||
{
|
||||
return AddVolumeWithID(n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
n5->GetID(),
|
||||
n6->GetID(),
|
||||
ID);
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6)
|
||||
{
|
||||
SMDS_MeshVolume *v= SMDS_Mesh::AddVolume(n1, n2, n3, n4, n5, n6);
|
||||
if(v!=NULL)
|
||||
myScript->AddVolume(v->GetID(), n1->GetID(), n2->GetID(), n3->GetID(),
|
||||
n4->GetID(), n5->GetID(), n6->GetID());
|
||||
return v;
|
||||
SMDS_MeshVolume *anElem = SMDS_Mesh::AddVolume(n1, n2, n3, n4, n5, n6);
|
||||
if(anElem) myScript->AddVolume(anElem->GetID(),
|
||||
n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
n5->GetID(),
|
||||
n6->GetID());
|
||||
return anElem;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :AddVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int ID)
|
||||
{
|
||||
SMDS_MeshVolume *anElem= SMDS_Mesh::AddVolumeWithID(n1, n2, n3, n4, n5, n6, n7, n8, ID);
|
||||
if(anElem) myScript->AddVolume(ID, n1, n2, n3, n4, n5, n6, n7, n8);
|
||||
return anElem;
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6,
|
||||
const SMDS_MeshNode * n7,
|
||||
const SMDS_MeshNode * n8,
|
||||
int ID)
|
||||
{
|
||||
return AddVolumeWithID(n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
n5->GetID(),
|
||||
n6->GetID(),
|
||||
n7->GetID(),
|
||||
n8->GetID(),
|
||||
ID);
|
||||
}
|
||||
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
@ -228,12 +392,54 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(
|
||||
const SMDS_MeshNode * n7,
|
||||
const SMDS_MeshNode * n8)
|
||||
{
|
||||
SMDS_MeshVolume *v=
|
||||
SMDS_Mesh::AddVolume(n1, n2, n3, n4, n5, n6, n7, n8);
|
||||
if(v!=NULL)
|
||||
myScript->AddVolume(v->GetID(), n1->GetID(), n2->GetID(), n3->GetID(),
|
||||
n4->GetID(), n5->GetID(), n6->GetID(), n7->GetID(), n8->GetID());
|
||||
return v;
|
||||
SMDS_MeshVolume *anElem = SMDS_Mesh::AddVolume(n1, n2, n3, n4, n5, n6, n7, n8);
|
||||
if(anElem) myScript->AddVolume(anElem->GetID(),
|
||||
n1->GetID(),
|
||||
n2->GetID(),
|
||||
n3->GetID(),
|
||||
n4->GetID(),
|
||||
n5->GetID(),
|
||||
n6->GetID(),
|
||||
n7->GetID(),
|
||||
n8->GetID());
|
||||
return anElem;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : removeFromSubMeshes
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
static void removeFromSubMeshes (map<int,SMESHDS_SubMesh*> & theSubMeshes,
|
||||
list<const SMDS_MeshElement *> & theElems,
|
||||
const bool isNode)
|
||||
{
|
||||
if ( theElems.empty() )
|
||||
return;
|
||||
|
||||
map<int,SMESHDS_SubMesh*>::iterator SubIt = theSubMeshes.begin();
|
||||
for ( ; SubIt != theSubMeshes.end(); SubIt++ )
|
||||
{
|
||||
list<const SMDS_MeshElement *>::iterator elIt = theElems.begin();
|
||||
while ( elIt != theElems.end() )
|
||||
{
|
||||
bool removed = false;
|
||||
if ( isNode )
|
||||
removed = (*SubIt).second->RemoveNode( static_cast<const SMDS_MeshNode*> (*elIt) );
|
||||
else
|
||||
removed = (*SubIt).second->RemoveElement( *elIt );
|
||||
|
||||
if (removed)
|
||||
{
|
||||
elIt = theElems.erase( elIt );
|
||||
if ( theElems.empty() )
|
||||
return; // all elements are found and removed
|
||||
}
|
||||
else
|
||||
{
|
||||
elIt++ ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -242,8 +448,15 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddVolume(
|
||||
//=======================================================================
|
||||
void SMESHDS_Mesh::RemoveNode(const SMDS_MeshNode * n)
|
||||
{
|
||||
SMDS_Mesh::RemoveNode(n);
|
||||
myScript->RemoveNode(n->GetID());
|
||||
|
||||
list<const SMDS_MeshElement *> removedElems;
|
||||
list<const SMDS_MeshElement *> removedNodes;
|
||||
|
||||
SMDS_Mesh::RemoveElement( n, removedElems, removedNodes, true );
|
||||
|
||||
removeFromSubMeshes( myShapeIndexToSubMesh, removedElems, false );
|
||||
removeFromSubMeshes( myShapeIndexToSubMesh, removedNodes, true );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -252,8 +465,20 @@ void SMESHDS_Mesh::RemoveNode(const SMDS_MeshNode * n)
|
||||
//========================================================================
|
||||
void SMESHDS_Mesh::RemoveElement(const SMDS_MeshElement * elt)
|
||||
{
|
||||
SMDS_Mesh::RemoveElement(elt);
|
||||
if (elt->GetType() == SMDSAbs_Node)
|
||||
{
|
||||
RemoveNode( static_cast<const SMDS_MeshNode*>( elt ));
|
||||
return;
|
||||
}
|
||||
|
||||
myScript->RemoveElement(elt->GetID());
|
||||
|
||||
list<const SMDS_MeshElement *> removedElems;
|
||||
list<const SMDS_MeshElement *> removedNodes;
|
||||
|
||||
SMDS_Mesh::RemoveElement(elt, removedElems, removedNodes, false);
|
||||
|
||||
removeFromSubMeshes( myShapeIndexToSubMesh, removedElems, false );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -291,7 +516,7 @@ void SMESHDS_Mesh::SetNodeOnFace(SMDS_MeshNode * aNode,
|
||||
int Index = myIndexToShape.FindIndex(S);
|
||||
|
||||
//Set Position on Node
|
||||
aNode->SetPosition(new SMDS_FacePosition(Index, 0., 0.));
|
||||
aNode->SetPosition(SMDS_PositionPtr(new SMDS_FacePosition(Index, 0., 0.)));
|
||||
|
||||
//Update or build submesh
|
||||
map<int,SMESHDS_SubMesh*>::iterator it=myShapeIndexToSubMesh.find(Index);
|
||||
@ -313,7 +538,7 @@ void SMESHDS_Mesh::SetNodeOnEdge(SMDS_MeshNode * aNode,
|
||||
int Index = myIndexToShape.FindIndex(S);
|
||||
|
||||
//Set Position on Node
|
||||
aNode->SetPosition(new SMDS_EdgePosition(Index, 0.));
|
||||
aNode->SetPosition(SMDS_PositionPtr(new SMDS_EdgePosition(Index, 0.)));
|
||||
|
||||
//Update or build submesh
|
||||
map<int,SMESHDS_SubMesh*>::iterator it=myShapeIndexToSubMesh.find(Index);
|
||||
@ -335,7 +560,7 @@ void SMESHDS_Mesh::SetNodeOnVertex(SMDS_MeshNode * aNode,
|
||||
int Index = myIndexToShape.FindIndex(S);
|
||||
|
||||
//Set Position on Node
|
||||
aNode->SetPosition(new SMDS_VertexPosition(Index));
|
||||
aNode->SetPosition(SMDS_PositionPtr(new SMDS_VertexPosition(Index)));
|
||||
|
||||
//Update or build submesh
|
||||
map<int,SMESHDS_SubMesh*>::iterator it=myShapeIndexToSubMesh.find(Index);
|
||||
@ -411,6 +636,33 @@ SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const TopoDS_Shape & S)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the sub mesh by Id of shape it is linked to
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const int Index)
|
||||
{
|
||||
if (myShape.IsNull()) MESSAGE("myShape is NULL");
|
||||
|
||||
if (myShapeIndexToSubMesh.find(Index)!=myShapeIndexToSubMesh.end())
|
||||
return myShapeIndexToSubMesh[Index];
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SubMeshIndices
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
list<int> SMESHDS_Mesh::SubMeshIndices()
|
||||
{
|
||||
list<int> anIndices;
|
||||
std::map<int,SMESHDS_SubMesh*>::iterator anIter = myShapeIndexToSubMesh.begin();
|
||||
for (; anIter != myShapeIndexToSubMesh.end(); anIter++) {
|
||||
anIndices.push_back((*anIter).first);
|
||||
}
|
||||
return anIndices;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetHypothesis
|
||||
//purpose :
|
||||
@ -520,7 +772,7 @@ void SMESHDS_Mesh::SetNodeInVolume(const SMDS_MeshNode* aNode, int Index)
|
||||
void SMESHDS_Mesh::SetNodeOnFace(SMDS_MeshNode* aNode, int Index)
|
||||
{
|
||||
//Set Position on Node
|
||||
aNode->SetPosition(new SMDS_FacePosition(Index, 0., 0.));
|
||||
aNode->SetPosition(SMDS_PositionPtr(new SMDS_FacePosition(Index, 0., 0.)));
|
||||
|
||||
//Update or build submesh
|
||||
if (myShapeIndexToSubMesh.find(Index)==myShapeIndexToSubMesh.end())
|
||||
@ -536,7 +788,7 @@ void SMESHDS_Mesh::SetNodeOnFace(SMDS_MeshNode* aNode, int Index)
|
||||
void SMESHDS_Mesh::SetNodeOnEdge(SMDS_MeshNode* aNode, int Index)
|
||||
{
|
||||
//Set Position on Node
|
||||
aNode->SetPosition(new SMDS_EdgePosition(Index, 0.));
|
||||
aNode->SetPosition(SMDS_PositionPtr(new SMDS_EdgePosition(Index, 0.)));
|
||||
|
||||
//Update or build submesh
|
||||
if (myShapeIndexToSubMesh.find(Index)==myShapeIndexToSubMesh.end())
|
||||
@ -552,7 +804,7 @@ void SMESHDS_Mesh::SetNodeOnEdge(SMDS_MeshNode* aNode, int Index)
|
||||
void SMESHDS_Mesh::SetNodeOnVertex(SMDS_MeshNode* aNode, int Index)
|
||||
{
|
||||
//Set Position on Node
|
||||
aNode->SetPosition(new SMDS_VertexPosition(Index));
|
||||
aNode->SetPosition(SMDS_PositionPtr(new SMDS_VertexPosition(Index)));
|
||||
|
||||
//Update or build submesh
|
||||
if (myShapeIndexToSubMesh.find(Index)==myShapeIndexToSubMesh.end())
|
||||
|
@ -49,56 +49,97 @@
|
||||
#include <hash_map.h>
|
||||
#else
|
||||
#include <ext/hash_map>
|
||||
using namespace __gnu_cxx;
|
||||
namespace gstd = __gnu_cxx;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
class SMESHDS_Mesh:public SMDS_Mesh
|
||||
{
|
||||
|
||||
class SMESHDS_Mesh:public SMDS_Mesh{
|
||||
public:
|
||||
|
||||
SMESHDS_Mesh(int MeshID);
|
||||
void ShapeToMesh(const TopoDS_Shape & S);
|
||||
bool AddHypothesis(const TopoDS_Shape & SS, const SMESHDS_Hypothesis * H);
|
||||
bool RemoveHypothesis(const TopoDS_Shape & S, const SMESHDS_Hypothesis * H);
|
||||
SMDS_MeshNode * AddNode(double x, double y, double z);
|
||||
void RemoveNode(const SMDS_MeshNode *);
|
||||
void MoveNode(const SMDS_MeshNode *, double x, double y, double z);
|
||||
SMDS_MeshEdge* AddEdge(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshNode* AddNodeWithID(double x, double y, double z, int ID);
|
||||
virtual SMDS_MeshNode * AddNode(double x, double y, double z);
|
||||
|
||||
virtual SMDS_MeshEdge* AddEdgeWithID(int n1, int n2, int ID);
|
||||
virtual SMDS_MeshEdge* AddEdgeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
int ID);
|
||||
virtual SMDS_MeshEdge* AddEdge(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2);
|
||||
SMDS_MeshFace* AddFace(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int ID);
|
||||
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
int ID);
|
||||
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3);
|
||||
SMDS_MeshFace* AddFace(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshFace* AddFaceWithID(int n1, int n2, int n3, int n4, int ID);
|
||||
virtual SMDS_MeshFace* AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
int ID);
|
||||
virtual SMDS_MeshFace* AddFace(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4);
|
||||
SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4);
|
||||
SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5);
|
||||
SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int n6, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6);
|
||||
SMDS_MeshVolume* AddVolume(
|
||||
const SMDS_MeshNode * n1,
|
||||
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int ID);
|
||||
virtual SMDS_MeshVolume* AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
const SMDS_MeshNode * n5,
|
||||
const SMDS_MeshNode * n6,
|
||||
const SMDS_MeshNode * n7,
|
||||
const SMDS_MeshNode * n8,
|
||||
int ID);
|
||||
virtual SMDS_MeshVolume* AddVolume(const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2,
|
||||
const SMDS_MeshNode * n3,
|
||||
const SMDS_MeshNode * n4,
|
||||
@ -107,7 +148,10 @@ class SMESHDS_Mesh:public SMDS_Mesh
|
||||
const SMDS_MeshNode * n7,
|
||||
const SMDS_MeshNode * n8);
|
||||
|
||||
void MoveNode(const SMDS_MeshNode *, double x, double y, double z);
|
||||
virtual void RemoveNode(const SMDS_MeshNode *);
|
||||
void RemoveElement(const SMDS_MeshElement *);
|
||||
|
||||
void SetNodeInVolume(SMDS_MeshNode * aNode, const TopoDS_Shell & S);
|
||||
void SetNodeOnFace(SMDS_MeshNode * aNode, const TopoDS_Face & S);
|
||||
void SetNodeOnEdge(SMDS_MeshNode * aNode, const TopoDS_Edge & S);
|
||||
@ -120,31 +164,43 @@ class SMESHDS_Mesh:public SMDS_Mesh
|
||||
TopoDS_Shape ShapeToMesh() const;
|
||||
bool HasMeshElements(const TopoDS_Shape & S);
|
||||
SMESHDS_SubMesh * MeshElements(const TopoDS_Shape & S);
|
||||
SMESHDS_SubMesh * MeshElements(const int Index);
|
||||
list<int> SubMeshIndices();
|
||||
const std::map<int,SMESHDS_SubMesh*>& SubMeshes()
|
||||
{ return myShapeIndexToSubMesh; }
|
||||
|
||||
bool HasHypothesis(const TopoDS_Shape & S);
|
||||
const list<const SMESHDS_Hypothesis*>& GetHypothesis(const TopoDS_Shape & S) const;
|
||||
SMESHDS_Script * GetScript();
|
||||
void ClearScript();
|
||||
int ShapeToIndex(const TopoDS_Shape & aShape);
|
||||
TopoDS_Shape IndexToShape(int ShapeIndex);
|
||||
|
||||
void NewSubMesh(int Index);
|
||||
void SetNodeInVolume(const SMDS_MeshNode * aNode, int Index);
|
||||
void SetNodeOnFace(SMDS_MeshNode * aNode, int Index);
|
||||
void SetNodeOnEdge(SMDS_MeshNode * aNode, int Index);
|
||||
void SetNodeOnVertex(SMDS_MeshNode * aNode, int Index);
|
||||
void SetMeshElementOnShape(const SMDS_MeshElement * anElt, int Index);
|
||||
|
||||
~SMESHDS_Mesh();
|
||||
|
||||
private:
|
||||
struct HashTopoDS_Shape
|
||||
{
|
||||
size_t operator()(const TopoDS_Shape& S) const {return S.HashCode(2147483647);}
|
||||
struct HashTopoDS_Shape{
|
||||
size_t operator()(const TopoDS_Shape& S) const {
|
||||
return S.HashCode(2147483647);
|
||||
}
|
||||
};
|
||||
typedef hash_map<TopoDS_Shape, list<const SMESHDS_Hypothesis*>,HashTopoDS_Shape > ShapeToHypothesis;
|
||||
typedef std::list<const SMESHDS_Hypothesis*> THypList;
|
||||
typedef gstd::hash_map<TopoDS_Shape,THypList,HashTopoDS_Shape> ShapeToHypothesis;
|
||||
ShapeToHypothesis myShapeToHypothesis;
|
||||
|
||||
int myMeshID;
|
||||
TopoDS_Shape myShape;
|
||||
TopTools_IndexedMapOfShape myIndexToShape;
|
||||
map<int,SMESHDS_SubMesh*> myShapeIndexToSubMesh;
|
||||
ShapeToHypothesis myShapeToHypothesis;
|
||||
std::map<int,SMESHDS_SubMesh*> myShapeIndexToSubMesh;
|
||||
SMESHDS_Script* myScript;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -42,9 +42,12 @@ void SMESHDS_SubMesh::AddElement(const SMDS_MeshElement * ME)
|
||||
//function : RemoveElement
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * ME)
|
||||
bool SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * ME)
|
||||
{
|
||||
myElements.erase(ME);
|
||||
if ( NbElements() )
|
||||
return myElements.erase(ME);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -60,9 +63,12 @@ void SMESHDS_SubMesh::AddNode(const SMDS_MeshNode * N)
|
||||
//function : RemoveNode
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N)
|
||||
bool SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N)
|
||||
{
|
||||
myNodes.erase(N);
|
||||
if ( NbNodes() )
|
||||
return myNodes.erase(N);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -85,8 +91,9 @@ int SMESHDS_SubMesh::NbNodes() const
|
||||
|
||||
template<typename T> class MySetIterator:public SMDS_Iterator<const T*>
|
||||
{
|
||||
const set<const T*>& mySet;
|
||||
set<const T*>::const_iterator myIt;
|
||||
typedef const set<const T*> TSet;
|
||||
typename TSet::const_iterator myIt;
|
||||
TSet& mySet;
|
||||
|
||||
public:
|
||||
MySetIterator(const set<const T*>& s):mySet(s), myIt(s.begin())
|
||||
@ -108,17 +115,17 @@ template<typename T> class MySetIterator:public SMDS_Iterator<const T*>
|
||||
///Return an iterator on the elements of submesh
|
||||
///The created iterator must be free by the caller
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_Iterator<const SMDS_MeshElement*> * SMESHDS_SubMesh::GetElements() const
|
||||
SMDS_ElemIteratorPtr SMESHDS_SubMesh::GetElements() const
|
||||
{
|
||||
return new MySetIterator<SMDS_MeshElement>(myElements);
|
||||
return SMDS_ElemIteratorPtr(new MySetIterator<SMDS_MeshElement>(myElements));
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
///Return an iterator on the nodes of submesh
|
||||
///The created iterator must be free by the caller
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
SMDS_Iterator<const SMDS_MeshNode*> * SMESHDS_SubMesh::GetNodes() const
|
||||
SMDS_NodeIteratorPtr SMESHDS_SubMesh::GetNodes() const
|
||||
{
|
||||
return new MySetIterator<SMDS_MeshNode>(myNodes);
|
||||
return SMDS_NodeIteratorPtr(new MySetIterator<SMDS_MeshNode>(myNodes));
|
||||
}
|
||||
|
||||
|
@ -36,13 +36,13 @@ class SMESHDS_SubMesh
|
||||
{
|
||||
public:
|
||||
void AddElement(const SMDS_MeshElement * ME);
|
||||
void RemoveElement(const SMDS_MeshElement * ME);
|
||||
bool RemoveElement(const SMDS_MeshElement * ME); // ret true if ME was in
|
||||
void AddNode(const SMDS_MeshNode * ME);
|
||||
void RemoveNode(const SMDS_MeshNode * ME);
|
||||
bool RemoveNode(const SMDS_MeshNode * ME); // ret true if ME was in
|
||||
int NbElements() const;
|
||||
SMDS_Iterator<const SMDS_MeshElement*> * GetElements() const;
|
||||
SMDS_ElemIteratorPtr GetElements() const;
|
||||
int NbNodes() const;
|
||||
SMDS_Iterator<const SMDS_MeshNode*> * GetNodes() const;
|
||||
SMDS_NodeIteratorPtr GetNodes() const;
|
||||
|
||||
private:
|
||||
const SMDS_Mesh * myMesh;
|
||||
|
@ -17,5 +17,6 @@ enum MeshObjectType {
|
||||
SUBMESH_EDGE,
|
||||
SUBMESH_FACE,
|
||||
SUBMESH_SOLID,
|
||||
SUBMESH_COMPOUND
|
||||
SUBMESH_COMPOUND,
|
||||
GROUP
|
||||
};
|
||||
|
@ -29,111 +29,92 @@ Standard_Boolean SMESH_TypeFilter::IsOk(const Handle(SALOME_InteractiveObject)&
|
||||
if ( !meshFilter->IsOk(anObj) )
|
||||
return false;
|
||||
|
||||
bool Ok = false;
|
||||
|
||||
if ( anObj->hasEntry() ) {
|
||||
QAD_Study* ActiveStudy = QAD_Application::getDesktop()->getActiveStudy();
|
||||
SALOMEDS::Study_var aStudy = ActiveStudy->getStudyDocument();
|
||||
SALOMEDS::SObject_var obj = aStudy->FindObjectID( anObj->getEntry() );
|
||||
|
||||
bool Ok = false;
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if ( strlen( obj->GetID() ) <= strlen( objComponent->GetID() ) )
|
||||
return false;
|
||||
|
||||
switch ( myKind )
|
||||
{
|
||||
case HYPOTHESIS:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
if (( objFather->Tag() == 1 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) )
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case ALGORITHM:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
if (( objFather->Tag() == 2 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) )
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case MESH:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( obj->Tag() >= 3 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) == 0 ) )
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( objFather->Tag() >= 4 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) )
|
||||
if (( objFather->Tag() >= 4 && objFather->Tag() < 9 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) )
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case MESHorSUBMESH:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( obj->Tag() >= 3 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) == 0 ) )
|
||||
Ok = true;
|
||||
|
||||
if (( objFather->Tag() >= 4 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) )
|
||||
if (( objFather->Tag() >= 4 && objFather->Tag() < 9 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) )
|
||||
Ok = true;
|
||||
|
||||
break;
|
||||
}
|
||||
case SUBMESH_VERTEX:
|
||||
case SUBMESH_VERTEX: // Label "SubMeshes on vertexes"
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( obj->Tag() == 4 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 ))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_EDGE:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( obj->Tag() == 5 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 ))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_FACE:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( obj->Tag() == 6 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 ))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_SOLID:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( obj->Tag() == 7 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 ))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case SUBMESH_COMPOUND:
|
||||
{
|
||||
SALOMEDS::SObject_var objFather = obj->GetFather();
|
||||
SALOMEDS::SComponent_var objComponent = obj->GetFatherComponent();
|
||||
|
||||
if (( obj->Tag() == 8 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) && ( objFather->Tag() >= 3 ))
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
case GROUP:
|
||||
{
|
||||
if (( objFather->Tag() >= 9 ) && (strcmp( objFather->GetID(), objComponent->GetID() ) != 0 ) )
|
||||
Ok = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( Ok )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return Ok;
|
||||
}
|
||||
|
@ -29,14 +29,18 @@
|
||||
top_srcdir=@top_srcdir@
|
||||
top_builddir=../..
|
||||
srcdir=@srcdir@
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl:${KERNEL_ROOT_DIR}/idl/salome:${MED_ROOT_DIR}/idl/salome
|
||||
VPATH=.:@srcdir@:@top_srcdir@/idl:$(top_builddir)/idl
|
||||
|
||||
|
||||
@COMMENCE@
|
||||
|
||||
# header files
|
||||
EXPORT_HEADERS= SMESHGUI_Swig.hxx \
|
||||
SMESHGUI_Swig.i
|
||||
SMESHGUI_Swig.i \
|
||||
SMESHGUI.h \
|
||||
SMESHGUI_Hypotheses.h \
|
||||
SMESHGUI_SpinBox.h \
|
||||
SMESHGUI_StudyAPI.h
|
||||
|
||||
# .po files to transform in .qm
|
||||
PO_FILES = \
|
||||
@ -53,28 +57,28 @@ LIB_SRC = SMESHGUI.cxx \
|
||||
SMESHGUI_AddAlgorithmDlg.cxx \
|
||||
SMESHGUI_InitMeshDlg.cxx \
|
||||
SMESHGUI_AddSubMeshDlg.cxx \
|
||||
SMESHGUI_LocalLengthDlg.cxx \
|
||||
SMESHGUI_NbSegmentsDlg.cxx \
|
||||
SMESHGUI_TransparencyDlg.cxx \
|
||||
SMESHGUI_GroupDlg.cxx \
|
||||
SMESHGUI_RemoveNodesDlg.cxx \
|
||||
SMESHGUI_RemoveElementsDlg.cxx \
|
||||
SMESHGUI_MeshInfosDlg.cxx \
|
||||
SMESHGUI_Preferences_ColorDlg.cxx \
|
||||
SMESHGUI_MaxElementAreaDlg.cxx \
|
||||
SMESHGUI_Preferences_ScalarBarDlg.cxx \
|
||||
SMESHGUI_EditScalarBarDlg.cxx \
|
||||
SMESHGUI_Preferences_SelectionDlg.cxx \
|
||||
SMESHGUI_aParameterDlg.cxx \
|
||||
SMESHGUI_MaxElementVolumeDlg.cxx \
|
||||
SMESHGUI_Swig.cxx \
|
||||
SMESHGUI_ComputeScalarValue.cxx \
|
||||
SMESHGUI_MoveNodesDlg.cxx \
|
||||
SMESHGUI_OrientationElementsDlg.cxx \
|
||||
SMESHGUI_DiagonalInversionDlg.cxx \
|
||||
SMESHGUI_EdgesConnectivityDlg.cxx \
|
||||
SMESHGUI_AddFaceDlg.cxx \
|
||||
SMESHGUI_AddVolumeDlg.cxx \
|
||||
SMESHGUI_AddEdgeDlg.cxx \
|
||||
SMESHGUI_EditHypothesesDlg.cxx
|
||||
SMESHGUI_EditHypothesesDlg.cxx \
|
||||
SMESHGUI_CreateHypothesesDlg.cxx \
|
||||
SMESHGUI_XmlHandler.cxx \
|
||||
SMESHGUI_Filter.cxx \
|
||||
SMESHGUI_FilterDlg.cxx
|
||||
|
||||
LIB_MOC = \
|
||||
SMESHGUI.h \
|
||||
@ -84,26 +88,24 @@ LIB_MOC = \
|
||||
SMESHGUI_AddAlgorithmDlg.h \
|
||||
SMESHGUI_InitMeshDlg.h \
|
||||
SMESHGUI_AddSubMeshDlg.h \
|
||||
SMESHGUI_LocalLengthDlg.h \
|
||||
SMESHGUI_NbSegmentsDlg.h \
|
||||
SMESHGUI_TransparencyDlg.h \
|
||||
SMESHGUI_GroupDlg.h \
|
||||
SMESHGUI_RemoveNodesDlg.h \
|
||||
SMESHGUI_RemoveElementsDlg.h \
|
||||
SMESHGUI_MeshInfosDlg.h \
|
||||
SMESHGUI_Preferences_ColorDlg.h \
|
||||
SMESHGUI_MaxElementAreaDlg.h \
|
||||
SMESHGUI_Preferences_ScalarBarDlg.h \
|
||||
SMESHGUI_EditScalarBarDlg.h \
|
||||
SMESHGUI_Preferences_SelectionDlg.h \
|
||||
SMESHGUI_aParameterDlg.h \
|
||||
SMESHGUI_MaxElementVolumeDlg.h \
|
||||
SMESHGUI_MoveNodesDlg.h \
|
||||
SMESHGUI_OrientationElementsDlg.h \
|
||||
SMESHGUI_DiagonalInversionDlg.h \
|
||||
SMESHGUI_EdgesConnectivityDlg.h \
|
||||
SMESHGUI_AddEdgeDlg.h \
|
||||
SMESHGUI_AddVolumeDlg.h \
|
||||
SMESHGUI_AddFaceDlg.h \
|
||||
SMESHGUI_EditHypothesesDlg.h
|
||||
SMESHGUI_EditHypothesesDlg.h \
|
||||
SMESHGUI_CreateHypothesesDlg.h \
|
||||
SMESHGUI_FilterDlg.h
|
||||
|
||||
LIB_CLIENT_IDL = SALOME_Exception.idl \
|
||||
GEOM_Gen.idl \
|
||||
@ -111,21 +113,25 @@ LIB_CLIENT_IDL = SALOME_Exception.idl \
|
||||
SMESH_Gen.idl \
|
||||
SMESH_Mesh.idl \
|
||||
SMESH_Hypothesis.idl \
|
||||
SMESH_BasicHypothesis.idl \
|
||||
SMESH_Group.idl \
|
||||
SALOMEDS.idl \
|
||||
SALOMEDS_Attributes.idl \
|
||||
SALOME_ModuleCatalog.idl \
|
||||
SALOME_Component.idl \
|
||||
MED.idl
|
||||
MED.idl \
|
||||
SMESH_Filter.idl \
|
||||
SALOME_GenericObj.idl
|
||||
|
||||
LIB_SERVER_IDL =
|
||||
|
||||
# additionnal information to compil and link file
|
||||
|
||||
CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(MED2_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome -I${GEOM_ROOT_DIR}/include/salome
|
||||
CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) \
|
||||
$(MED2_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome -I${GEOM_ROOT_DIR}/include/salome \
|
||||
$(BOOST_CPPFLAGS)
|
||||
CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -I${GEOM_ROOT_DIR}/include/salome
|
||||
#$(OCC_CXXFLAGS)
|
||||
|
||||
LDFLAGS += -lOCCViewer -lVTKViewer -lSalomeObject -lSalomeGUI -lSMESHObject -lSMDS -lSMESHDS -lSMESHFiltersSelection -lGEOMClient -lMeshDriverDAT -lMeshDriverMED -lMeshDriverUNV $(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome
|
||||
LDFLAGS += -lOCCViewer -lVTKViewer -lSalomeObject -lSalomeGUI -lSMESHObject -lSMDS -lSMESHDS -lSMESHFiltersSelection -lGEOMClient -lMeshDriverDAT -lMeshDriverMED -lMeshDriverUNV $(OCC_KERNEL_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome -L${GEOM_ROOT_DIR}/lib/salome -lSalomeGenericObj
|
||||
|
||||
@CONCLUDE@
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,7 @@
|
||||
#define SMESHGUI_HeaderFile
|
||||
|
||||
#include "TColStd_MapOfInteger.hxx"
|
||||
#include <map>
|
||||
|
||||
#include "SMESHDS_Document.hxx"
|
||||
|
||||
@ -38,24 +39,30 @@
|
||||
#include "SALOME_Selection.h"
|
||||
#include "SALOME_InteractiveObject.hxx"
|
||||
|
||||
#include "SMESH_Actor.h"
|
||||
|
||||
#include "SMESHGUI_StudyAPI.h"
|
||||
#include "SMESHGUI_Hypotheses.h"
|
||||
|
||||
// IDL Headers
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_Gen)
|
||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||
#include CORBA_SERVER_HEADER(SMESH_Group)
|
||||
#include CORBA_SERVER_HEADER(SMESH_Hypothesis)
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
#include CORBA_SERVER_HEADER(GEOM_Gen)
|
||||
#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
|
||||
#include CORBA_SERVER_HEADER(SMESH_Filter)
|
||||
|
||||
// QT Includes
|
||||
#include <qstringlist.h>
|
||||
|
||||
// VTK Inlcudes
|
||||
#include <vtkScalarBarActor.h>
|
||||
// VTK Inlcludes
|
||||
|
||||
class vtkActorCollection;
|
||||
class vtkActor2DCollection;
|
||||
class vtkScalarBarActor;
|
||||
class vtkActor;
|
||||
|
||||
class SMESH_Actor;
|
||||
|
||||
//=================================================================================
|
||||
// class : SMESHGUI
|
||||
@ -92,6 +99,13 @@ private :
|
||||
|
||||
bool myAutomaticUpdate;
|
||||
|
||||
SMESH::FilterManager_var myFilterMgr;
|
||||
|
||||
// Hypotheses/algorithms from plugin libraries
|
||||
map<string, HypothesisData*> myHypothesesMap;
|
||||
map<string, HypothesisData*> myAlgorithmsMap;
|
||||
map<string, SMESHGUI_GenericHypothesisCreator*> myHypCreatorMap;
|
||||
|
||||
public :
|
||||
|
||||
SMESHGUI();
|
||||
@ -105,8 +119,6 @@ public :
|
||||
SALOMEDS::Study_ptr GetStudy();
|
||||
SMESHGUI_StudyAPI GetStudyAPI();
|
||||
|
||||
vtkScalarBarActor* GetScalarBar();
|
||||
|
||||
QDialog* GetActiveDialogBox() ;
|
||||
void SetActiveDialogBox(QDialog* aDlg) ;
|
||||
|
||||
@ -140,79 +152,57 @@ public :
|
||||
/* Mesh Management */
|
||||
SMESH::SMESH_Mesh_ptr InitMesh( GEOM::GEOM_Shape_ptr aShape, QString NameMesh );
|
||||
SMESH::SMESH_subMesh_ptr AddSubMesh( SMESH::SMESH_Mesh_ptr aMesh, GEOM::GEOM_Shape_ptr aShape, QString NameMesh );
|
||||
SMESH::SMESH_Group_ptr AddGroup( SMESH::SMESH_Mesh_ptr aMesh, SMESH::ElementType aType, QString aName );
|
||||
|
||||
/* Hypothesis Management */
|
||||
SMESH::SMESH_Hypothesis_ptr CreateHypothesis( QString TypeHypothesis, QString NameHypothesis );
|
||||
void AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp ) ;
|
||||
void AddHypothesisOnSubMesh( SMESH::SMESH_subMesh_ptr aSubMesh, SMESH::SMESH_Hypothesis_ptr aHyp ) ;
|
||||
/* Hypotheses and Algorithms Management */
|
||||
void InitAvailableHypotheses ();
|
||||
QStringList GetAvailableHypotheses (const bool isAlgo);
|
||||
HypothesisData* GetHypothesisData (const char* aHypType);
|
||||
SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator (const QString& aHypType);
|
||||
|
||||
void RemoveHypothesisOrAlgorithmOnMesh( const Handle(SALOME_InteractiveObject)& IObject ) ;
|
||||
void RemoveHypothesisOrAlgorithmOnMesh( SALOMEDS::SObject_ptr MorSM, SMESH::SMESH_Hypothesis_ptr anHyp ) ;
|
||||
SMESH::SMESH_Hypothesis_ptr CreateHypothesis (const QString& aHypType,
|
||||
const QString& aHypName,
|
||||
const bool isAlgo = false);
|
||||
|
||||
void CreateLocalLength( QString TypeHypothesis, QString NameHypothesis, double Length );
|
||||
void CreateNbSegments( QString TypeHypothesis, QString NameHypothesis, int nbSegments );
|
||||
void CreateMaxElementArea( QString TypeHypothesis, QString NameHypothesis, double MaxArea );
|
||||
void CreateMaxElementVolume( QString TypeHypothesis, QString NameHypothesis, double MaxVolume );
|
||||
bool AddHypothesisOnMesh (SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp);
|
||||
bool AddAlgorithmOnMesh (SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp);
|
||||
|
||||
/* Algorithms Management */
|
||||
void AddAlgorithmOnMesh( SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp );
|
||||
void AddAlgorithmOnSubMesh( SMESH::SMESH_subMesh_ptr aSubMesh, SMESH::SMESH_Hypothesis_ptr aHyp );
|
||||
void CreateAlgorithm( QString TypeAlgo, QString NameAlgo );
|
||||
bool AddHypothesisOnSubMesh (SMESH::SMESH_subMesh_ptr aSubMesh, SMESH::SMESH_Hypothesis_ptr aHyp);
|
||||
bool AddAlgorithmOnSubMesh (SMESH::SMESH_subMesh_ptr aSubMesh, SMESH::SMESH_Hypothesis_ptr aHyp);
|
||||
|
||||
bool RemoveHypothesisOrAlgorithmOnMesh (const Handle(SALOME_InteractiveObject)& IObject);
|
||||
bool RemoveHypothesisOrAlgorithmOnMesh (SALOMEDS::SObject_ptr MorSM,
|
||||
SMESH::SMESH_Hypothesis_ptr anHyp);
|
||||
|
||||
void SetPickable(SMESH_Actor* theActor = NULL);
|
||||
|
||||
/* NODES */
|
||||
void ViewNodes();
|
||||
vtkActor* SimulationMoveNode(SMESH_Actor* Mactor, int idnode);
|
||||
void MoveNode( SMESH::SMESH_Mesh_ptr aMesh, int idnode, float x, float y, float z);
|
||||
void AddNode(SMESH_Actor*, int idnode, float x, float y, float z) ;
|
||||
void AddNodes( SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
|
||||
void DisplaySimulationNode( SMESH::SMESH_Mesh_ptr aMesh, float x, float y, float z);
|
||||
void DisplaySimulationMoveNode( vtkActor* ac, int idnode, float x, float y, float z);
|
||||
|
||||
void RemoveNode(SMESH_Actor*, int idnode) ;
|
||||
void RemoveNodes(SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex) ;
|
||||
void RemoveNodes(SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
|
||||
/* EDGES */
|
||||
void AddEdge(SMESH_Actor*, int idedge, int idnode1, int idnode2) ;
|
||||
void AddEdges( SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
void DisplayEdges(SMESH_Actor* ac, bool visibility = true);
|
||||
void DisplayEdgesConnectivityLegendBox(vtkActor *ac);
|
||||
void DisplaySimulationEdge( SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex );
|
||||
|
||||
/* TRIANGLES */
|
||||
void AddTriangle(SMESH_Actor*, int idtri, int idnode1, int idnode2, int idnode3) ;
|
||||
void AddTriangles( SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
void DisplaySimulationTriangle( SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex, bool reverse );
|
||||
|
||||
/* QUADRANGLES */
|
||||
void AddQuadrangle(SMESH_Actor*, int idquad, int idnode1, int idnode2,
|
||||
int idnode3, int idnode4) ;
|
||||
void AddQuadrangles( SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
void DisplaySimulationQuadrangle( SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex, bool reverse );
|
||||
|
||||
/* VOLUMES */
|
||||
void AddTetra(SMESH_Actor*, int idtetra, int idnode1, int idnode2,
|
||||
int idnode3, int idnode4) ;
|
||||
void AddHexaedre(SMESH_Actor*, int idhexa, int idnode1, int idnode2,
|
||||
int idnode3, int idnode4, int idnode5, int idnode6, int idnode7, int idnode8) ;
|
||||
void AddTetras( SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
void AddHexaedres( SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
void DisplaySimulationTetra( SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex );
|
||||
void DisplaySimulationHexa( SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex );
|
||||
|
||||
/* ELEMENTS */
|
||||
void RemoveElement(SMESH_Actor*, int idnode);
|
||||
void RemoveElements(SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex) ;
|
||||
void RemoveElements(SMESH_Actor* Mactor, int number,
|
||||
const SMESH::double_array& coords, const SMESH::long_array& indexes);
|
||||
void OrientationElements(SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex);
|
||||
void DiagonalInversion(SMESH::SMESH_Mesh_ptr aMesh, const TColStd_MapOfInteger& MapIndex);
|
||||
|
||||
@ -239,6 +229,7 @@ public :
|
||||
|
||||
SMESH::SMESH_Mesh_ptr ConvertIOinMesh(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult) ;
|
||||
SMESH::SMESH_subMesh_ptr ConvertIOinSubMesh(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult) ;
|
||||
SMESH::SMESH_Group_ptr ConvertIOinSMESHGroup(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult) ;
|
||||
|
||||
/* Geometry Client */
|
||||
GEOM::GEOM_Shape_ptr ConvertIOinGEOMShape( const Handle(SALOME_InteractiveObject)& IO,
|
||||
@ -257,7 +248,7 @@ public :
|
||||
void SetViewMode(int commandId);
|
||||
void ChangeRepresentation( SMESH_Actor* ac, int type );
|
||||
|
||||
SMESH_Actor* FindActor(SMESH::SMESH_Mesh_ptr aMesh,
|
||||
SMESH_Actor* FindActor(CORBA::Object_ptr theObj,
|
||||
Standard_Boolean& testResult,
|
||||
bool onlyInActiveView);
|
||||
SMESH_Actor* FindActorByEntry(QString entry,
|
||||
@ -282,9 +273,6 @@ public :
|
||||
QString Bold, QString Italic, QString Shadow, QString Font,
|
||||
QString Orientation, float Width, float Height,
|
||||
int NbColors, int NbLabels);
|
||||
void DisplayScalarBar(bool visibility);
|
||||
void UpdateScalarBar(float MinRange, float MaxRange);
|
||||
|
||||
void SetDisplaySettings();
|
||||
|
||||
SALOMEDS::Study::ListOfSObject* GetMeshesUsingAlgoOrHypothesis( SMESH::SMESH_Hypothesis_ptr AlgoOrHyp ) ;
|
||||
@ -303,11 +291,12 @@ public :
|
||||
static void setOrb();
|
||||
|
||||
/* Import/Export */ //NBU
|
||||
static void Import_Document(QAD_Desktop* parent, int theCommandID);
|
||||
static void Export_Document(QAD_Desktop* parent, int theCommandID);
|
||||
static void Import_Mesh(QAD_Desktop* parent, int theCommandID);
|
||||
static void Export_Mesh(QAD_Desktop* parent, int theCommandID);
|
||||
|
||||
/* Filter manager */
|
||||
SMESH::FilterManager_ptr GetFilterMgr();
|
||||
|
||||
signals:
|
||||
void SignalDeactivateActiveDialog() ;
|
||||
void SignalCloseAllDialogs() ;
|
||||
|
@ -255,7 +255,7 @@ void SMESHGUI_AddEdgeDlg::ClickOnOk()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddEdgeDlg::ClickOnCancel()
|
||||
{
|
||||
QAD_Application::getDesktop()->SetSelectionMode( 4 );
|
||||
QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
|
||||
disconnect( mySelection, 0, this, 0 );
|
||||
mySMESHGUI->ResetState() ;
|
||||
mySMESHGUI->EraseSimulationActors();
|
||||
@ -282,9 +282,9 @@ void SMESHGUI_AddEdgeDlg::SelectionIntoArgument()
|
||||
if(nbNodes < 1)
|
||||
return ;
|
||||
|
||||
if ( mySelection->SelectionMode() != 1 ) {
|
||||
if ( mySelection->SelectionMode() != NodeSelection ) {
|
||||
QAD_MessageBox::warn1 ( QAD_Application::getDesktop(), tr ("SMESH_WRN_WARNING"),
|
||||
tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_YES") );
|
||||
tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_OK") );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ void SMESHGUI_AddFaceDlg::ClickOnOk()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddFaceDlg::ClickOnCancel()
|
||||
{
|
||||
QAD_Application::getDesktop()->SetSelectionMode( 4 );
|
||||
QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
|
||||
disconnect( mySelection, 0, this, 0 );
|
||||
mySMESHGUI->ResetState() ;
|
||||
mySMESHGUI->EraseSimulationActors();
|
||||
@ -305,9 +305,9 @@ void SMESHGUI_AddFaceDlg::SelectionIntoArgument()
|
||||
if(nbNodes < 1)
|
||||
return ;
|
||||
|
||||
if ( mySelection->SelectionMode() != 1 ) {
|
||||
if ( mySelection->SelectionMode() != NodeSelection ) {
|
||||
QAD_MessageBox::warn1 ( QAD_Application::getDesktop(), tr ("SMESH_WRN_WARNING"),
|
||||
tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_YES") );
|
||||
tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_OK") );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -33,23 +33,20 @@ using namespace std;
|
||||
|
||||
#include "QAD_Application.h"
|
||||
#include "QAD_Desktop.h"
|
||||
#include "QAD_MessageBox.h"
|
||||
#include "QAD_WaitCursor.h"
|
||||
#include "QAD_Operation.h"
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
// QT Includes
|
||||
#include <qbuttongroup.h>
|
||||
#include <qgroupbox.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlineedit.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qradiobutton.h>
|
||||
#include <qlayout.h>
|
||||
#include <qvariant.h>
|
||||
#include <qtooltip.h>
|
||||
#include <qwhatsthis.h>
|
||||
#include <qimage.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// class : SMESHGUI_AddSubMeshDlg()
|
||||
// purpose : Constructs a SMESHGUI_AddSubMeshDlg which is a child of 'parent', with the
|
||||
@ -58,148 +55,96 @@ using namespace std;
|
||||
// TRUE to construct a modal dialog.
|
||||
//=================================================================================
|
||||
SMESHGUI_AddSubMeshDlg::SMESHGUI_AddSubMeshDlg( QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl )
|
||||
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
|
||||
: QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose )
|
||||
{
|
||||
QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap( "SMESH",tr("ICON_DLG_ADD_SUBMESH")));
|
||||
QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "SMESH",tr("ICON_SELECT")));
|
||||
if ( !name )
|
||||
setName( "SMESHGUI_AddSubMeshDlg" );
|
||||
resize( 303, 175 );
|
||||
setCaption( tr( "SMESH_ADD_SUBMESH" ) );
|
||||
setSizeGripEnabled( TRUE );
|
||||
SMESHGUI_AddSubMeshDlgLayout = new QGridLayout( this );
|
||||
QGridLayout* SMESHGUI_AddSubMeshDlgLayout = new QGridLayout( this );
|
||||
SMESHGUI_AddSubMeshDlgLayout->setSpacing( 6 );
|
||||
SMESHGUI_AddSubMeshDlgLayout->setMargin( 11 );
|
||||
|
||||
/***************************************************************/
|
||||
GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
|
||||
GroupConstructors->setTitle( tr( "SMESH_SUBMESH" ) );
|
||||
GroupConstructors->setExclusive( TRUE );
|
||||
GroupConstructors->setColumnLayout(0, Qt::Vertical );
|
||||
GroupConstructors->layout()->setSpacing( 0 );
|
||||
GroupConstructors->layout()->setMargin( 0 );
|
||||
GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
|
||||
GroupConstructorsLayout->setAlignment( Qt::AlignTop );
|
||||
GroupConstructorsLayout->setSpacing( 6 );
|
||||
GroupConstructorsLayout->setMargin( 11 );
|
||||
Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" );
|
||||
Constructor1->setText( tr( "" ) );
|
||||
Constructor1->setPixmap( image1 );
|
||||
Constructor1->setChecked( TRUE );
|
||||
Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth() ) );
|
||||
Constructor1->setMinimumSize( QSize( 50, 0 ) );
|
||||
GroupConstructorsLayout->addWidget( Constructor1, 0, 0 );
|
||||
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
|
||||
GroupConstructorsLayout->addItem( spacer, 0, 1 );
|
||||
SMESHGUI_AddSubMeshDlgLayout->addWidget( GroupConstructors, 0, 0 );
|
||||
|
||||
/***************************************************************/
|
||||
GroupButtons = new QGroupBox( this, "GroupButtons" );
|
||||
GroupButtons->setGeometry( QRect( 10, 10, 281, 48 ) );
|
||||
GroupButtons->setTitle( tr( "" ) );
|
||||
GroupButtons->setColumnLayout(0, Qt::Vertical );
|
||||
GroupButtons->layout()->setSpacing( 0 );
|
||||
GroupButtons->layout()->setMargin( 0 );
|
||||
GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
|
||||
GroupButtonsLayout->setAlignment( Qt::AlignTop );
|
||||
GroupButtonsLayout->setSpacing( 6 );
|
||||
GroupButtonsLayout->setMargin( 11 );
|
||||
buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
|
||||
buttonCancel->setText( tr( "SMESH_BUT_CLOSE" ) );
|
||||
buttonCancel->setAutoDefault( TRUE );
|
||||
GroupButtonsLayout->addWidget( buttonCancel, 0, 3 );
|
||||
buttonApply = new QPushButton( GroupButtons, "buttonApply" );
|
||||
buttonApply->setText( tr( "SMESH_BUT_APPLY" ) );
|
||||
buttonApply->setAutoDefault( TRUE );
|
||||
GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
|
||||
QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
|
||||
GroupButtonsLayout->addItem( spacer_9, 0, 2 );
|
||||
buttonOk = new QPushButton( GroupButtons, "buttonOk" );
|
||||
buttonOk->setText( tr( "SMESH_BUT_OK" ) );
|
||||
buttonOk->setAutoDefault( TRUE );
|
||||
buttonOk->setDefault( TRUE );
|
||||
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
|
||||
SMESHGUI_AddSubMeshDlgLayout->addWidget( GroupButtons, 2, 0 );
|
||||
|
||||
/***************************************************************/
|
||||
GroupC1 = new QGroupBox( this, "GroupC1" );
|
||||
GroupC1->setTitle( tr( "SMESH_ARGUMENTS" ) );
|
||||
GroupC1->setMinimumSize( QSize( 0, 0 ) );
|
||||
GroupC1->setFrameShape( QGroupBox::Box );
|
||||
GroupC1->setFrameShadow( QGroupBox::Sunken );
|
||||
GroupC1 = new QGroupBox( tr( "SMESH_ARGUMENTS" ), this, "GroupC1" );
|
||||
GroupC1->setColumnLayout(0, Qt::Vertical );
|
||||
GroupC1->layout()->setSpacing( 0 );
|
||||
GroupC1->layout()->setMargin( 0 );
|
||||
GroupC1Layout = new QGridLayout( GroupC1->layout() );
|
||||
QGridLayout* GroupC1Layout = new QGridLayout( GroupC1->layout() );
|
||||
GroupC1Layout->setAlignment( Qt::AlignTop );
|
||||
GroupC1Layout->setSpacing( 6 );
|
||||
GroupC1Layout->setMargin( 11 );
|
||||
|
||||
TextLabelC1A1 = new QLabel( GroupC1, "TextLabelC1A1" );
|
||||
TextLabelC1A1->setText( tr( "SMESH_OBJECT_MESH" ) );
|
||||
TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) );
|
||||
TextLabelC1A1->setFrameShape( QLabel::NoFrame );
|
||||
TextLabelC1A1->setFrameShadow( QLabel::Plain );
|
||||
GroupC1Layout->addWidget( TextLabelC1A1, 0, 0 );
|
||||
TextLabel_NameMesh = new QLabel( tr( "SMESH_NAME" ), GroupC1, "TextLabel_NameMesh" );
|
||||
GroupC1Layout->addWidget( TextLabel_NameMesh, 0, 0 );
|
||||
LineEdit_NameMesh = new QLineEdit( GroupC1, "LineEdit_NameMesh" );
|
||||
GroupC1Layout->addWidget( LineEdit_NameMesh, 0, 2 );
|
||||
|
||||
TextLabelC1A1 = new QLabel( tr( "SMESH_OBJECT_MESH" ), GroupC1, "TextLabelC1A1" );
|
||||
GroupC1Layout->addWidget( TextLabelC1A1, 1, 0 );
|
||||
SelectButtonC1A1 = new QPushButton( GroupC1, "SelectButtonC1A1" );
|
||||
SelectButtonC1A1->setText( tr( "" ) );
|
||||
SelectButtonC1A1->setPixmap( image0 );
|
||||
SelectButtonC1A1->setToggleButton( FALSE );
|
||||
GroupC1Layout->addWidget( SelectButtonC1A1, 0, 1 );
|
||||
GroupC1Layout->addWidget( SelectButtonC1A1, 1, 1 );
|
||||
LineEditC1A1 = new QLineEdit( GroupC1, "LineEditC1A1" );
|
||||
GroupC1Layout->addWidget( LineEditC1A1, 0, 2 );
|
||||
GroupC1Layout->addWidget( LineEditC1A1, 1, 2 );
|
||||
|
||||
TextLabelC1A2 = new QLabel( GroupC1, "TextLabelC1A2" );
|
||||
TextLabelC1A2->setText( tr( "SMESH_OBJECT_GEOM" ) );
|
||||
TextLabelC1A2->setMinimumSize( QSize( 50, 0 ) );
|
||||
TextLabelC1A2->setFrameShape( QLabel::NoFrame );
|
||||
TextLabelC1A2->setFrameShadow( QLabel::Plain );
|
||||
GroupC1Layout->addWidget( TextLabelC1A2, 1, 0 );
|
||||
TextLabelC1A2 = new QLabel( tr( "SMESH_OBJECT_GEOM" ), GroupC1, "TextLabelC1A2" );
|
||||
GroupC1Layout->addWidget( TextLabelC1A2, 2, 0 );
|
||||
SelectButtonC1A2 = new QPushButton( GroupC1, "SelectButtonC1A2" );
|
||||
SelectButtonC1A2->setText( tr( "" ) );
|
||||
SelectButtonC1A2->setPixmap( image0 );
|
||||
SelectButtonC1A2->setToggleButton( FALSE );
|
||||
GroupC1Layout->addWidget( SelectButtonC1A2, 1, 1 );
|
||||
GroupC1Layout->addWidget( SelectButtonC1A2, 2, 1 );
|
||||
LineEditC1A2 = new QLineEdit( GroupC1, "LineEditC1A2" );
|
||||
GroupC1Layout->addWidget( LineEditC1A2, 1, 2 );
|
||||
GroupC1Layout->addWidget( LineEditC1A2, 2, 2 );
|
||||
|
||||
TextLabel_NameMesh = new QLabel( GroupC1, "TextLabel_NameMesh" );
|
||||
TextLabel_NameMesh->setText( tr( "SMESH_NAME" ) );
|
||||
GroupC1Layout->addWidget( TextLabel_NameMesh, 2, 0 );
|
||||
LineEdit_NameMesh = new QLineEdit( GroupC1, "LineEdit_NameMesh" );
|
||||
GroupC1Layout->addWidget( LineEdit_NameMesh, 2, 2 );
|
||||
|
||||
TextLabelC1A1Hyp = new QLabel( GroupC1, "TextLabelC1A1Hyp" );
|
||||
TextLabelC1A1Hyp->setText( tr( "SMESH_OBJECT_HYPOTHESIS" ) );
|
||||
TextLabelC1A1Hyp->setMinimumSize( QSize( 50, 0 ) );
|
||||
TextLabelC1A1Hyp->setFrameShape( QLabel::NoFrame );
|
||||
TextLabelC1A1Hyp->setFrameShadow( QLabel::Plain );
|
||||
TextLabelC1A1Hyp = new QLabel( tr( "SMESH_OBJECT_HYPOTHESIS" ), GroupC1, "TextLabelC1A1Hyp" );
|
||||
GroupC1Layout->addWidget( TextLabelC1A1Hyp, 3, 0 );
|
||||
SelectButtonC1A1Hyp = new QPushButton( GroupC1, "SelectButtonC1A1Hyp" );
|
||||
SelectButtonC1A1Hyp->setText( tr( "" ) );
|
||||
SelectButtonC1A1Hyp->setPixmap( image0 );
|
||||
GroupC1Layout->addWidget( SelectButtonC1A1Hyp, 3, 1 );
|
||||
LineEditC1A1Hyp = new QLineEdit( GroupC1, "LineEditC1A1Hyp" );
|
||||
LineEditC1A1Hyp->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1Hyp->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupC1Layout->addWidget( LineEditC1A1Hyp, 3, 2 );
|
||||
|
||||
TextLabelC1A1Algo = new QLabel( GroupC1, "TextLabelC1A1Algo" );
|
||||
TextLabelC1A1Algo->setText( tr( "SMESH_OBJECT_ALGORITHM" ) );
|
||||
TextLabelC1A1Algo->setMinimumSize( QSize( 50, 0 ) );
|
||||
TextLabelC1A1Algo->setFrameShape( QLabel::NoFrame );
|
||||
TextLabelC1A1Algo->setFrameShadow( QLabel::Plain );
|
||||
TextLabelC1A1Algo = new QLabel( tr( "SMESH_OBJECT_ALGORITHM" ), GroupC1, "TextLabelC1A1Algo" );
|
||||
GroupC1Layout->addWidget( TextLabelC1A1Algo, 4, 0 );
|
||||
SelectButtonC1A1Algo = new QPushButton( GroupC1, "SelectButtonC1A1Algo" );
|
||||
SelectButtonC1A1Algo->setText( tr( "" ) );
|
||||
SelectButtonC1A1Algo->setPixmap( image0 );
|
||||
GroupC1Layout->addWidget( SelectButtonC1A1Algo, 4, 1 );
|
||||
LineEditC1A1Algo = new QLineEdit( GroupC1, "LineEditC1A1Algo" );
|
||||
LineEditC1A1Algo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, LineEditC1A1Algo->sizePolicy().hasHeightForWidth() ) );
|
||||
GroupC1Layout->addWidget( LineEditC1A1Algo, 4, 2 );
|
||||
|
||||
SMESHGUI_AddSubMeshDlgLayout->addWidget( GroupC1, 1, 0 );
|
||||
/***************************************************************/
|
||||
|
||||
/***************************************************************/
|
||||
GroupButtons = new QGroupBox( this, "GroupButtons" );
|
||||
GroupButtons->setColumnLayout(0, Qt::Vertical );
|
||||
GroupButtons->layout()->setSpacing( 0 );
|
||||
GroupButtons->layout()->setMargin( 0 );
|
||||
QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
|
||||
GroupButtonsLayout->setAlignment( Qt::AlignTop );
|
||||
GroupButtonsLayout->setSpacing( 6 );
|
||||
GroupButtonsLayout->setMargin( 11 );
|
||||
|
||||
buttonOk = new QPushButton( tr( "SMESH_BUT_OK" ), GroupButtons, "buttonOk" );
|
||||
buttonOk->setAutoDefault( TRUE );
|
||||
buttonOk->setDefault( TRUE );
|
||||
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
|
||||
|
||||
buttonApply = new QPushButton( tr( "SMESH_BUT_APPLY" ), GroupButtons, "buttonApply" );
|
||||
buttonApply->setAutoDefault( TRUE );
|
||||
GroupButtonsLayout->addWidget( buttonApply, 0, 1 );
|
||||
|
||||
GroupButtonsLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 2 );
|
||||
|
||||
buttonCancel = new QPushButton( tr( "SMESH_BUT_CLOSE" ), GroupButtons, "buttonCancel" );
|
||||
buttonCancel->setAutoDefault( TRUE );
|
||||
GroupButtonsLayout->addWidget( buttonCancel, 0, 3 );
|
||||
|
||||
SMESHGUI_AddSubMeshDlgLayout->addWidget( GroupButtons, 2, 0 );
|
||||
|
||||
/***************************************************************/
|
||||
Init( Sel ) ;
|
||||
}
|
||||
|
||||
@ -220,35 +165,22 @@ SMESHGUI_AddSubMeshDlg::~SMESHGUI_AddSubMeshDlg()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::Init( SALOME_Selection* Sel )
|
||||
{
|
||||
GroupC1->show();
|
||||
myConstructorId = 0 ;
|
||||
Constructor1->setChecked( TRUE );
|
||||
myEditCurrentArgument = LineEditC1A1 ;
|
||||
mySelection = Sel;
|
||||
mySMESHGUI = SMESHGUI::GetSMESHGUI() ;
|
||||
mySMESHGUI->SetActiveDialogBox( (QDialog*)this ) ;
|
||||
|
||||
myGeomFilter = new SALOME_TypeFilter( "GEOM" );
|
||||
myMeshFilter = new SMESH_TypeFilter( MESH );
|
||||
|
||||
myAlgorithmFilter = new SMESH_TypeFilter( ALGORITHM );
|
||||
myHypothesisFilter = new SMESH_TypeFilter( HYPOTHESIS );
|
||||
|
||||
myNameSubMesh = "SubMesh";
|
||||
|
||||
myGeomShape = GEOM::GEOM_Shape::_nil();
|
||||
myMesh = SMESH::SMESH_Mesh::_nil();
|
||||
|
||||
/* signals and slots connections */
|
||||
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ;
|
||||
connect( GroupConstructors, SIGNAL(clicked(int) ), SLOT( ConstructorsClicked(int) ) );
|
||||
|
||||
connect( SelectButtonC1A1, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
|
||||
connect( SelectButtonC1A2, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
|
||||
connect( LineEdit_NameMesh, SIGNAL (textChanged(const QString&) ), this, SLOT( TextChangedInLineEdit(const QString&) ) ) ;
|
||||
|
||||
connect( SelectButtonC1A1Hyp, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
|
||||
connect( SelectButtonC1A1Algo, SIGNAL (clicked() ), this, SLOT( SetEditCurrentArgument() ) ) ;
|
||||
|
||||
@ -261,19 +193,13 @@ void SMESHGUI_AddSubMeshDlg::Init( SALOME_Selection* Sel )
|
||||
this->move( x, y ) ;
|
||||
this->show() ;
|
||||
|
||||
LineEdit_NameMesh->setText( tr( "SMESH_SUBMESH" ) );
|
||||
LineEdit_NameMesh->setFocus() ;
|
||||
myEditCurrentArgument = LineEditC1A1 ;
|
||||
mySelection->ClearFilters() ;
|
||||
mySelection->AddFilter( myMeshFilter ) ;
|
||||
|
||||
SelectionIntoArgument();
|
||||
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// function : ConstructorsClicked()
|
||||
// purpose : Radio button management
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::ConstructorsClicked(int constructorId)
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -282,7 +208,7 @@ void SMESHGUI_AddSubMeshDlg::ConstructorsClicked(int constructorId)
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::ClickOnOk()
|
||||
{
|
||||
this->ClickOnApply() ;
|
||||
if ( this->ClickOnApply() )
|
||||
this->ClickOnCancel() ;
|
||||
}
|
||||
|
||||
@ -290,43 +216,70 @@ void SMESHGUI_AddSubMeshDlg::ClickOnOk()
|
||||
// function : ClickOnApply()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::ClickOnApply()
|
||||
bool SMESHGUI_AddSubMeshDlg::ClickOnApply()
|
||||
{
|
||||
switch(myConstructorId)
|
||||
{
|
||||
case 0 :
|
||||
{
|
||||
if ( !myNameSubMesh.isEmpty() && !myNameSubMesh.isNull() &&
|
||||
!myGeomShape->_is_nil() && !myMesh->_is_nil()) {
|
||||
mySubMesh = mySMESHGUI->AddSubMesh( myMesh, myGeomShape, myNameSubMesh ) ;
|
||||
QString myNameSubMesh = LineEdit_NameMesh->text().stripWhiteSpace();
|
||||
if ( myNameSubMesh.isEmpty() ) {
|
||||
QAD_MessageBox::warn1( this, tr( "SMESH_WRN_WARNING" ), tr( "SMESH_WRN_EMPTY_NAME" ), tr( "SMESH_BUT_OK" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( myOkHypothesis && !mySubMesh->_is_nil() ) {
|
||||
SALOME_ListIteratorOfListIO It( HypoList );
|
||||
for(;It.More();It.Next()) {
|
||||
Handle(SALOME_InteractiveObject) IObject = It.Value();
|
||||
Standard_Boolean testResult;
|
||||
myHypothesis = mySMESHGUI->ConvertIOinSMESHHypothesis(IObject, testResult) ;
|
||||
if( testResult )
|
||||
mySMESHGUI->AddHypothesisOnSubMesh(mySubMesh, myHypothesis) ;
|
||||
}
|
||||
}
|
||||
if ( myMesh->_is_nil() || myGeomShape->_is_nil() || ( !HypoList.count() && !AlgoList.count() ) )
|
||||
return false;
|
||||
|
||||
if( myOkAlgorithm && !mySubMesh->_is_nil() ) {
|
||||
SALOME_ListIteratorOfListIO It( AlgoList );
|
||||
for(;It.More();It.Next()) {
|
||||
Handle(SALOME_InteractiveObject) IObject = It.Value();
|
||||
Standard_Boolean testResult;
|
||||
myAlgorithm = mySMESHGUI->ConvertIOinSMESHHypothesis(IObject, testResult) ;
|
||||
if( testResult )
|
||||
mySMESHGUI->AddAlgorithmOnSubMesh(mySubMesh, myAlgorithm) ;
|
||||
}
|
||||
}
|
||||
SALOMEDS::SObject_var aMeshSO = mySMESHGUI->GetStudyAPI().FindObject( myMesh );
|
||||
GEOM::GEOM_Shape_var myMainShape = mySMESHGUI->GetStudyAPI().GetShapeOnMeshOrSubMesh( aMeshSO );
|
||||
if ( myMainShape->_is_nil() )
|
||||
return false;
|
||||
|
||||
break ;
|
||||
QAD_WaitCursor wc;
|
||||
|
||||
QAD_Operation* op = new QAD_Operation( mySMESHGUI->GetActiveStudy() );
|
||||
|
||||
// start transaction
|
||||
op->start();
|
||||
|
||||
// create submesh
|
||||
SMESH::SMESH_subMesh_var aSubMesh = mySMESHGUI->AddSubMesh( myMesh, myGeomShape, myNameSubMesh ) ;
|
||||
|
||||
if ( !aSubMesh->_is_nil() ) {
|
||||
// assign hypotheses
|
||||
for( int i = 0; i < HypoList.count(); i++ ) {
|
||||
SALOMEDS::SObject_var aHypSO = mySMESHGUI->GetStudy()->FindObjectID( HypoList[i] );
|
||||
if ( !aHypSO->_is_nil() ) {
|
||||
CORBA::Object_var anObject = aHypSO->GetObject();
|
||||
if ( !CORBA::is_nil( anObject ) ) {
|
||||
SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( anObject );
|
||||
if ( !aHyp->_is_nil() )
|
||||
if ( !mySMESHGUI->AddHypothesisOnSubMesh( aSubMesh, aHyp ) ) {
|
||||
// abort transaction
|
||||
op->abort();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// assign algorithms
|
||||
for( int i = 0; i < AlgoList.count(); i++ ) {
|
||||
SALOMEDS::SObject_var aHypSO = mySMESHGUI->GetStudy()->FindObjectID( AlgoList[i] );
|
||||
if ( !aHypSO->_is_nil() ) {
|
||||
CORBA::Object_var anObject = aHypSO->GetObject();
|
||||
if ( !CORBA::is_nil( anObject ) ) {
|
||||
SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( anObject );
|
||||
if ( !aHyp->_is_nil() )
|
||||
if ( !mySMESHGUI->AddAlgorithmOnSubMesh( aSubMesh, aHyp ) ) {
|
||||
// abort transaction
|
||||
op->abort();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// commit transaction
|
||||
op->finish();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=================================================================================
|
||||
@ -335,13 +288,20 @@ void SMESHGUI_AddSubMeshDlg::ClickOnApply()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::ClickOnCancel()
|
||||
{
|
||||
disconnect( mySelection, 0, this, 0 );
|
||||
mySMESHGUI->ResetState() ;
|
||||
mySelection->ClearFilters() ;
|
||||
reject() ;
|
||||
return ;
|
||||
close();
|
||||
}
|
||||
|
||||
static bool IsFatherOf( SALOMEDS::SObject_ptr SO, SALOMEDS::SObject_ptr fatherSO ) {
|
||||
if ( !SO->_is_nil() && !fatherSO->_is_nil() ) {
|
||||
SALOMEDS::SObject_var aSO = SO->GetFather();
|
||||
while( strlen( aSO->GetID() ) >= strlen( fatherSO->GetID() ) ) {
|
||||
if ( QString( aSO->GetID() ) == QString( fatherSO->GetID() ) )
|
||||
return true;
|
||||
aSO = aSO->GetFather();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : SelectionIntoArgument()
|
||||
@ -349,81 +309,88 @@ void SMESHGUI_AddSubMeshDlg::ClickOnCancel()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::SelectionIntoArgument()
|
||||
{
|
||||
myEditCurrentArgument->setText("") ;
|
||||
SMESHGUI_StudyAPI myStudyAPI = mySMESHGUI->GetStudyAPI();
|
||||
QString aString = "";
|
||||
|
||||
int nbSel = mySMESHGUI->GetNameOfSelectedIObjects(mySelection, aString) ;
|
||||
|
||||
switch (myConstructorId)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if ( myEditCurrentArgument == LineEditC1A1 ) {
|
||||
// mesh
|
||||
if ( nbSel != 1 ) {
|
||||
myOkHypothesis = false;
|
||||
myOkAlgorithm = false;
|
||||
return ;
|
||||
} else {
|
||||
myMesh = SMESH::SMESH_Mesh::_nil();
|
||||
aString = "";
|
||||
}
|
||||
else {
|
||||
Standard_Boolean testResult ;
|
||||
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject() ;
|
||||
myMesh = mySMESHGUI->ConvertIOinMesh(IO, testResult) ;
|
||||
if( !testResult ) {
|
||||
myMesh = SMESH::SMESH_Mesh::_nil();
|
||||
return ;
|
||||
aString = "";
|
||||
}
|
||||
}
|
||||
} else if ( myEditCurrentArgument == LineEditC1A2 ) {
|
||||
myGeomShape = GEOM::GEOM_Shape::_nil();
|
||||
LineEditC1A2->setText( "" );
|
||||
}
|
||||
else if ( myEditCurrentArgument == LineEditC1A2 ) {
|
||||
// geom shape
|
||||
if ( nbSel != 1 ) {
|
||||
myOkHypothesis = false;
|
||||
myOkAlgorithm = false;
|
||||
return ;
|
||||
} else {
|
||||
myGeomShape = GEOM::GEOM_Shape::_nil();
|
||||
aString = "";
|
||||
}
|
||||
else {
|
||||
Standard_Boolean testResult ;
|
||||
Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject() ;
|
||||
myGeomShape = mySMESHGUI->ConvertIOinGEOMShape(IO, testResult) ;
|
||||
if( !testResult ) {
|
||||
myGeomShape = GEOM::GEOM_Shape::_nil();
|
||||
return ;
|
||||
aString = "";
|
||||
}
|
||||
if ( !myMesh->_is_nil() ) {
|
||||
SALOMEDS::SObject_var aMeshSO = myStudyAPI.FindObject( myMesh );
|
||||
GEOM::GEOM_Shape_var aMainGeomShape = myStudyAPI.GetShapeOnMeshOrSubMesh( aMeshSO );
|
||||
SALOMEDS::SObject_var aMainGeomShapeSO = myStudyAPI.FindObject( aMainGeomShape );
|
||||
if ( aMainGeomShapeSO->_is_nil() || !IsFatherOf( mySMESHGUI->GetStudy()->FindObjectID( IO->getEntry() ), aMainGeomShapeSO ) ) {
|
||||
myGeomShape = GEOM::GEOM_Shape::_nil();
|
||||
aString = "";
|
||||
}
|
||||
}
|
||||
} else if ( myEditCurrentArgument == LineEditC1A1Hyp ) {
|
||||
}
|
||||
}
|
||||
else if ( myEditCurrentArgument == LineEditC1A1Hyp ) {
|
||||
// hypotheses
|
||||
HypoList.clear();
|
||||
if ( nbSel >= 1 ) {
|
||||
HypoList.Clear();
|
||||
SALOME_ListIteratorOfListIO Itinit( mySelection->StoredIObjects() );
|
||||
for ( ; Itinit.More(); Itinit.Next() ) {
|
||||
HypoList.Append(Itinit.Value());
|
||||
HypoList.append( Itinit.Value()->getEntry() );
|
||||
}
|
||||
myOkHypothesis = true ;
|
||||
if ( nbSel > 1 )
|
||||
aString = tr( "%1 Hypothesis" ).arg( nbSel ) ;
|
||||
LineEditC1A1Hyp->setText(aString) ;
|
||||
}
|
||||
else {
|
||||
myOkHypothesis = false ;
|
||||
return ;
|
||||
aString = "";
|
||||
}
|
||||
} else if ( myEditCurrentArgument == LineEditC1A1Algo ) {
|
||||
}
|
||||
else if ( myEditCurrentArgument == LineEditC1A1Algo ) {
|
||||
// algorithms
|
||||
AlgoList.clear();
|
||||
if ( nbSel >= 1 ) {
|
||||
AlgoList.Clear();
|
||||
SALOME_ListIteratorOfListIO Itinit( mySelection->StoredIObjects() );
|
||||
for ( ; Itinit.More(); Itinit.Next() ) {
|
||||
AlgoList.Append(Itinit.Value());
|
||||
AlgoList.append( Itinit.Value()->getEntry() );
|
||||
}
|
||||
myOkAlgorithm = true ;
|
||||
if ( nbSel > 1 )
|
||||
aString = tr( "%1 Algorithms" ).arg( nbSel ) ;
|
||||
LineEditC1A1Algo->setText(aString) ;
|
||||
}
|
||||
else {
|
||||
myOkAlgorithm = false ;
|
||||
return ;
|
||||
}
|
||||
}
|
||||
break;
|
||||
aString = "";
|
||||
}
|
||||
}
|
||||
|
||||
myEditCurrentArgument->setText(aString) ;
|
||||
|
||||
UpdateControlState();
|
||||
}
|
||||
|
||||
|
||||
@ -434,10 +401,6 @@ void SMESHGUI_AddSubMeshDlg::SelectionIntoArgument()
|
||||
void SMESHGUI_AddSubMeshDlg::SetEditCurrentArgument()
|
||||
{
|
||||
QPushButton* send = (QPushButton*)sender();
|
||||
switch (myConstructorId)
|
||||
{
|
||||
case 0: /* default constructor */
|
||||
{
|
||||
if(send == SelectButtonC1A1) {
|
||||
LineEditC1A1->setFocus() ;
|
||||
myEditCurrentArgument = LineEditC1A1;
|
||||
@ -460,10 +423,6 @@ void SMESHGUI_AddSubMeshDlg::SetEditCurrentArgument()
|
||||
mySelection->AddFilter(myAlgorithmFilter) ;
|
||||
}
|
||||
SelectionIntoArgument() ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -472,9 +431,8 @@ void SMESHGUI_AddSubMeshDlg::SetEditCurrentArgument()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::DeactivateActiveDialog()
|
||||
{
|
||||
if ( GroupConstructors->isEnabled() ) {
|
||||
if ( GroupC1->isEnabled() ) {
|
||||
disconnect( mySelection, 0, this, 0 );
|
||||
GroupConstructors->setEnabled(false) ;
|
||||
GroupC1->setEnabled(false) ;
|
||||
GroupButtons->setEnabled(false) ;
|
||||
}
|
||||
@ -488,11 +446,9 @@ void SMESHGUI_AddSubMeshDlg::DeactivateActiveDialog()
|
||||
void SMESHGUI_AddSubMeshDlg::ActivateThisDialog()
|
||||
{
|
||||
mySMESHGUI->EmitSignalDeactivateDialog() ;
|
||||
GroupConstructors->setEnabled(true) ;
|
||||
GroupC1->setEnabled(true) ;
|
||||
GroupButtons->setEnabled(true) ;
|
||||
connect ( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
@ -502,10 +458,8 @@ void SMESHGUI_AddSubMeshDlg::ActivateThisDialog()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::enterEvent(QEvent* e)
|
||||
{
|
||||
if ( GroupConstructors->isEnabled() )
|
||||
return ;
|
||||
if ( !GroupC1->isEnabled() )
|
||||
ActivateThisDialog() ;
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
@ -515,21 +469,31 @@ void SMESHGUI_AddSubMeshDlg::enterEvent(QEvent* e)
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
this->ClickOnCancel() ;
|
||||
return ;
|
||||
disconnect( mySelection, 0, this, 0 );
|
||||
mySMESHGUI->ResetState() ;
|
||||
mySelection->ClearFilters() ;
|
||||
QDialog::closeEvent( e );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
// function : TextChangedInLineEdit()
|
||||
// function : UpdateControlState()
|
||||
// purpose :
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddSubMeshDlg::TextChangedInLineEdit(const QString& newText)
|
||||
void SMESHGUI_AddSubMeshDlg::UpdateControlState()
|
||||
{
|
||||
QLineEdit* send = (QLineEdit*)sender();
|
||||
QString newT = strdup(newText) ;
|
||||
bool isEnabled = ( !myMesh->_is_nil() && !myGeomShape->_is_nil() && ( HypoList.count() || AlgoList.count() ) );
|
||||
bool isImportedMesh = false;
|
||||
if ( !myMesh->_is_nil() ) {
|
||||
SALOMEDS::SObject_var aMeshSO = mySMESHGUI->GetStudyAPI().FindObject( myMesh );
|
||||
GEOM::GEOM_Shape_var myGeomShape = mySMESHGUI->GetStudyAPI().GetShapeOnMeshOrSubMesh( aMeshSO );
|
||||
isImportedMesh = myGeomShape->_is_nil();
|
||||
}
|
||||
|
||||
if (send == LineEdit_NameMesh) {
|
||||
myNameSubMesh = newText;
|
||||
}
|
||||
return ;
|
||||
buttonOk ->setEnabled( isEnabled && !isImportedMesh );
|
||||
buttonApply->setEnabled( isEnabled && !isImportedMesh );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -34,8 +34,8 @@
|
||||
#include "SMESH_TypeFilter.hxx"
|
||||
|
||||
// QT Includes
|
||||
#include <qvariant.h>
|
||||
#include <qdialog.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
// IDL Headers
|
||||
#include <SALOMEconfig.h>
|
||||
@ -43,18 +43,12 @@
|
||||
#include CORBA_SERVER_HEADER(GEOM_Shape)
|
||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class QGridLayout;
|
||||
class QButtonGroup;
|
||||
class QGroupBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QRadioButton;
|
||||
class SMESHGUI;
|
||||
|
||||
|
||||
//=================================================================================
|
||||
// class : SMESHGUI_AddSubMeshDlg
|
||||
// purpose :
|
||||
@ -67,44 +61,36 @@ public:
|
||||
SMESHGUI_AddSubMeshDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~SMESHGUI_AddSubMeshDlg();
|
||||
|
||||
private:
|
||||
|
||||
void Init( SALOME_Selection* Sel ) ;
|
||||
protected:
|
||||
void closeEvent( QCloseEvent* e ) ;
|
||||
void enterEvent ( QEvent * ) ;
|
||||
|
||||
private:
|
||||
void Init( SALOME_Selection* Sel ) ;
|
||||
|
||||
void UpdateControlState();
|
||||
|
||||
private:
|
||||
SMESHGUI* mySMESHGUI ;
|
||||
SALOME_Selection* mySelection ;
|
||||
|
||||
GEOM::GEOM_Shape_var myGeomShape ;
|
||||
int myConstructorId ;
|
||||
QLineEdit* myEditCurrentArgument;
|
||||
|
||||
SMESH::SMESH_Mesh_var myMesh;
|
||||
SMESH::SMESH_subMesh_var mySubMesh;
|
||||
|
||||
QString myNameSubMesh ;
|
||||
GEOM::GEOM_Shape_var myGeomShape ;
|
||||
QLineEdit* myEditCurrentArgument;
|
||||
|
||||
Handle(SALOME_TypeFilter) myGeomFilter;
|
||||
Handle(SMESH_TypeFilter) myMeshFilter;
|
||||
Handle(SMESH_TypeFilter) myHypothesisFilter;
|
||||
Handle(SMESH_TypeFilter) myAlgorithmFilter;
|
||||
|
||||
SALOME_ListIO HypoList;
|
||||
SALOME_ListIO AlgoList;
|
||||
QStringList HypoList;
|
||||
QStringList AlgoList;
|
||||
|
||||
bool myOkHypothesis;
|
||||
bool myOkAlgorithm;
|
||||
|
||||
SMESH::SMESH_Hypothesis_var myHypothesis;
|
||||
SMESH::SMESH_Hypothesis_var myAlgorithm;
|
||||
|
||||
QButtonGroup* GroupConstructors;
|
||||
QRadioButton* Constructor1;
|
||||
QGroupBox* GroupButtons;
|
||||
QPushButton* buttonOk;
|
||||
QPushButton* buttonCancel;
|
||||
QPushButton* buttonApply;
|
||||
QPushButton* buttonCancel;
|
||||
|
||||
QGroupBox* GroupC1;
|
||||
QLabel* TextLabel_NameMesh ;
|
||||
QLineEdit* LineEdit_NameMesh ;
|
||||
@ -124,22 +110,13 @@ private:
|
||||
QLineEdit* LineEditC1A1Algo;
|
||||
|
||||
private slots:
|
||||
|
||||
void ConstructorsClicked(int constructorId);
|
||||
void ClickOnOk();
|
||||
bool ClickOnApply();
|
||||
void ClickOnCancel();
|
||||
void ClickOnApply();
|
||||
void SetEditCurrentArgument() ;
|
||||
void SelectionIntoArgument() ;
|
||||
void DeactivateActiveDialog() ;
|
||||
void ActivateThisDialog() ;
|
||||
void TextChangedInLineEdit(const QString& newText) ;
|
||||
|
||||
protected:
|
||||
QGridLayout* SMESHGUI_AddSubMeshDlgLayout;
|
||||
QGridLayout* GroupConstructorsLayout;
|
||||
QGridLayout* GroupButtonsLayout;
|
||||
QGridLayout* GroupC1Layout;
|
||||
};
|
||||
|
||||
#endif // DIALOGBOX_ADD_SUBMESH_H
|
||||
|
@ -270,7 +270,7 @@ void SMESHGUI_AddVolumeDlg::ClickOnOk()
|
||||
//=================================================================================
|
||||
void SMESHGUI_AddVolumeDlg::ClickOnCancel()
|
||||
{
|
||||
QAD_Application::getDesktop()->SetSelectionMode( 4 );
|
||||
QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
|
||||
disconnect( mySelection, 0, this, 0 );
|
||||
mySMESHGUI->ResetState() ;
|
||||
mySMESHGUI->EraseSimulationActors();
|
||||
@ -297,9 +297,9 @@ void SMESHGUI_AddVolumeDlg::SelectionIntoArgument()
|
||||
if(nbNodes < 1)
|
||||
return ;
|
||||
|
||||
if ( mySelection->SelectionMode() != 1 ) {
|
||||
if ( mySelection->SelectionMode() != NodeSelection ) {
|
||||
QAD_MessageBox::warn1 ( QAD_Application::getDesktop(), tr ("SMESH_WRN_WARNING"),
|
||||
tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_YES") );
|
||||
tr ("SMESH_WRN_SELECTIONMODE_NODES"), tr ("SMESH_BUT_OK") );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ void SMESHGUI_DiagonalInversionDlg::ClickOnOk()
|
||||
//=================================================================================
|
||||
void SMESHGUI_DiagonalInversionDlg::ClickOnCancel()
|
||||
{
|
||||
QAD_Application::getDesktop()->SetSelectionMode( 4 );
|
||||
QAD_Application::getDesktop()->SetSelectionMode( ActorSelection );
|
||||
disconnect( mySelection, 0, this, 0 );
|
||||
mySMESHGUI->ResetState() ;
|
||||
reject() ;
|
||||
@ -265,7 +265,7 @@ void SMESHGUI_DiagonalInversionDlg::SelectionIntoArgument()
|
||||
myOkElements = false;
|
||||
QString aString = "";
|
||||
|
||||
if ( mySelection->SelectionMode() != 2 ) {
|
||||
if ( mySelection->SelectionMode() != EdgeSelection ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user